From 6c62dfa4f21aa3017635c95184128d68115c2d01 Mon Sep 17 00:00:00 2001 From: Alibek Seksenali Date: Wed, 8 Jul 2026 12:40:47 +0500 Subject: [PATCH] chore: replace legacy 1sdk with @1msg/sdk TypeScript source Public open-source home for the 1msg SDK packages. Initial release includes the TypeScript client under typescript/. Co-authored-by: Cursor --- c/external/cJSON.licence => LICENSE | 12 +- README.md | 29 +- c/.openapi-generator/FILES | 293 -- c/.openapi-generator/VERSION | 1 - c/CMakeLists.txt | 310 -- c/Packing.cmake | 24 - c/README.md | 177 - c/api/ChannelAPI.c | 661 ---- c/api/ChannelAPI.h | 92 - c/api/MediaAPI.c | 93 - c/api/MediaAPI.h | 19 - c/api/MessagingAPI.c | 757 ----- c/api/MessagingAPI.h | 75 - c/api/ProductsCatalogsAPI.c | 176 - c/api/ProductsCatalogsAPI.h | 30 - c/api/TemplatesAPI.c | 318 -- c/api/TemplatesAPI.h | 49 - c/api/WebhooksAPI.c | 184 -- c/api/WebhooksAPI.h | 29 - c/docs/ChannelAPI.md | 290 -- c/docs/MediaAPI.md | 40 - c/docs/MessagingAPI.md | 239 -- c/docs/ProductsCatalogsAPI.md | 72 - c/docs/TemplatesAPI.md | 135 - c/docs/WebhooksAPI.md | 72 - c/docs/ack.md | 12 - c/docs/add_template_request.md | 13 - c/docs/channel_extended_statistics.md | 9 - c/docs/channel_extended_statistics_inner.md | 22 - c/docs/channel_statistics.md | 11 - c/docs/channel_status.md | 10 - c/docs/chat_id_prop.md | 10 - c/docs/commerce.md | 10 - c/docs/commerce_params.md | 11 - c/docs/contacts.md | 10 - c/docs/contacts_contacts_inner.md | 12 - c/docs/contacts_request.md | 12 - c/docs/get_ack_info.md | 10 - c/docs/get_ack_info_hooks_inner.md | 16 - c/docs/get_commerce.md | 9 - c/docs/get_commerce_inner.md | 12 - c/docs/get_ip.md | 10 - c/docs/get_me.md | 16 - c/docs/get_me_401_response.md | 10 - c/docs/get_messages.md | 10 - c/docs/get_messages_messages_inner.md | 24 - c/docs/get_templates.md | 11 - c/docs/get_templates_templates_inner.md | 16 - c/docs/me_components.md | 16 - c/docs/media_id.md | 10 - c/docs/message.md | 21 - c/docs/message_id_prop.md | 10 - c/docs/phone_prop.md | 10 - c/docs/read_message_request.md | 10 - c/docs/remove_template_request.md | 10 - c/docs/send_contact_request.md | 12 - c/docs/send_file_request.md | 14 - c/docs/send_list_request.md | 16 - c/docs/send_list_request_all_of_rows.md | 12 - c/docs/send_list_request_all_of_sections.md | 11 - c/docs/send_location_request.md | 15 - c/docs/send_message_request.md | 12 - c/docs/send_message_status.md | 13 - c/docs/send_product_request.md | 15 - c/docs/send_product_request_all_of_action.md | 12 - ...uct_request_all_of_action_product_items.md | 10 - ..._product_request_all_of_action_sections.md | 11 - c/docs/send_template_request.md | 15 - .../send_template_request_all_of_currency.md | 11 - .../send_template_request_all_of_date_time.md | 11 - ...late_request_all_of_date_time_component.md | 16 - ...ate_request_all_of_date_time_unix_epoch.md | 10 - .../send_template_request_all_of_language.md | 11 - c/docs/send_template_request_all_of_params.md | 12 - c/docs/set_commerce.md | 10 - c/docs/set_me.md | 10 - c/docs/set_me_request.md | 16 - c/docs/set_settings_200_response.md | 11 - ...set_settings_200_response_all_of_update.md | 10 - c/docs/set_webhook_status.md | 11 - c/docs/settings.md | 10 - c/docs/template_category_prop.md | 9 - c/docs/template_components_prop.md | 9 - c/docs/template_components_prop_inner.md | 14 - ...ate_components_prop_inner_buttons_inner.md | 14 - c/docs/template_language_prop.md | 9 - c/docs/template_namespace_field.md | 10 - c/docs/upload_media.md | 10 - c/docs/webhook_url.md | 10 - c/external/cJSON.c | 2932 ----------------- c/external/cJSON.h | 277 -- c/include/apiClient.h | 63 - c/include/binary.h | 18 - c/include/keyValuePair.h | 17 - c/include/list.h | 42 - c/libcurl.licence | 11 - c/model/ack.c | 137 - c/model/ack.h | 49 - c/model/add_template_request.c | 206 -- c/model/add_template_request.h | 62 - c/model/channel_extended_statistics.c | 49 - c/model/channel_extended_statistics.h | 36 - c/model/channel_extended_statistics_inner.c | 313 -- c/model/channel_extended_statistics_inner.h | 61 - c/model/channel_statistics.c | 93 - c/model/channel_statistics.h | 39 - c/model/channel_status.c | 89 - c/model/channel_status.h | 45 - c/model/chat_id_prop.c | 73 - c/model/chat_id_prop.h | 37 - c/model/commerce.c | 82 - c/model/commerce.h | 38 - c/model/commerce_params.c | 97 - c/model/commerce_params.h | 39 - c/model/contacts.c | 112 - c/model/contacts.h | 38 - c/model/contacts_contacts_inner.c | 121 - c/model/contacts_contacts_inner.h | 41 - c/model/contacts_request.c | 155 - c/model/contacts_request.h | 41 - c/model/get_ack_info.c | 112 - c/model/get_ack_info.h | 38 - c/model/get_ack_info_hooks_inner.c | 223 -- c/model/get_ack_info_hooks_inner.h | 50 - c/model/get_commerce.c | 49 - c/model/get_commerce.h | 36 - c/model/get_commerce_inner.c | 113 - c/model/get_commerce_inner.h | 41 - c/model/get_ip.c | 73 - c/model/get_ip.h | 37 - c/model/get_me.c | 233 -- c/model/get_me.h | 57 - c/model/get_me_401_response.c | 73 - c/model/get_me_401_response.h | 37 - c/model/get_messages.c | 112 - c/model/get_messages.h | 38 - c/model/get_messages_messages_inner.c | 392 --- c/model/get_messages_messages_inner.h | 66 - c/model/get_templates.c | 132 - c/model/get_templates.h | 40 - c/model/get_templates_templates_inner.c | 278 -- c/model/get_templates_templates_inner.h | 68 - c/model/me_components.c | 233 -- c/model/me_components.h | 57 - c/model/media_id.c | 73 - c/model/media_id.h | 37 - c/model/message.c | 337 -- c/model/message.h | 67 - c/model/message_id_prop.c | 73 - c/model/message_id_prop.h | 37 - c/model/object.c | 51 - c/model/object.h | 27 - c/model/phone_prop.c | 69 - c/model/phone_prop.h | 37 - c/model/read_message_request.c | 73 - c/model/read_message_request.h | 37 - c/model/remove_template_request.c | 73 - c/model/remove_template_request.h | 37 - c/model/send_contact_request.c | 156 - c/model/send_contact_request.h | 42 - c/model/send_file_request.c | 173 - c/model/send_file_request.h | 45 - c/model/send_list_request.c | 264 -- c/model/send_list_request.h | 50 - c/model/send_list_request_all_of_rows.c | 129 - c/model/send_list_request_all_of_rows.h | 41 - c/model/send_list_request_all_of_sections.c | 140 - c/model/send_list_request_all_of_sections.h | 40 - c/model/send_location_request.c | 197 -- c/model/send_location_request.h | 47 - c/model/send_message_request.c | 121 - c/model/send_message_request.h | 41 - c/model/send_message_status.c | 141 - c/model/send_message_status.h | 43 - c/model/send_product_request.c | 202 -- c/model/send_product_request.h | 48 - c/model/send_product_request_all_of_action.c | 160 - c/model/send_product_request_all_of_action.h | 42 - ...duct_request_all_of_action_product_items.c | 73 - ...duct_request_all_of_action_product_items.h | 37 - ...d_product_request_all_of_action_sections.c | 136 - ...d_product_request_all_of_action_sections.h | 40 - c/model/send_template_request.c | 249 -- c/model/send_template_request.h | 49 - .../send_template_request_all_of_currency.c | 93 - .../send_template_request_all_of_currency.h | 39 - .../send_template_request_all_of_date_time.c | 115 - .../send_template_request_all_of_date_time.h | 41 - ...plate_request_all_of_date_time_component.c | 229 -- ...plate_request_all_of_date_time_component.h | 65 - ...late_request_all_of_date_time_unix_epoch.c | 69 - ...late_request_all_of_date_time_unix_epoch.h | 37 - .../send_template_request_all_of_language.c | 139 - .../send_template_request_all_of_language.h | 56 - c/model/send_template_request_all_of_params.c | 139 - c/model/send_template_request_all_of_params.h | 43 - c/model/set_commerce.c | 69 - c/model/set_commerce.h | 37 - c/model/set_me.c | 73 - c/model/set_me.h | 37 - c/model/set_me_request.c | 233 -- c/model/set_me_request.h | 57 - c/model/set_settings_200_response.c | 110 - c/model/set_settings_200_response.h | 40 - .../set_settings_200_response_all_of_update.c | 73 - .../set_settings_200_response_all_of_update.h | 37 - c/model/set_webhook_status.c | 93 - c/model/set_webhook_status.h | 39 - c/model/settings.c | 73 - c/model/settings.h | 37 - c/model/template_category_prop.c | 47 - c/model/template_category_prop.h | 32 - c/model/template_components_prop.c | 49 - c/model/template_components_prop.h | 36 - c/model/template_components_prop_inner.c | 243 -- c/model/template_components_prop_inner.h | 63 - ...late_components_prop_inner_buttons_inner.c | 224 -- ...late_components_prop_inner_buttons_inner.h | 54 - c/model/template_language_prop.c | 47 - c/model/template_language_prop.h | 32 - c/model/template_namespace_field.c | 73 - c/model/template_namespace_field.h | 37 - c/model/upload_media.c | 77 - c/model/upload_media.h | 37 - c/model/webhook_url.c | 77 - c/model/webhook_url.h | 37 - c/src/apiClient.c | 534 --- c/src/apiKey.c | 20 - c/src/binary.c | 58 - c/src/list.c | 200 -- c/uncrustify-rules.cfg | 210 -- c/unit-test/test_ack.c | 62 - c/unit-test/test_add_template_request.c | 64 - .../test_channel_extended_statistics.c | 56 - .../test_channel_extended_statistics_inner.c | 82 - c/unit-test/test_channel_statistics.c | 60 - c/unit-test/test_channel_status.c | 58 - c/unit-test/test_chat_id_prop.c | 58 - c/unit-test/test_commerce.c | 60 - c/unit-test/test_commerce_params.c | 60 - c/unit-test/test_contacts.c | 58 - c/unit-test/test_contacts_contacts_inner.c | 62 - c/unit-test/test_contacts_request.c | 62 - c/unit-test/test_get_ack_info.c | 58 - c/unit-test/test_get_ack_info_hooks_inner.c | 70 - c/unit-test/test_get_commerce.c | 56 - c/unit-test/test_get_commerce_inner.c | 62 - c/unit-test/test_get_ip.c | 58 - c/unit-test/test_get_me.c | 70 - c/unit-test/test_get_me_401_response.c | 58 - c/unit-test/test_get_messages.c | 58 - .../test_get_messages_messages_inner.c | 86 - c/unit-test/test_get_templates.c | 60 - .../test_get_templates_templates_inner.c | 70 - c/unit-test/test_me_components.c | 70 - c/unit-test/test_media_id.c | 58 - c/unit-test/test_message.c | 80 - c/unit-test/test_message_id_prop.c | 58 - c/unit-test/test_phone_prop.c | 58 - c/unit-test/test_read_message_request.c | 58 - c/unit-test/test_remove_template_request.c | 58 - c/unit-test/test_send_contact_request.c | 62 - c/unit-test/test_send_file_request.c | 66 - c/unit-test/test_send_list_request.c | 70 - .../test_send_list_request_all_of_rows.c | 62 - .../test_send_list_request_all_of_sections.c | 60 - c/unit-test/test_send_location_request.c | 68 - c/unit-test/test_send_message_request.c | 62 - c/unit-test/test_send_message_status.c | 64 - c/unit-test/test_send_product_request.c | 69 - .../test_send_product_request_all_of_action.c | 62 - ...duct_request_all_of_action_product_items.c | 58 - ...d_product_request_all_of_action_sections.c | 60 - c/unit-test/test_send_template_request.c | 70 - ...st_send_template_request_all_of_currency.c | 60 - ...t_send_template_request_all_of_date_time.c | 64 - ...plate_request_all_of_date_time_component.c | 70 - ...late_request_all_of_date_time_unix_epoch.c | 58 - ...st_send_template_request_all_of_language.c | 60 - ...test_send_template_request_all_of_params.c | 66 - c/unit-test/test_set_commerce.c | 58 - c/unit-test/test_set_me.c | 58 - c/unit-test/test_set_me_request.c | 70 - c/unit-test/test_set_settings_200_response.c | 61 - ..._set_settings_200_response_all_of_update.c | 58 - c/unit-test/test_set_webhook_status.c | 60 - c/unit-test/test_settings.c | 58 - c/unit-test/test_template_category_prop.c | 56 - c/unit-test/test_template_components_prop.c | 56 - .../test_template_components_prop_inner.c | 66 - ...late_components_prop_inner_buttons_inner.c | 66 - c/unit-test/test_template_language_prop.c | 56 - c/unit-test/test_template_namespace_field.c | 58 - c/unit-test/test_upload_media.c | 58 - c/unit-test/test_webhook_url.c | 58 - cpp-restsdk/.gitignore | 29 - cpp-restsdk/.openapi-generator-ignore | 23 - cpp-restsdk/.openapi-generator/FILES | 163 - cpp-restsdk/.openapi-generator/VERSION | 1 - cpp-restsdk/CMakeLists.txt | 93 - cpp-restsdk/Config.cmake.in | 5 - cpp-restsdk/README.md | 59 - cpp-restsdk/git_push.sh | 57 - .../include/CppRestOpenAPIClient/ApiClient.h | 115 - .../CppRestOpenAPIClient/ApiConfiguration.h | 67 - .../CppRestOpenAPIClient/ApiException.h | 61 - .../CppRestOpenAPIClient/HttpContent.h | 70 - .../include/CppRestOpenAPIClient/IHttpBody.h | 43 - .../include/CppRestOpenAPIClient/JsonBody.h | 50 - .../include/CppRestOpenAPIClient/ModelBase.h | 343 -- .../CppRestOpenAPIClient/MultipartFormData.h | 62 - .../include/CppRestOpenAPIClient/Object.h | 63 - .../CppRestOpenAPIClient/api/ChannelApi.h | 146 - .../CppRestOpenAPIClient/api/MediaApi.h | 68 - .../CppRestOpenAPIClient/api/MessagingApi.h | 151 - .../api/ProductsCatalogsApi.h | 81 - .../CppRestOpenAPIClient/api/TemplatesApi.h | 102 - .../CppRestOpenAPIClient/api/WebhooksApi.h | 81 - .../include/CppRestOpenAPIClient/model/Ack.h | 100 - .../model/AddTemplateRequest.h | 114 - .../model/ChannelExtendedStatistics.h | 68 - .../model/ChannelExtendedStatistics_inner.h | 210 -- .../model/ChannelStatistics.h | 89 - .../model/ChannelStatus.h | 78 - .../CppRestOpenAPIClient/model/ChatIdProp.h | 78 - .../CppRestOpenAPIClient/model/Commerce.h | 79 - .../model/Commerce_params.h | 88 - .../CppRestOpenAPIClient/model/Contacts.h | 80 - .../model/ContactsRequest.h | 101 - .../model/Contacts_contacts_inner.h | 100 - .../CppRestOpenAPIClient/model/GetAckInfo.h | 80 - .../model/GetAckInfo_hooks_inner.h | 145 - .../CppRestOpenAPIClient/model/GetCommerce.h | 68 - .../model/GetCommerce_inner.h | 100 - .../CppRestOpenAPIClient/model/GetIP.h | 78 - .../CppRestOpenAPIClient/model/GetMe.h | 144 - .../model/GetMe_401_response.h | 78 - .../CppRestOpenAPIClient/model/GetMessages.h | 80 - .../model/GetMessages_messages_inner.h | 233 -- .../CppRestOpenAPIClient/model/GetTemplates.h | 91 - .../model/GetTemplates_templates_inner.h | 147 - .../CppRestOpenAPIClient/model/MeComponents.h | 144 - .../CppRestOpenAPIClient/model/MediaId.h | 78 - .../CppRestOpenAPIClient/model/Message.h | 199 -- .../model/MessageIdProp.h | 78 - .../CppRestOpenAPIClient/model/PhoneProp.h | 77 - .../model/ReadMessageRequest.h | 78 - .../model/RemoveTemplateRequest.h | 78 - .../model/SendContactRequest.h | 102 - .../model/SendFileRequest.h | 122 - .../model/SendListRequest.h | 147 - .../model/SendListRequest_allOf_rows.h | 100 - .../model/SendListRequest_allOf_sections.h | 92 - .../model/SendLocationRequest.h | 133 - .../model/SendMessageRequest.h | 100 - .../model/SendMessageStatus.h | 111 - .../model/SendProductRequest.h | 135 - .../model/SendProductRequest_allOf_action.h | 103 - ...roductRequest_allOf_action_product_items.h | 78 - ...SendProductRequest_allOf_action_sections.h | 92 - .../model/SendTemplateRequest.h | 138 - .../SendTemplateRequest_allOf_currency.h | 89 - .../SendTemplateRequest_allOf_date_time.h | 92 - ...emplateRequest_allOf_date_time_component.h | 144 - ...mplateRequest_allOf_date_time_unix_epoch.h | 77 - .../SendTemplateRequest_allOf_language.h | 90 - .../model/SendTemplateRequest_allOf_params.h | 104 - .../CppRestOpenAPIClient/model/SetCommerce.h | 77 - .../CppRestOpenAPIClient/model/SetMe.h | 78 - .../CppRestOpenAPIClient/model/SetMeRequest.h | 144 - .../model/SetSettings_200_response.h | 91 - .../SetSettings_200_response_allOf_update.h | 78 - .../model/SetWebhookStatus.h | 89 - .../CppRestOpenAPIClient/model/Settings.h | 78 - .../model/TemplateCategoryProp.h | 68 - .../model/TemplateComponentsProp.h | 68 - .../model/TemplateComponentsProp_inner.h | 126 - ...mplateComponentsProp_inner_buttons_inner.h | 124 - .../model/TemplateLanguageProp.h | 130 - .../model/TemplateNamespaceField.h | 78 - .../CppRestOpenAPIClient/model/UploadMedia.h | 78 - .../CppRestOpenAPIClient/model/WebhookUrl.h | 78 - cpp-restsdk/src/ApiClient.cpp | 209 -- cpp-restsdk/src/ApiConfiguration.cpp | 86 - cpp-restsdk/src/ApiException.cpp | 54 - cpp-restsdk/src/HttpContent.cpp | 87 - cpp-restsdk/src/JsonBody.cpp | 37 - cpp-restsdk/src/ModelBase.cpp | 666 ---- cpp-restsdk/src/MultipartFormData.cpp | 113 - cpp-restsdk/src/Object.cpp | 92 - cpp-restsdk/src/api/ChannelApi.cpp | 1266 ------- cpp-restsdk/src/api/MediaApi.cpp | 198 -- cpp-restsdk/src/api/MessagingApi.cpp | 1124 ------- cpp-restsdk/src/api/ProductsCatalogsApi.cpp | 352 -- cpp-restsdk/src/api/TemplatesApi.cpp | 636 ---- cpp-restsdk/src/api/WebhooksApi.cpp | 331 -- cpp-restsdk/src/model/Ack.cpp | 217 -- cpp-restsdk/src/model/AddTemplateRequest.cpp | 260 -- .../src/model/ChannelExtendedStatistics.cpp | 79 - .../model/ChannelExtendedStatistics_inner.cpp | 677 ---- cpp-restsdk/src/model/ChannelStatistics.cpp | 171 - cpp-restsdk/src/model/ChannelStatus.cpp | 125 - cpp-restsdk/src/model/ChatIdProp.cpp | 125 - cpp-restsdk/src/model/Commerce.cpp | 124 - cpp-restsdk/src/model/Commerce_params.cpp | 171 - cpp-restsdk/src/model/Contacts.cpp | 124 - cpp-restsdk/src/model/ContactsRequest.cpp | 216 -- .../src/model/Contacts_contacts_inner.cpp | 217 -- cpp-restsdk/src/model/GetAckInfo.cpp | 124 - .../src/model/GetAckInfo_hooks_inner.cpp | 399 --- cpp-restsdk/src/model/GetCommerce.cpp | 79 - cpp-restsdk/src/model/GetCommerce_inner.cpp | 217 -- cpp-restsdk/src/model/GetIP.cpp | 125 - cpp-restsdk/src/model/GetMe.cpp | 401 --- cpp-restsdk/src/model/GetMe_401_response.cpp | 125 - cpp-restsdk/src/model/GetMessages.cpp | 124 - .../src/model/GetMessages_messages_inner.cpp | 768 ----- cpp-restsdk/src/model/GetTemplates.cpp | 170 - .../model/GetTemplates_templates_inner.cpp | 398 --- cpp-restsdk/src/model/MeComponents.cpp | 401 --- cpp-restsdk/src/model/MediaId.cpp | 125 - cpp-restsdk/src/model/Message.cpp | 631 ---- cpp-restsdk/src/model/MessageIdProp.cpp | 125 - cpp-restsdk/src/model/PhoneProp.cpp | 125 - cpp-restsdk/src/model/ReadMessageRequest.cpp | 125 - .../src/model/RemoveTemplateRequest.cpp | 125 - cpp-restsdk/src/model/SendContactRequest.cpp | 216 -- cpp-restsdk/src/model/SendFileRequest.cpp | 309 -- cpp-restsdk/src/model/SendListRequest.cpp | 400 --- .../src/model/SendListRequest_allOf_rows.cpp | 217 -- .../model/SendListRequest_allOf_sections.cpp | 170 - cpp-restsdk/src/model/SendLocationRequest.cpp | 355 -- cpp-restsdk/src/model/SendMessageRequest.cpp | 217 -- cpp-restsdk/src/model/SendMessageStatus.cpp | 263 -- cpp-restsdk/src/model/SendProductRequest.cpp | 354 -- .../model/SendProductRequest_allOf_action.cpp | 216 -- ...ductRequest_allOf_action_product_items.cpp | 125 - ...ndProductRequest_allOf_action_sections.cpp | 170 - cpp-restsdk/src/model/SendTemplateRequest.cpp | 353 -- .../SendTemplateRequest_allOf_currency.cpp | 171 - .../SendTemplateRequest_allOf_date_time.cpp | 169 - ...plateRequest_allOf_date_time_component.cpp | 401 --- ...lateRequest_allOf_date_time_unix_epoch.cpp | 125 - .../SendTemplateRequest_allOf_language.cpp | 170 - .../SendTemplateRequest_allOf_params.cpp | 215 -- cpp-restsdk/src/model/SetCommerce.cpp | 125 - cpp-restsdk/src/model/SetMe.cpp | 125 - cpp-restsdk/src/model/SetMeRequest.cpp | 401 --- .../src/model/SetSettings_200_response.cpp | 170 - .../SetSettings_200_response_allOf_update.cpp | 125 - cpp-restsdk/src/model/SetWebhookStatus.cpp | 171 - cpp-restsdk/src/model/Settings.cpp | 125 - .../src/model/TemplateCategoryProp.cpp | 128 - .../src/model/TemplateComponentsProp.cpp | 79 - .../model/TemplateComponentsProp_inner.cpp | 307 -- ...lateComponentsProp_inner_buttons_inner.cpp | 308 -- .../src/model/TemplateLanguageProp.cpp | 376 --- .../src/model/TemplateNamespaceField.cpp | 125 - cpp-restsdk/src/model/UploadMedia.cpp | 125 - cpp-restsdk/src/model/WebhookUrl.cpp | 125 - csharp/.gitignore | 362 -- csharp/.openapi-generator-ignore | 23 - csharp/.openapi-generator/FILES | 165 - csharp/.openapi-generator/VERSION | 1 - csharp/OneMessage.io.sln | 27 - csharp/README.md | 198 -- csharp/api/openapi.yaml | 2474 -------------- csharp/appveyor.yml | 9 - csharp/docs/Ack.md | 12 - csharp/docs/AddTemplateRequest.md | 13 - csharp/docs/ChannelApi.md | 854 ----- csharp/docs/ChannelExtendedStatistics.md | 9 - csharp/docs/ChannelExtendedStatisticsInner.md | 22 - csharp/docs/ChannelStatistics.md | 11 - csharp/docs/ChannelStatus.md | 10 - csharp/docs/ChatIdProp.md | 10 - csharp/docs/Commerce.md | 10 - csharp/docs/CommerceParams.md | 11 - csharp/docs/Contacts.md | 10 - csharp/docs/ContactsContactsInner.md | 12 - csharp/docs/ContactsRequest.md | 12 - csharp/docs/GetAckInfo.md | 10 - csharp/docs/GetAckInfoHooksInner.md | 16 - csharp/docs/GetCommerce.md | 9 - csharp/docs/GetCommerceInner.md | 12 - csharp/docs/GetIP.md | 10 - csharp/docs/GetMe.md | 16 - csharp/docs/GetMe401Response.md | 10 - csharp/docs/GetMessages.md | 10 - csharp/docs/GetMessagesMessagesInner.md | 24 - csharp/docs/GetTemplates.md | 11 - csharp/docs/GetTemplatesTemplatesInner.md | 16 - csharp/docs/MeComponents.md | 16 - csharp/docs/MediaApi.md | 104 - csharp/docs/MediaId.md | 10 - csharp/docs/Message.md | 21 - csharp/docs/MessageIdProp.md | 10 - csharp/docs/MessagingApi.md | 698 ---- csharp/docs/PhoneProp.md | 10 - csharp/docs/ProductsCatalogsApi.md | 202 -- csharp/docs/ReadMessageRequest.md | 10 - csharp/docs/RemoveTemplateRequest.md | 10 - csharp/docs/SendContactRequest.md | 12 - csharp/docs/SendFileRequest.md | 14 - csharp/docs/SendListRequest.md | 16 - csharp/docs/SendListRequestAllOfRows.md | 12 - csharp/docs/SendListRequestAllOfSections.md | 11 - csharp/docs/SendLocationRequest.md | 15 - csharp/docs/SendMessageRequest.md | 12 - csharp/docs/SendMessageStatus.md | 13 - csharp/docs/SendProductRequest.md | 15 - csharp/docs/SendProductRequestAllOfAction.md | 13 - ...ndProductRequestAllOfActionProductItems.md | 10 - .../SendProductRequestAllOfActionSections.md | 11 - csharp/docs/SendTemplateRequest.md | 15 - .../docs/SendTemplateRequestAllOfCurrency.md | 11 - .../docs/SendTemplateRequestAllOfDateTime.md | 11 - ...ndTemplateRequestAllOfDateTimeComponent.md | 16 - ...ndTemplateRequestAllOfDateTimeUnixEpoch.md | 10 - .../docs/SendTemplateRequestAllOfLanguage.md | 12 - csharp/docs/SendTemplateRequestAllOfParams.md | 12 - csharp/docs/SetCommerce.md | 10 - csharp/docs/SetMe.md | 10 - csharp/docs/SetMeRequest.md | 16 - csharp/docs/SetSettings200Response.md | 11 - .../docs/SetSettings200ResponseAllOfUpdate.md | 10 - csharp/docs/SetWebhookStatus.md | 11 - csharp/docs/Settings.md | 10 - csharp/docs/TemplateCategoryProp.md | 10 - csharp/docs/TemplateComponentsProp.md | 10 - csharp/docs/TemplateComponentsPropInner.md | 14 - ...TemplateComponentsPropInnerButtonsInner.md | 14 - csharp/docs/TemplateLanguageProp.md | 10 - csharp/docs/TemplateNamespaceField.md | 10 - csharp/docs/TemplatesApi.md | 389 --- csharp/docs/UploadMedia.md | 10 - csharp/docs/WebhookUrl.md | 10 - csharp/docs/WebhooksApi.md | 200 -- csharp/git_push.sh | 57 - .../OneMessage.io.Test/Api/ChannelApiTests.cs | 160 - .../OneMessage.io.Test/Api/MediaApiTests.cs | 70 - .../Api/MessagingApiTests.cs | 149 - .../Api/ProductsCatalogsApiTests.cs | 82 - .../Api/TemplatesApiTests.cs | 105 - .../Api/WebhooksApiTests.cs | 82 - .../src/OneMessage.io.Test/Model/AckTests.cs | 85 - .../Model/AddTemplateRequestTests.cs | 94 - .../ChannelExtendedStatisticsInnerTests.cs | 175 - .../Model/ChannelExtendedStatisticsTests.cs | 58 - .../Model/ChannelStatisticsTests.cs | 76 - .../Model/ChannelStatusTests.cs | 67 - .../Model/ChatIdPropTests.cs | 67 - .../Model/CommerceParamsTests.cs | 76 - .../OneMessage.io.Test/Model/CommerceTests.cs | 67 - .../Model/ContactsContactsInnerTests.cs | 85 - .../Model/ContactsRequestTests.cs | 85 - .../OneMessage.io.Test/Model/ContactsTests.cs | 67 - .../Model/GetAckInfoHooksInnerTests.cs | 121 - .../Model/GetAckInfoTests.cs | 67 - .../Model/GetCommerceInnerTests.cs | 85 - .../Model/GetCommerceTests.cs | 58 - .../OneMessage.io.Test/Model/GetIPTests.cs | 67 - .../Model/GetMe401ResponseTests.cs | 67 - .../OneMessage.io.Test/Model/GetMeTests.cs | 121 - .../Model/GetMessagesMessagesInnerTests.cs | 193 -- .../Model/GetMessagesTests.cs | 67 - .../Model/GetTemplatesTemplatesInnerTests.cs | 121 - .../Model/GetTemplatesTests.cs | 76 - .../Model/MeComponentsTests.cs | 121 - .../OneMessage.io.Test/Model/MediaIdTests.cs | 67 - .../Model/MessageIdPropTests.cs | 67 - .../OneMessage.io.Test/Model/MessageTests.cs | 166 - .../Model/PhonePropTests.cs | 67 - .../Model/ReadMessageRequestTests.cs | 67 - .../Model/RemoveTemplateRequestTests.cs | 67 - .../Model/SendContactRequestTests.cs | 85 - .../Model/SendFileRequestTests.cs | 103 - .../Model/SendListRequestAllOfRowsTests.cs | 85 - .../SendListRequestAllOfSectionsTests.cs | 76 - .../Model/SendListRequestTests.cs | 121 - .../Model/SendLocationRequestTests.cs | 112 - .../Model/SendMessageRequestTests.cs | 85 - .../Model/SendMessageStatusTests.cs | 94 - ...ductRequestAllOfActionProductItemsTests.cs | 67 - ...dProductRequestAllOfActionSectionsTests.cs | 76 - .../SendProductRequestAllOfActionTests.cs | 85 - .../Model/SendProductRequestTests.cs | 112 - .../SendTemplateRequestAllOfCurrencyTests.cs | 76 - ...plateRequestAllOfDateTimeComponentTests.cs | 121 - .../SendTemplateRequestAllOfDateTimeTests.cs | 76 - ...plateRequestAllOfDateTimeUnixEpochTests.cs | 67 - .../SendTemplateRequestAllOfLanguageTests.cs | 76 - .../SendTemplateRequestAllOfParamsTests.cs | 85 - .../Model/SendTemplateRequestTests.cs | 112 - .../Model/SetCommerceTests.cs | 67 - .../Model/SetMeRequestTests.cs | 121 - .../OneMessage.io.Test/Model/SetMeTests.cs | 67 - .../SetSettings200ResponseAllOfUpdateTests.cs | 67 - .../Model/SetSettings200ResponseTests.cs | 76 - .../Model/SetWebhookStatusTests.cs | 76 - .../OneMessage.io.Test/Model/SettingsTests.cs | 67 - .../Model/TemplateCategoryPropTests.cs | 58 - ...ateComponentsPropInnerButtonsInnerTests.cs | 103 - .../Model/TemplateComponentsPropInnerTests.cs | 103 - .../Model/TemplateComponentsPropTests.cs | 58 - .../Model/TemplateLanguagePropTests.cs | 58 - .../Model/TemplateNamespaceFieldTests.cs | 67 - .../Model/UploadMediaTests.cs | 67 - .../Model/WebhookUrlTests.cs | 67 - .../OneMessage.io.Test.csproj | 19 - csharp/src/OneMessage.io/Api/ChannelApi.cs | 1845 ----------- csharp/src/OneMessage.io/Api/MediaApi.cs | 366 -- csharp/src/OneMessage.io/Api/MessagingApi.cs | 1686 ---------- .../OneMessage.io/Api/ProductsCatalogsApi.cs | 572 ---- csharp/src/OneMessage.io/Api/TemplatesApi.cs | 955 ------ csharp/src/OneMessage.io/Api/WebhooksApi.cs | 565 ---- csharp/src/OneMessage.io/Client/ApiClient.cs | 833 ----- .../src/OneMessage.io/Client/ApiException.cs | 69 - .../src/OneMessage.io/Client/ApiResponse.cs | 167 - .../src/OneMessage.io/Client/ClientUtils.cs | 248 -- .../src/OneMessage.io/Client/Configuration.cs | 635 ---- .../OneMessage.io/Client/ExceptionFactory.cs | 23 - .../Client/GlobalConfiguration.cs | 68 - csharp/src/OneMessage.io/Client/HttpMethod.cs | 34 - .../src/OneMessage.io/Client/IApiAccessor.cs | 38 - .../Client/IAsynchronousClient.cs | 101 - .../Client/IReadableConfiguration.cs | 142 - .../Client/ISynchronousClient.cs | 94 - csharp/src/OneMessage.io/Client/Multimap.cs | 296 -- .../Client/OpenAPIDateConverter.cs | 30 - .../OneMessage.io/Client/RequestOptions.cs | 85 - .../Client/RetryConfiguration.cs | 32 - .../Model/AbstractOpenAPISchema.cs | 77 - csharp/src/OneMessage.io/Model/Ack.cs | 193 -- .../OneMessage.io/Model/AddTemplateRequest.cs | 177 - .../Model/ChannelExtendedStatistics.cs | 123 - .../Model/ChannelExtendedStatisticsInner.cs | 310 -- .../OneMessage.io/Model/ChannelStatistics.cs | 145 - .../src/OneMessage.io/Model/ChannelStatus.cs | 165 - csharp/src/OneMessage.io/Model/ChatIdProp.cs | 131 - csharp/src/OneMessage.io/Model/Commerce.cs | 129 - .../src/OneMessage.io/Model/CommerceParams.cs | 146 - csharp/src/OneMessage.io/Model/Contacts.cs | 131 - .../Model/ContactsContactsInner.cs | 171 - .../OneMessage.io/Model/ContactsRequest.cs | 178 - csharp/src/OneMessage.io/Model/GetAckInfo.cs | 130 - .../Model/GetAckInfoHooksInner.cs | 244 -- csharp/src/OneMessage.io/Model/GetCommerce.cs | 123 - .../OneMessage.io/Model/GetCommerceInner.cs | 160 - csharp/src/OneMessage.io/Model/GetIP.cs | 130 - csharp/src/OneMessage.io/Model/GetMe.cs | 362 -- .../OneMessage.io/Model/GetMe401Response.cs | 130 - csharp/src/OneMessage.io/Model/GetMessages.cs | 130 - .../Model/GetMessagesMessagesInner.cs | 374 --- .../src/OneMessage.io/Model/GetTemplates.cs | 145 - .../Model/GetTemplatesTemplatesInner.cs | 234 -- .../src/OneMessage.io/Model/MeComponents.cs | 362 -- csharp/src/OneMessage.io/Model/MediaId.cs | 130 - csharp/src/OneMessage.io/Model/Message.cs | 387 --- .../src/OneMessage.io/Model/MessageIdProp.cs | 131 - csharp/src/OneMessage.io/Model/PhoneProp.cs | 127 - .../OneMessage.io/Model/ReadMessageRequest.cs | 131 - .../Model/RemoveTemplateRequest.cs | 131 - .../OneMessage.io/Model/SendContactRequest.cs | 168 - .../OneMessage.io/Model/SendFileRequest.cs | 219 -- .../OneMessage.io/Model/SendListRequest.cs | 268 -- .../Model/SendListRequestAllOfRows.cs | 186 -- .../Model/SendListRequestAllOfSections.cs | 160 - .../Model/SendLocationRequest.cs | 242 -- .../OneMessage.io/Model/SendMessageRequest.cs | 176 - .../OneMessage.io/Model/SendMessageStatus.cs | 186 -- .../OneMessage.io/Model/SendProductRequest.cs | 235 -- .../Model/SendProductRequestAllOfAction.cs | 170 - ...ndProductRequestAllOfActionProductItems.cs | 131 - .../SendProductRequestAllOfActionSections.cs | 150 - .../Model/SendTemplateRequest.cs | 245 -- .../Model/SendTemplateRequestAllOfCurrency.cs | 145 - .../Model/SendTemplateRequestAllOfDateTime.cs | 147 - ...ndTemplateRequestAllOfDateTimeComponent.cs | 326 -- ...ndTemplateRequestAllOfDateTimeUnixEpoch.cs | 126 - .../Model/SendTemplateRequestAllOfLanguage.cs | 153 - .../Model/SendTemplateRequestAllOfParams.cs | 166 - csharp/src/OneMessage.io/Model/SetCommerce.cs | 126 - csharp/src/OneMessage.io/Model/SetMe.cs | 130 - .../src/OneMessage.io/Model/SetMeRequest.cs | 362 -- .../Model/SetSettings200Response.cs | 158 - .../SetSettings200ResponseAllOfUpdate.cs | 130 - .../OneMessage.io/Model/SetWebhookStatus.cs | 146 - csharp/src/OneMessage.io/Model/Settings.cs | 130 - .../Model/TemplateCategoryProp.cs | 55 - .../Model/TemplateComponentsProp.cs | 123 - .../Model/TemplateComponentsPropInner.cs | 261 -- ...TemplateComponentsPropInnerButtonsInner.cs | 227 -- .../Model/TemplateLanguageProp.cs | 427 --- .../Model/TemplateNamespaceField.cs | 130 - csharp/src/OneMessage.io/Model/UploadMedia.cs | 140 - csharp/src/OneMessage.io/Model/WebhookUrl.cs | 140 - csharp/src/OneMessage.io/OneMessage.io.csproj | 42 - csharp/src/OneMessage.io/README.md | 198 -- java/.github/workflows/maven.yml | 30 - java/.gitignore | 21 - java/.openapi-generator-ignore | 23 - java/.openapi-generator/FILES | 174 - java/.openapi-generator/VERSION | 1 - java/.travis.yml | 22 - java/README.md | 247 -- java/api/openapi.yaml | 2514 -------------- java/build.gradle | 168 - java/build.sbt | 28 - java/docs/Ack.md | 25 - java/docs/AddTemplateRequest.md | 16 - java/docs/ChannelApi.md | 620 ---- java/docs/ChannelExtendedStatistics.md | 12 - java/docs/ChannelExtendedStatisticsInner.md | 25 - java/docs/ChannelStatistics.md | 14 - java/docs/ChannelStatus.md | 25 - java/docs/ChatIdProp.md | 13 - java/docs/Commerce.md | 13 - java/docs/CommerceParams.md | 14 - java/docs/Contacts.md | 13 - java/docs/ContactsContactsInner.md | 15 - java/docs/ContactsRequest.md | 15 - java/docs/GetAckInfo.md | 13 - java/docs/GetAckInfoHooksInner.md | 19 - java/docs/GetCommerce.md | 12 - java/docs/GetCommerceInner.md | 15 - java/docs/GetIP.md | 13 - java/docs/GetMe.md | 44 - java/docs/GetMe401Response.md | 13 - java/docs/GetMessages.md | 13 - java/docs/GetMessagesMessagesInner.md | 27 - java/docs/GetTemplates.md | 14 - java/docs/GetTemplatesTemplatesInner.md | 19 - java/docs/MeComponents.md | 44 - java/docs/MediaApi.md | 78 - java/docs/MediaId.md | 13 - java/docs/Message.md | 39 - java/docs/MessageIdProp.md | 13 - java/docs/MessagingApi.md | 514 --- java/docs/PhoneProp.md | 13 - java/docs/ProductsCatalogsApi.md | 149 - java/docs/ReadMessageRequest.md | 13 - java/docs/RemoveTemplateRequest.md | 13 - java/docs/SendContactRequest.md | 15 - java/docs/SendFileRequest.md | 17 - java/docs/SendListRequest.md | 19 - java/docs/SendListRequestAllOfRows.md | 15 - java/docs/SendListRequestAllOfSections.md | 14 - java/docs/SendLocationRequest.md | 18 - java/docs/SendMessageRequest.md | 15 - java/docs/SendMessageStatus.md | 16 - java/docs/SendProductRequest.md | 18 - java/docs/SendProductRequestAllOfAction.md | 16 - ...ndProductRequestAllOfActionProductItems.md | 13 - .../SendProductRequestAllOfActionSections.md | 14 - java/docs/SendTemplateRequest.md | 18 - java/docs/SendTemplateRequestAllOfCurrency.md | 14 - java/docs/SendTemplateRequestAllOfDateTime.md | 14 - ...ndTemplateRequestAllOfDateTimeComponent.md | 49 - ...ndTemplateRequestAllOfDateTimeUnixEpoch.md | 13 - java/docs/SendTemplateRequestAllOfLanguage.md | 23 - java/docs/SendTemplateRequestAllOfParams.md | 15 - java/docs/SetCommerce.md | 13 - java/docs/SetMe.md | 13 - java/docs/SetMeRequest.md | 44 - java/docs/SetSettings200Response.md | 14 - .../docs/SetSettings200ResponseAllOfUpdate.md | 13 - java/docs/SetWebhookStatus.md | 14 - java/docs/Settings.md | 13 - java/docs/TemplateCategoryProp.md | 15 - java/docs/TemplateComponentsProp.md | 13 - java/docs/TemplateComponentsPropInner.md | 39 - ...TemplateComponentsPropInnerButtonsInner.md | 27 - java/docs/TemplateLanguageProp.md | 139 - java/docs/TemplateNamespaceField.md | 13 - java/docs/TemplatesApi.md | 285 -- java/docs/UploadMedia.md | 13 - java/docs/WebhookUrl.md | 13 - java/docs/WebhooksApi.md | 149 - java/git_push.sh | 57 - java/gradle.properties | 6 - java/gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 0 bytes java/gradle/wrapper/gradle-wrapper.properties | 5 - java/gradlew | 234 -- java/gradlew.bat | 89 - java/pom.xml | 352 -- java/settings.gradle | 1 - java/src/main/AndroidManifest.xml | 3 - .../org/openapitools/client/ApiCallback.java | 62 - .../org/openapitools/client/ApiClient.java | 1569 --------- .../org/openapitools/client/ApiException.java | 165 - .../org/openapitools/client/ApiResponse.java | 76 - .../openapitools/client/Configuration.java | 41 - .../client/GzipRequestInterceptor.java | 85 - .../java/org/openapitools/client/JSON.java | 462 --- .../java/org/openapitools/client/Pair.java | 57 - .../client/ProgressRequestBody.java | 73 - .../client/ProgressResponseBody.java | 70 - .../client/ServerConfiguration.java | 58 - .../openapitools/client/ServerVariable.java | 23 - .../org/openapitools/client/StringUtil.java | 83 - .../openapitools/client/api/ChannelApi.java | 1156 ------- .../org/openapitools/client/api/MediaApi.java | 200 -- .../openapitools/client/api/MessagingApi.java | 1008 ------ .../client/api/ProductsCatalogsApi.java | 331 -- .../openapitools/client/api/TemplatesApi.java | 570 ---- .../openapitools/client/api/WebhooksApi.java | 332 -- .../openapitools/client/auth/ApiKeyAuth.java | 80 - .../client/auth/Authentication.java | 36 - .../client/auth/HttpBasicAuth.java | 57 - .../client/auth/HttpBearerAuth.java | 63 - .../client/model/AbstractOpenApiSchema.java | 148 - .../org/openapitools/client/model/Ack.java | 319 -- .../client/model/AddTemplateRequest.java | 295 -- .../model/ChannelExtendedStatistics.java | 173 - .../model/ChannelExtendedStatisticsInner.java | 545 --- .../client/model/ChannelStatistics.java | 237 -- .../client/model/ChannelStatus.java | 261 -- .../openapitools/client/model/ChatIdProp.java | 208 -- .../openapitools/client/model/Commerce.java | 210 -- .../client/model/CommerceParams.java | 242 -- .../openapitools/client/model/Contacts.java | 230 -- .../client/model/ContactsContactsInner.java | 270 -- .../client/model/ContactsRequest.java | 288 -- .../openapitools/client/model/GetAckInfo.java | 230 -- .../client/model/GetAckInfoHooksInner.java | 388 --- .../client/model/GetCommerce.java | 173 - .../client/model/GetCommerceInner.java | 264 -- .../org/openapitools/client/model/GetIP.java | 208 -- .../org/openapitools/client/model/GetMe.java | 473 --- .../client/model/GetMe401Response.java | 208 -- .../client/model/GetMessages.java | 230 -- .../model/GetMessagesMessagesInner.java | 624 ---- .../client/model/GetTemplates.java | 258 -- .../model/GetTemplatesTemplatesInner.java | 388 --- .../client/model/MeComponents.java | 473 --- .../openapitools/client/model/MediaId.java | 208 -- .../openapitools/client/model/Message.java | 596 ---- .../client/model/MessageIdProp.java | 208 -- .../openapitools/client/model/PhoneProp.java | 205 -- .../client/model/ReadMessageRequest.java | 208 -- .../client/model/RemoveTemplateRequest.java | 208 -- .../client/model/SendContactRequest.java | 278 -- .../client/model/SendFileRequest.java | 338 -- .../client/model/SendListRequest.java | 419 --- .../model/SendListRequestAllOfRows.java | 279 -- .../model/SendListRequestAllOfSections.java | 265 -- .../client/model/SendLocationRequest.java | 369 --- .../client/model/SendMessageRequest.java | 275 -- .../client/model/SendMessageStatus.java | 298 -- .../client/model/SendProductRequest.java | 368 --- .../model/SendProductRequestAllOfAction.java | 292 -- ...ProductRequestAllOfActionProductItems.java | 208 -- ...SendProductRequestAllOfActionSections.java | 261 -- .../client/model/SendTemplateRequest.java | 392 --- .../SendTemplateRequestAllOfCurrency.java | 236 -- .../SendTemplateRequestAllOfDateTime.java | 243 -- ...TemplateRequestAllOfDateTimeComponent.java | 497 --- ...TemplateRequestAllOfDateTimeUnixEpoch.java | 205 -- .../SendTemplateRequestAllOfLanguage.java | 282 -- .../model/SendTemplateRequestAllOfParams.java | 274 -- .../client/model/SetCommerce.java | 205 -- .../org/openapitools/client/model/SetMe.java | 208 -- .../client/model/SetMeRequest.java | 473 --- .../client/model/SetSettings200Response.java | 259 -- .../SetSettings200ResponseAllOfUpdate.java | 220 -- .../client/model/SetWebhookStatus.java | 236 -- .../openapitools/client/model/Settings.java | 220 -- .../client/model/TemplateCategoryProp.java | 74 - .../client/model/TemplateComponentsProp.java | 173 - .../model/TemplateComponentsPropInner.java | 453 --- ...mplateComponentsPropInnerButtonsInner.java | 392 --- .../client/model/TemplateLanguageProp.java | 198 -- .../client/model/TemplateNamespaceField.java | 208 -- .../client/model/UploadMedia.java | 216 -- .../openapitools/client/model/WebhookUrl.java | 216 -- .../client/api/ChannelApiTest.java | 164 - .../openapitools/client/api/MediaApiTest.java | 49 - .../client/api/MessagingApiTest.java | 148 - .../client/api/ProductsCatalogsApiTest.java | 66 - .../client/api/TemplatesApiTest.java | 95 - .../client/api/WebhooksApiTest.java | 65 - .../openapitools/client/model/AckTest.java | 64 - .../client/model/AddTemplateRequestTest.java | 75 - .../ChannelExtendedStatisticsInnerTest.java | 145 - .../model/ChannelExtendedStatisticsTest.java | 36 - .../client/model/ChannelStatisticsTest.java | 57 - .../client/model/ChannelStatusTest.java | 48 - .../client/model/ChatIdPropTest.java | 48 - .../client/model/CommerceParamsTest.java | 56 - .../client/model/CommerceTest.java | 49 - .../model/ContactsContactsInnerTest.java | 64 - .../client/model/ContactsRequestTest.java | 66 - .../client/model/ContactsTest.java | 51 - .../model/GetAckInfoHooksInnerTest.java | 96 - .../client/model/GetAckInfoTest.java | 51 - .../client/model/GetCommerceInnerTest.java | 64 - .../client/model/GetCommerceTest.java | 36 - .../openapitools/client/model/GetIPTest.java | 48 - .../client/model/GetMe401ResponseTest.java | 48 - .../openapitools/client/model/GetMeTest.java | 96 - .../model/GetMessagesMessagesInnerTest.java | 160 - .../client/model/GetMessagesTest.java | 51 - .../model/GetTemplatesTemplatesInnerTest.java | 99 - .../client/model/GetTemplatesTest.java | 59 - .../client/model/MeComponentsTest.java | 96 - .../client/model/MediaIdTest.java | 48 - .../client/model/MessageIdPropTest.java | 48 - .../client/model/MessageTest.java | 136 - .../client/model/PhonePropTest.java | 48 - .../client/model/ReadMessageRequestTest.java | 48 - .../model/RemoveTemplateRequestTest.java | 48 - .../client/model/SendContactRequestTest.java | 66 - .../client/model/SendFileRequestTest.java | 80 - .../model/SendListRequestAllOfRowsTest.java | 64 - .../SendListRequestAllOfSectionsTest.java | 59 - .../client/model/SendListRequestTest.java | 99 - .../client/model/SendLocationRequestTest.java | 88 - .../client/model/SendMessageRequestTest.java | 64 - .../client/model/SendMessageStatusTest.java | 72 - ...uctRequestAllOfActionProductItemsTest.java | 48 - ...ProductRequestAllOfActionSectionsTest.java | 59 - .../SendProductRequestAllOfActionTest.java | 67 - .../client/model/SendProductRequestTest.java | 89 - .../SendTemplateRequestAllOfCurrencyTest.java | 56 - ...lateRequestAllOfDateTimeComponentTest.java | 96 - .../SendTemplateRequestAllOfDateTimeTest.java | 58 - ...lateRequestAllOfDateTimeUnixEpochTest.java | 48 - .../SendTemplateRequestAllOfLanguageTest.java | 57 - .../SendTemplateRequestAllOfParamsTest.java | 66 - .../client/model/SendTemplateRequestTest.java | 92 - .../client/model/SetCommerceTest.java | 48 - .../client/model/SetMeRequestTest.java | 96 - .../openapitools/client/model/SetMeTest.java | 48 - ...SetSettings200ResponseAllOfUpdateTest.java | 49 - .../model/SetSettings200ResponseTest.java | 58 - .../client/model/SetWebhookStatusTest.java | 56 - .../client/model/SettingsTest.java | 49 - .../model/TemplateCategoryPropTest.java | 32 - ...teComponentsPropInnerButtonsInnerTest.java | 82 - .../TemplateComponentsPropInnerTest.java | 83 - .../model/TemplateComponentsPropTest.java | 36 - .../model/TemplateLanguagePropTest.java | 32 - .../model/TemplateNamespaceFieldTest.java | 48 - .../client/model/UploadMediaTest.java | 48 - .../client/model/WebhookUrlTest.java | 48 - js/.babelrc | 44 - js/.gitignore | 130 - js/.openapi-generator-ignore | 23 - js/.openapi-generator/FILES | 149 - js/.openapi-generator/VERSION | 1 - js/.travis.yml | 5 - js/README.md | 233 -- js/docs/Ack.md | 24 - js/docs/AddTemplateRequest.md | 12 - js/docs/ChannelApi.md | 445 --- js/docs/ChannelExtendedStatistics.md | 8 - js/docs/ChannelExtendedStatisticsInner.md | 21 - js/docs/ChannelStatistics.md | 10 - js/docs/ChannelStatus.md | 26 - js/docs/ChatIdProp.md | 9 - js/docs/Commerce.md | 9 - js/docs/CommerceParams.md | 10 - js/docs/Contacts.md | 9 - js/docs/ContactsContactsInner.md | 11 - js/docs/ContactsRequest.md | 11 - js/docs/GetAckInfo.md | 9 - js/docs/GetAckInfoHooksInner.md | 15 - js/docs/GetCommerce.md | 8 - js/docs/GetCommerceInner.md | 11 - js/docs/GetIP.md | 9 - js/docs/GetMe.md | 56 - js/docs/GetMe401Response.md | 9 - js/docs/GetMessages.md | 9 - js/docs/GetMessagesMessagesInner.md | 23 - js/docs/GetTemplates.md | 10 - js/docs/GetTemplatesTemplatesInner.md | 15 - js/docs/MeComponents.md | 56 - js/docs/MediaApi.md | 59 - js/docs/MediaId.md | 9 - js/docs/Message.md | 43 - js/docs/MessageIdProp.md | 9 - js/docs/MessagingApi.md | 383 --- js/docs/PhoneProp.md | 9 - js/docs/ProductsCatalogsApi.md | 110 - js/docs/ReadMessageRequest.md | 9 - js/docs/RemoveTemplateRequest.md | 9 - js/docs/SendContactRequest.md | 11 - js/docs/SendFileRequest.md | 13 - js/docs/SendListRequest.md | 15 - js/docs/SendListRequestAllOfRows.md | 11 - js/docs/SendListRequestAllOfSections.md | 10 - js/docs/SendLocationRequest.md | 14 - js/docs/SendMessageRequest.md | 11 - js/docs/SendMessageStatus.md | 12 - js/docs/SendProductRequest.md | 14 - js/docs/SendProductRequestAllOfAction.md | 11 - ...ndProductRequestAllOfActionProductItems.md | 9 - .../SendProductRequestAllOfActionSections.md | 10 - js/docs/SendTemplateRequest.md | 14 - js/docs/SendTemplateRequestAllOfCurrency.md | 10 - js/docs/SendTemplateRequestAllOfDateTime.md | 10 - ...ndTemplateRequestAllOfDateTimeComponent.md | 61 - ...ndTemplateRequestAllOfDateTimeUnixEpoch.md | 9 - js/docs/SendTemplateRequestAllOfLanguage.md | 19 - js/docs/SendTemplateRequestAllOfParams.md | 11 - js/docs/SetCommerce.md | 9 - js/docs/SetMe.md | 9 - js/docs/SetMeRequest.md | 56 - js/docs/SetSettings200Response.md | 10 - js/docs/SetSettings200ResponseAllOfUpdate.md | 9 - js/docs/SetWebhookStatus.md | 10 - js/docs/Settings.md | 9 - js/docs/TemplateCategoryProp.md | 12 - js/docs/TemplateComponentsProp.md | 8 - js/docs/TemplateComponentsPropInner.md | 43 - ...TemplateComponentsPropInnerButtonsInner.md | 26 - js/docs/TemplateLanguageProp.md | 136 - js/docs/TemplateNamespaceField.md | 9 - js/docs/TemplatesApi.md | 208 -- js/docs/UploadMedia.md | 9 - js/docs/WebhookUrl.md | 9 - js/docs/WebhooksApi.md | 110 - js/git_push.sh | 57 - js/mocha.opts | 1 - js/package.json | 46 - js/src/ApiClient.js | 707 ---- js/src/api/ChannelApi.js | 435 --- js/src/api/MediaApi.js | 86 - js/src/api/MessagingApi.js | 396 --- js/src/api/ProductsCatalogsApi.js | 136 - js/src/api/TemplatesApi.js | 226 -- js/src/api/WebhooksApi.js | 136 - js/src/index.js | 545 --- js/src/model/Ack.js | 141 - js/src/model/AddTemplateRequest.js | 115 - js/src/model/ChannelExtendedStatistics.js | 82 - .../model/ChannelExtendedStatisticsInner.js | 183 - js/src/model/ChannelStatistics.js | 95 - js/src/model/ChannelStatus.js | 127 - js/src/model/ChatIdProp.js | 88 - js/src/model/Commerce.js | 88 - js/src/model/CommerceParams.js | 101 - js/src/model/Contacts.js | 95 - js/src/model/ContactsContactsInner.js | 114 - js/src/model/ContactsRequest.js | 118 - js/src/model/GetAckInfo.js | 94 - js/src/model/GetAckInfoHooksInner.js | 151 - js/src/model/GetCommerce.js | 82 - js/src/model/GetCommerceInner.js | 103 - js/src/model/GetIP.js | 87 - js/src/model/GetMe.js | 315 -- js/src/model/GetMe401Response.js | 87 - js/src/model/GetMessages.js | 94 - js/src/model/GetMessagesMessagesInner.js | 231 -- js/src/model/GetTemplates.js | 102 - js/src/model/GetTemplatesTemplatesInner.js | 151 - js/src/model/MeComponents.js | 277 -- js/src/model/MediaId.js | 87 - js/src/model/Message.js | 272 -- js/src/model/MessageIdProp.js | 88 - js/src/model/PhoneProp.js | 84 - js/src/model/ReadMessageRequest.js | 97 - js/src/model/RemoveTemplateRequest.js | 88 - js/src/model/SendContactRequest.js | 128 - js/src/model/SendFileRequest.js | 164 - js/src/model/SendListRequest.js | 199 -- js/src/model/SendListRequestAllOfRows.js | 124 - js/src/model/SendListRequestAllOfSections.js | 115 - js/src/model/SendLocationRequest.js | 177 - js/src/model/SendMessageRequest.js | 136 - js/src/model/SendMessageStatus.js | 122 - js/src/model/SendProductRequest.js | 175 - js/src/model/SendProductRequestAllOfAction.js | 121 - ...ndProductRequestAllOfActionProductItems.js | 88 - .../SendProductRequestAllOfActionSections.js | 107 - js/src/model/SendTemplateRequest.js | 194 -- .../model/SendTemplateRequestAllOfCurrency.js | 95 - .../model/SendTemplateRequestAllOfDateTime.js | 101 - ...ndTemplateRequestAllOfDateTimeComponent.js | 253 -- ...ndTemplateRequestAllOfDateTimeUnixEpoch.js | 83 - .../model/SendTemplateRequestAllOfLanguage.js | 112 - .../model/SendTemplateRequestAllOfParams.js | 113 - js/src/model/SetCommerce.js | 83 - js/src/model/SetMe.js | 87 - js/src/model/SetMeRequest.js | 316 -- js/src/model/SetSettings200Response.js | 116 - .../SetSettings200ResponseAllOfUpdate.js | 95 - js/src/model/SetWebhookStatus.js | 96 - js/src/model/Settings.js | 87 - js/src/model/TemplateCategoryProp.js | 53 - js/src/model/TemplateComponentsProp.js | 83 - js/src/model/TemplateComponentsPropInner.js | 205 -- ...TemplateComponentsPropInnerButtonsInner.js | 162 - js/src/model/TemplateLanguageProp.js | 487 --- js/src/model/TemplateNamespaceField.js | 87 - js/src/model/UploadMedia.js | 96 - js/src/model/WebhookUrl.js | 96 - js/test/api/ChannelApi.spec.js | 143 - js/test/api/MediaApi.spec.js | 63 - js/test/api/MessagingApi.spec.js | 123 - js/test/api/ProductsCatalogsApi.spec.js | 73 - js/test/api/TemplatesApi.spec.js | 93 - js/test/api/WebhooksApi.spec.js | 73 - js/test/model/Ack.spec.js | 77 - js/test/model/AddTemplateRequest.spec.js | 83 - .../model/ChannelExtendedStatistics.spec.js | 59 - .../ChannelExtendedStatisticsInner.spec.js | 137 - js/test/model/ChannelStatistics.spec.js | 71 - js/test/model/ChannelStatus.spec.js | 65 - js/test/model/ChatIdProp.spec.js | 65 - js/test/model/Commerce.spec.js | 65 - js/test/model/CommerceParams.spec.js | 71 - js/test/model/Contacts.spec.js | 65 - js/test/model/ContactsContactsInner.spec.js | 77 - js/test/model/ContactsRequest.spec.js | 77 - js/test/model/GetAckInfo.spec.js | 65 - js/test/model/GetAckInfoHooksInner.spec.js | 101 - js/test/model/GetCommerce.spec.js | 59 - js/test/model/GetCommerceInner.spec.js | 77 - js/test/model/GetIP.spec.js | 65 - js/test/model/GetMe.spec.js | 101 - js/test/model/GetMe401Response.spec.js | 65 - js/test/model/GetMessages.spec.js | 65 - .../model/GetMessagesMessagesInner.spec.js | 149 - js/test/model/GetTemplates.spec.js | 71 - .../model/GetTemplatesTemplatesInner.spec.js | 101 - js/test/model/MeComponents.spec.js | 101 - js/test/model/MediaId.spec.js | 65 - js/test/model/Message.spec.js | 131 - js/test/model/MessageIdProp.spec.js | 65 - js/test/model/PhoneProp.spec.js | 65 - js/test/model/ReadMessageRequest.spec.js | 65 - js/test/model/RemoveTemplateRequest.spec.js | 65 - js/test/model/SendContactRequest.spec.js | 77 - js/test/model/SendFileRequest.spec.js | 89 - js/test/model/SendListRequest.spec.js | 101 - .../model/SendListRequestAllOfRows.spec.js | 77 - .../SendListRequestAllOfSections.spec.js | 71 - js/test/model/SendLocationRequest.spec.js | 95 - js/test/model/SendMessageRequest.spec.js | 77 - js/test/model/SendMessageStatus.spec.js | 83 - js/test/model/SendProductRequest.spec.js | 95 - .../SendProductRequestAllOfAction.spec.js | 77 - ...ductRequestAllOfActionProductItems.spec.js | 65 - ...dProductRequestAllOfActionSections.spec.js | 71 - js/test/model/SendTemplateRequest.spec.js | 95 - .../SendTemplateRequestAllOfCurrency.spec.js | 71 - .../SendTemplateRequestAllOfDateTime.spec.js | 71 - ...plateRequestAllOfDateTimeComponent.spec.js | 101 - ...plateRequestAllOfDateTimeUnixEpoch.spec.js | 65 - .../SendTemplateRequestAllOfLanguage.spec.js | 71 - .../SendTemplateRequestAllOfParams.spec.js | 77 - js/test/model/SetCommerce.spec.js | 65 - js/test/model/SetMe.spec.js | 65 - js/test/model/SetMeRequest.spec.js | 101 - js/test/model/SetSettings200Response.spec.js | 71 - .../SetSettings200ResponseAllOfUpdate.spec.js | 65 - js/test/model/SetWebhookStatus.spec.js | 71 - js/test/model/Settings.spec.js | 65 - js/test/model/TemplateCategoryProp.spec.js | 58 - js/test/model/TemplateComponentsProp.spec.js | 59 - .../model/TemplateComponentsPropInner.spec.js | 89 - ...ateComponentsPropInnerButtonsInner.spec.js | 89 - js/test/model/TemplateLanguageProp.spec.js | 58 - js/test/model/TemplateNamespaceField.spec.js | 65 - js/test/model/UploadMedia.spec.js | 65 - js/test/model/WebhookUrl.spec.js | 65 - php/README.md | 5 - python/.github/workflows/python.yml | 38 - python/.gitignore | 66 - python/.gitlab-ci.yml | 31 - python/.openapi-generator-ignore | 23 - python/.openapi-generator/FILES | 162 - python/.openapi-generator/VERSION | 1 - python/.travis.yml | 17 - python/README.md | 219 -- python/docs/Ack.md | 30 - python/docs/AddTemplateRequest.md | 31 - python/docs/ChannelApi.md | 703 ---- python/docs/ChannelExtendedStatistics.md | 27 - python/docs/ChannelExtendedStatisticsInner.md | 40 - python/docs/ChannelStatistics.md | 29 - python/docs/ChannelStatus.md | 28 - python/docs/ChatIdProp.md | 28 - python/docs/Commerce.md | 28 - python/docs/CommerceParams.md | 29 - python/docs/Contacts.md | 28 - python/docs/ContactsContactsInner.md | 30 - python/docs/ContactsRequest.md | 30 - python/docs/GetAckInfo.md | 28 - python/docs/GetAckInfoHooksInner.md | 34 - python/docs/GetCommerce.md | 27 - python/docs/GetCommerceInner.md | 30 - python/docs/GetIP.md | 28 - python/docs/GetMe.md | 34 - python/docs/GetMe401Response.md | 28 - python/docs/GetMessages.md | 28 - python/docs/GetMessagesMessagesInner.md | 42 - python/docs/GetTemplates.md | 29 - python/docs/GetTemplatesTemplatesInner.md | 34 - python/docs/MeComponents.md | 34 - python/docs/MediaApi.md | 88 - python/docs/MediaId.md | 28 - python/docs/Message.md | 39 - python/docs/MessageIdProp.md | 28 - python/docs/MessagingApi.md | 583 ---- python/docs/PhoneProp.md | 28 - python/docs/ProductsCatalogsApi.md | 169 - python/docs/ReadMessageRequest.md | 28 - python/docs/RemoveTemplateRequest.md | 28 - python/docs/SendContactRequest.md | 30 - python/docs/SendFileRequest.md | 32 - python/docs/SendListRequest.md | 34 - python/docs/SendListRequestAllOfRows.md | 30 - python/docs/SendListRequestAllOfSections.md | 29 - python/docs/SendLocationRequest.md | 33 - python/docs/SendMessageRequest.md | 30 - python/docs/SendMessageStatus.md | 31 - python/docs/SendProductRequest.md | 33 - python/docs/SendProductRequestAllOfAction.md | 31 - ...ndProductRequestAllOfActionProductItems.md | 28 - .../SendProductRequestAllOfActionSections.md | 29 - python/docs/SendTemplateRequest.md | 33 - .../docs/SendTemplateRequestAllOfCurrency.md | 29 - .../docs/SendTemplateRequestAllOfDateTime.md | 29 - ...ndTemplateRequestAllOfDateTimeComponent.md | 34 - ...ndTemplateRequestAllOfDateTimeUnixEpoch.md | 28 - .../docs/SendTemplateRequestAllOfLanguage.md | 30 - python/docs/SendTemplateRequestAllOfParams.md | 30 - python/docs/SetCommerce.md | 28 - python/docs/SetMe.md | 28 - python/docs/SetMeRequest.md | 34 - python/docs/SetSettings200Response.md | 29 - .../docs/SetSettings200ResponseAllOfUpdate.md | 28 - python/docs/SetWebhookStatus.md | 29 - python/docs/Settings.md | 28 - python/docs/TemplateCategoryProp.md | 11 - python/docs/TemplateComponentsProp.md | 28 - python/docs/TemplateComponentsPropInner.md | 32 - ...TemplateComponentsPropInnerButtonsInner.md | 32 - python/docs/TemplateLanguageProp.md | 11 - python/docs/TemplateNamespaceField.md | 28 - python/docs/TemplatesApi.md | 323 -- python/docs/UploadMedia.md | 28 - python/docs/WebhookUrl.md | 28 - python/docs/WebhooksApi.md | 168 - python/git_push.sh | 57 - python/one_msg_waba_sdk/__init__.py | 103 - python/one_msg_waba_sdk/api/__init__.py | 9 - python/one_msg_waba_sdk/api/channel_api.py | 1288 -------- python/one_msg_waba_sdk/api/media_api.py | 190 -- python/one_msg_waba_sdk/api/messaging_api.py | 1135 ------- .../api/products_catalogs_api.py | 340 -- python/one_msg_waba_sdk/api/templates_api.py | 623 ---- python/one_msg_waba_sdk/api/webhooks_api.py | 335 -- python/one_msg_waba_sdk/api_client.py | 758 ----- python/one_msg_waba_sdk/api_response.py | 25 - python/one_msg_waba_sdk/configuration.py | 479 --- python/one_msg_waba_sdk/exceptions.py | 167 - python/one_msg_waba_sdk/models/__init__.py | 81 - python/one_msg_waba_sdk/models/ack.py | 86 - .../models/add_template_request.py | 83 - .../models/channel_extended_statistics.py | 68 - .../channel_extended_statistics_inner.py | 96 - .../models/channel_statistics.py | 74 - .../one_msg_waba_sdk/models/channel_status.py | 82 - .../one_msg_waba_sdk/models/chat_id_prop.py | 72 - python/one_msg_waba_sdk/models/commerce.py | 75 - .../models/commerce_params.py | 74 - python/one_msg_waba_sdk/models/contacts.py | 80 - .../models/contacts_contacts_inner.py | 76 - .../models/contacts_request.py | 76 - .../one_msg_waba_sdk/models/get_ack_info.py | 79 - .../models/get_ack_info_hooks_inner.py | 84 - .../one_msg_waba_sdk/models/get_commerce.py | 68 - .../models/get_commerce_inner.py | 76 - python/one_msg_waba_sdk/models/get_ip.py | 72 - python/one_msg_waba_sdk/models/get_me.py | 94 - .../models/get_me401_response.py | 72 - .../one_msg_waba_sdk/models/get_messages.py | 79 - .../models/get_messages_messages_inner.py | 100 - .../one_msg_waba_sdk/models/get_templates.py | 81 - .../models/get_templates_templates_inner.py | 90 - .../one_msg_waba_sdk/models/me_components.py | 94 - python/one_msg_waba_sdk/models/media_id.py | 72 - python/one_msg_waba_sdk/models/message.py | 104 - .../models/message_id_prop.py | 72 - python/one_msg_waba_sdk/models/phone_prop.py | 72 - .../models/read_message_request.py | 72 - .../models/remove_template_request.py | 72 - .../models/send_contact_request.py | 76 - .../models/send_file_request.py | 80 - .../models/send_list_request.py | 96 - .../models/send_list_request_all_of_rows.py | 76 - .../send_list_request_all_of_sections.py | 82 - .../models/send_location_request.py | 82 - .../models/send_message_request.py | 76 - .../models/send_message_status.py | 78 - .../models/send_product_request.py | 89 - .../send_product_request_all_of_action.py | 83 - ...uct_request_all_of_action_product_items.py | 72 - ..._product_request_all_of_action_sections.py | 82 - .../models/send_template_request.py | 95 - .../send_template_request_all_of_currency.py | 74 - .../send_template_request_all_of_date_time.py | 81 - ...late_request_all_of_date_time_component.py | 104 - ...ate_request_all_of_date_time_unix_epoch.py | 72 - .../send_template_request_all_of_language.py | 84 - .../send_template_request_all_of_params.py | 83 - .../one_msg_waba_sdk/models/set_commerce.py | 72 - python/one_msg_waba_sdk/models/set_me.py | 72 - .../one_msg_waba_sdk/models/set_me_request.py | 94 - .../models/set_settings200_response.py | 82 - .../set_settings200_response_all_of_update.py | 77 - .../models/set_webhook_status.py | 74 - python/one_msg_waba_sdk/models/settings.py | 77 - .../models/template_category_prop.py | 42 - .../models/template_components_prop.py | 68 - .../models/template_components_prop_inner.py | 107 - ...ate_components_prop_inner_buttons_inner.py | 90 - .../models/template_language_prop.py | 104 - .../models/template_namespace_field.py | 72 - .../one_msg_waba_sdk/models/upload_media.py | 72 - python/one_msg_waba_sdk/models/webhook_url.py | 72 - python/one_msg_waba_sdk/py.typed | 0 python/one_msg_waba_sdk/rest.py | 303 -- python/pyproject.toml | 30 - python/requirements.txt | 5 - python/setup.cfg | 2 - python/setup.py | 50 - python/test-requirements.txt | 3 - python/test/__init__.py | 0 python/test/test_ack.py | 57 - python/test/test_add_template_request.py | 74 - python/test/test_channel_api.py | 95 - .../test/test_channel_extended_statistics.py | 54 - .../test_channel_extended_statistics_inner.py | 67 - python/test/test_channel_statistics.py | 56 - python/test/test_channel_status.py | 55 - python/test/test_chat_id_prop.py | 55 - python/test/test_commerce.py | 57 - python/test/test_commerce_params.py | 58 - python/test/test_contacts.py | 60 - python/test/test_contacts_contacts_inner.py | 57 - python/test/test_contacts_request.py | 58 - python/test/test_get_ack_info.py | 64 - python/test/test_get_ack_info_hooks_inner.py | 61 - python/test/test_get_commerce.py | 54 - python/test/test_get_commerce_inner.py | 57 - python/test/test_get_ip.py | 55 - python/test/test_get_me.py | 61 - python/test/test_get_me401_response.py | 55 - python/test/test_get_messages.py | 72 - .../test/test_get_messages_messages_inner.py | 69 - python/test/test_get_templates.py | 81 - .../test_get_templates_templates_inner.py | 77 - python/test/test_me_components.py | 61 - python/test/test_media_api.py | 39 - python/test/test_media_id.py | 55 - python/test/test_message.py | 66 - python/test/test_message_id_prop.py | 55 - python/test/test_messaging_api.py | 81 - python/test/test_phone_prop.py | 55 - python/test/test_products_catalogs_api.py | 46 - python/test/test_read_message_request.py | 55 - python/test/test_remove_template_request.py | 55 - python/test/test_send_contact_request.py | 57 - python/test/test_send_file_request.py | 61 - python/test/test_send_list_request.py | 64 - .../test_send_list_request_all_of_rows.py | 59 - .../test_send_list_request_all_of_sections.py | 67 - python/test/test_send_location_request.py | 62 - python/test/test_send_message_request.py | 58 - python/test/test_send_message_status.py | 58 - python/test/test_send_product_request.py | 61 - ...test_send_product_request_all_of_action.py | 64 - ...uct_request_all_of_action_product_items.py | 55 - ..._product_request_all_of_action_sections.py | 59 - python/test/test_send_template_request.py | 84 - ...t_send_template_request_all_of_currency.py | 56 - ..._send_template_request_all_of_date_time.py | 64 - ...late_request_all_of_date_time_component.py | 61 - ...ate_request_all_of_date_time_unix_epoch.py | 55 - ...t_send_template_request_all_of_language.py | 56 - ...est_send_template_request_all_of_params.py | 69 - python/test/test_set_commerce.py | 55 - python/test/test_set_me.py | 55 - python/test/test_set_me_request.py | 61 - python/test/test_set_settings200_response.py | 57 - ..._set_settings200_response_all_of_update.py | 55 - python/test/test_set_webhook_status.py | 56 - python/test/test_settings.py | 55 - python/test/test_template_category_prop.py | 37 - python/test/test_template_components_prop.py | 54 - .../test_template_components_prop_inner.py | 68 - ...ate_components_prop_inner_buttons_inner.py | 61 - python/test/test_template_language_prop.py | 37 - python/test/test_template_namespace_field.py | 55 - python/test/test_templates_api.py | 60 - python/test/test_upload_media.py | 56 - python/test/test_webhook_url.py | 56 - python/test/test_webhooks_api.py | 46 - python/tox.ini | 9 - swagger.waba.json | 2670 --------------- typescript-fetch/.openapi-generator-ignore | 23 - typescript-fetch/.openapi-generator/FILES | 76 - typescript-fetch/.openapi-generator/VERSION | 1 - typescript-fetch/README.md | 71 - typescript-fetch/apis/ChannelApi.ts | 378 --- typescript-fetch/apis/MediaApi.ts | 76 - typescript-fetch/apis/MessagingApi.ts | 386 --- typescript-fetch/apis/ProductsCatalogsApi.ts | 128 - typescript-fetch/apis/TemplatesApi.ts | 209 -- typescript-fetch/apis/WebhooksApi.ts | 126 - typescript-fetch/apis/index.ts | 8 - typescript-fetch/models/Ack.ts | 93 - typescript-fetch/models/AddTemplateRequest.ts | 108 - .../models/ChannelExtendedStatistics.ts | 51 - .../models/ChannelExtendedStatisticsInner.ts | 161 - typescript-fetch/models/ChannelStatistics.ts | 73 - typescript-fetch/models/ChannelStatus.ts | 79 - typescript-fetch/models/Commerce.ts | 72 - typescript-fetch/models/CommerceParams.ts | 75 - typescript-fetch/models/Contacts.ts | 72 - .../models/ContactsContactsInner.ts | 89 - typescript-fetch/models/ContactsRequest.ts | 94 - typescript-fetch/models/GetAckInfo.ts | 72 - .../models/GetAckInfoHooksInner.ts | 113 - typescript-fetch/models/GetCommerce.ts | 51 - typescript-fetch/models/GetCommerceInner.ts | 81 - typescript-fetch/models/GetIP.ts | 65 - typescript-fetch/models/GetMe.ts | 140 - typescript-fetch/models/GetMe401Response.ts | 65 - typescript-fetch/models/GetMessages.ts | 72 - .../models/GetMessagesMessagesInner.ts | 177 - typescript-fetch/models/GetTemplates.ts | 80 - .../models/GetTemplatesTemplatesInner.ts | 132 - typescript-fetch/models/MeComponents.ts | 146 - typescript-fetch/models/MediaId.ts | 65 - typescript-fetch/models/Message.ts | 170 - typescript-fetch/models/ReadMessageRequest.ts | 65 - .../models/RemoveTemplateRequest.ts | 65 - typescript-fetch/models/SendContactRequest.ts | 153 - typescript-fetch/models/SendFileRequest.ts | 113 - typescript-fetch/models/SendListRequest.ts | 153 - .../models/SendListRequestAllOfRows.ts | 83 - .../models/SendListRequestAllOfSections.ts | 81 - .../models/SendLocationRequest.ts | 115 - typescript-fetch/models/SendMessageRequest.ts | 90 - typescript-fetch/models/SendMessageStatus.ts | 89 - typescript-fetch/models/SendProductRequest.ts | 123 - .../models/SendProductRequestAllOfAction.ts | 96 - ...ndProductRequestAllOfActionProductItems.ts | 65 - .../SendProductRequestAllOfActionSections.ts | 80 - .../models/SendTemplateRequest.ts | 173 - .../SendTemplateRequestAllOfCurrency.ts | 73 - .../SendTemplateRequestAllOfDateTime.ts | 86 - ...ndTemplateRequestAllOfDateTimeComponent.ts | 145 - ...ndTemplateRequestAllOfDateTimeUnixEpoch.ts | 65 - .../SendTemplateRequestAllOfLanguage.ts | 94 - .../models/SendTemplateRequestAllOfParams.ts | 94 - typescript-fetch/models/SetCommerce.ts | 65 - typescript-fetch/models/SetMe.ts | 65 - typescript-fetch/models/SetMeRequest.ts | 146 - .../models/SetSettings200Response.ts | 81 - .../SetSettings200ResponseAllOfUpdate.ts | 65 - typescript-fetch/models/SetWebhookStatus.ts | 73 - typescript-fetch/models/Settings.ts | 65 - .../models/TemplateCategoryProp.ts | 39 - .../models/TemplateComponentsProp.ts | 51 - .../models/TemplateComponentsPropInner.ts | 128 - ...TemplateComponentsPropInnerButtonsInner.ts | 109 - .../models/TemplateLanguageProp.ts | 101 - typescript-fetch/models/UploadMedia.ts | 72 - typescript-fetch/models/WebhookUrl.ts | 66 - typescript-fetch/models/index.ts | 59 - typescript-fetch/openapitools.json | 7 - typescript-fetch/package-lock.json | 36 - typescript-fetch/package.json | 19 - typescript-fetch/runtime.ts | 434 --- typescript-fetch/src/apis/ChannelApi.ts | 378 --- typescript-fetch/src/apis/MediaApi.ts | 76 - typescript-fetch/src/apis/MessagingApi.ts | 386 --- .../src/apis/ProductsCatalogsApi.ts | 128 - typescript-fetch/src/apis/TemplatesApi.ts | 209 -- typescript-fetch/src/apis/WebhooksApi.ts | 126 - typescript-fetch/src/apis/index.ts | 8 - typescript-fetch/src/index.ts | 5 - typescript-fetch/src/models/Ack.ts | 93 - .../src/models/AddTemplateRequest.ts | 108 - .../models/ChannelExtendedStatisticsInner.ts | 161 - .../src/models/ChannelStatistics.ts | 73 - typescript-fetch/src/models/ChannelStatus.ts | 79 - typescript-fetch/src/models/Commerce.ts | 72 - typescript-fetch/src/models/CommerceParams.ts | 75 - typescript-fetch/src/models/Contacts.ts | 72 - .../src/models/ContactsContactsInner.ts | 89 - .../src/models/ContactsRequest.ts | 94 - typescript-fetch/src/models/GetAckInfo.ts | 72 - .../src/models/GetAckInfoHooksInner.ts | 113 - .../src/models/GetCommerceInner.ts | 81 - typescript-fetch/src/models/GetIP.ts | 65 - typescript-fetch/src/models/GetMe.ts | 140 - .../src/models/GetMe401Response.ts | 65 - typescript-fetch/src/models/GetMessages.ts | 72 - .../src/models/GetMessagesMessagesInner.ts | 177 - typescript-fetch/src/models/GetTemplates.ts | 80 - .../src/models/GetTemplatesTemplatesInner.ts | 132 - typescript-fetch/src/models/MeComponents.ts | 146 - typescript-fetch/src/models/MediaId.ts | 65 - typescript-fetch/src/models/Message.ts | 170 - .../src/models/ReadMessageRequest.ts | 65 - .../src/models/RemoveTemplateRequest.ts | 65 - .../src/models/SendContactRequest.ts | 153 - .../src/models/SendFileRequest.ts | 113 - .../src/models/SendListRequest.ts | 153 - .../src/models/SendListRequestAllOfRows.ts | 83 - .../models/SendListRequestAllOfSections.ts | 81 - .../src/models/SendLocationRequest.ts | 116 - .../src/models/SendMessageRequest.ts | 90 - .../src/models/SendMessageStatus.ts | 89 - .../src/models/SendProductRequest.ts | 123 - .../models/SendProductRequestAllOfAction.ts | 96 - ...ndProductRequestAllOfActionProductItems.ts | 65 - .../SendProductRequestAllOfActionSections.ts | 80 - .../src/models/SendTemplateRequest.ts | 173 - .../SendTemplateRequestAllOfCurrency.ts | 73 - .../SendTemplateRequestAllOfDateTime.ts | 86 - ...ndTemplateRequestAllOfDateTimeComponent.ts | 145 - ...ndTemplateRequestAllOfDateTimeUnixEpoch.ts | 65 - .../SendTemplateRequestAllOfLanguage.ts | 94 - .../models/SendTemplateRequestAllOfParams.ts | 94 - typescript-fetch/src/models/SetCommerce.ts | 65 - typescript-fetch/src/models/SetMe.ts | 65 - typescript-fetch/src/models/SetMeRequest.ts | 146 - .../src/models/SetSettings200Response.ts | 81 - .../SetSettings200ResponseAllOfUpdate.ts | 65 - .../src/models/SetWebhookStatus.ts | 73 - typescript-fetch/src/models/Settings.ts | 65 - .../src/models/TemplateCategoryProp.ts | 39 - .../src/models/TemplateComponentsPropInner.ts | 128 - ...TemplateComponentsPropInnerButtonsInner.ts | 109 - .../src/models/TemplateLanguageProp.ts | 101 - typescript-fetch/src/models/UploadMedia.ts | 72 - typescript-fetch/src/models/WebhookUrl.ts | 66 - typescript-fetch/src/models/index.ts | 63 - typescript/.openapi-generator-ignore | 6 + typescript/LICENSE | 21 + typescript/README.md | 40 + typescript/jest.config.js | 8 + typescript/package.json | 47 + .../src/__tests__/chat-api-client.test.ts | 67 + .../src/__tests__/chat-api-config.test.ts | 48 + .../src/__tests__/fixtures/send-message.ts | 13 + typescript/src/chat-api-client.ts | 62 + typescript/src/chat-api-config.ts | 56 + .../src/generated}/.gitignore | 0 .../src/generated}/.npmignore | 0 .../src/generated}/.openapi-generator-ignore | 0 typescript/src/generated/README.md | 193 ++ .../generated/docs/CreateGroups200Response.md | 34 + .../docs/CreateReadMessage200Response.md | 34 + .../docs/CreateReadMessage401Response.md | 34 + .../docs/CreateReadMessageRequest.md | 34 + .../docs/DeleteFlowsFlowId200Response.md | 36 + .../docs/DeleteGroupsGroupId200Response.md | 36 + .../src/generated/docs/ErrorResponse.md | 35 + typescript/src/generated/docs/FlowsApi.md | 686 ++++ typescript/src/generated/docs/GroupsApi.md | 513 +++ .../generated/docs/ListFlows200Response.md | 42 + .../generated/docs/ListMessages200Response.md | 36 + .../docs/ListTemplates200Response.md | 38 + .../src/generated/docs/MessageSentResponse.md | 41 + typescript/src/generated/docs/MessagingApi.md | 1178 +++++++ .../docs/PatchFlowsFlowIdAssets200Response.md | 38 + typescript/src/generated/docs/ProfileApi.md | 82 + typescript/src/generated/docs/ProfileInfo.md | 49 + .../src/generated/docs/SendButtonRequest.md | 40 + .../docs/SendButtonRequestSectionsInner.md | 36 + .../SendButtonRequestSectionsInnerReply.md | 36 + .../generated/docs/SendCarouselRequest1.md | 42 + .../src/generated/docs/SendContactRequest.md | 36 + .../docs/SendContactRequestContactsInner.md | 46 + .../SendContactRequestContactsInnerName.md | 44 + .../SendContactRequestContactsInnerOrg.md | 38 + ...dContactRequestContactsInnerPhonesInner.md | 38 + .../src/generated/docs/SendFileRequest.md | 45 + .../src/generated/docs/SendFlowRequest1.md | 62 + .../generated/docs/SendFlowRequest1Header.md | 32 + .../generated/docs/SendFlowRequestHeader.md | 33 + .../src/generated/docs/SendListRequest.md | 42 + .../docs/SendListRequestSectionsInner.md | 36 + .../SendListRequestSectionsInnerRowsInner.md | 38 + .../generated/docs/SendLocationRequest1.md | 46 + .../docs/SendLocationRequestRequest.md | 36 + .../src/generated/docs/SendMessageRequest.md | 41 + .../src/generated/docs/SendReactionRequest.md | 38 + .../src/generated/docs/SendTemplateRequest.md | 42 + .../docs/SendTemplateRequestLanguage.md | 36 + .../src/generated/docs/SuccessResponse.md | 35 + typescript/src/generated/docs/TemplatesApi.md | 151 + typescript/src/generated/package.json | 21 + typescript/src/generated/src/apis/FlowsApi.ts | 902 +++++ .../src/generated/src/apis/GroupsApi.ts | 649 ++++ .../src/generated/src/apis/MessagingApi.ts | 1698 ++++++++++ .../src/generated/src/apis/ProfileApi.ts | 123 + .../src/generated/src/apis/TemplatesApi.ts | 205 ++ typescript/src/generated/src/apis/index.ts | 7 + .../src/generated/src}/index.ts | 0 .../src/models/CreateGroups200Response.ts | 68 + .../models/CreateReadMessage200Response.ts | 68 + .../models/CreateReadMessage401Response.ts | 65 + .../src/models/CreateReadMessageRequest.ts | 65 + .../models/DeleteFlowsFlowId200Response.ts | 76 + .../models/DeleteGroupsGroupId200Response.ts | 76 + .../src/generated/src/models/ErrorResponse.ts | 65 + .../src/models/ListFlows200Response.ts | 100 + .../src/models/ListMessages200Response.ts | 76 + .../src/models/ListTemplates200Response.ts | 84 + .../src/models/MessageSentResponse.ts | 92 + .../PatchFlowsFlowIdAssets200Response.ts | 84 + .../src/generated/src/models/ProfileInfo.ts | 150 + .../generated/src/models/SendButtonRequest.ts | 97 + .../models/SendButtonRequestSectionsInner.ts | 81 + .../SendButtonRequestSectionsInnerReply.ts | 73 + .../src/models/SendCarouselRequest1.ts | 98 + .../src/models/SendContactRequest.ts | 81 + .../models/SendContactRequestContactsInner.ts | 135 + .../SendContactRequestContactsInnerName.ts | 105 + .../SendContactRequestContactsInnerOrg.ts | 81 + ...dContactRequestContactsInnerPhonesInner.ts | 81 + .../generated/src/models/SendFileRequest.ts | 111 + .../generated/src/models/SendFlowRequest1.ts | 209 ++ .../src/models/SendFlowRequest1Header.ts | 49 + .../src/models/SendFlowRequestHeader.ts | 49 + .../generated/src/models/SendListRequest.ts | 105 + .../models/SendListRequestSectionsInner.ts | 81 + .../SendListRequestSectionsInnerRowsInner.ts | 81 + .../src/models/SendLocationRequest1.ts | 115 + .../src/models/SendLocationRequestRequest.ts | 73 + .../src/models/SendMessageRequest.ts | 90 + .../src/models/SendReactionRequest.ts | 81 + .../src/models/SendTemplateRequest.ts | 105 + .../src/models/SendTemplateRequestLanguage.ts | 73 + .../generated/src/models/SuccessResponse.ts | 68 + typescript/src/generated/src/models/index.ts | 38 + .../src/generated}/src/runtime.ts | 58 +- typescript/src/generated/tsconfig.esm.json | 7 + .../src/generated}/tsconfig.json | 6 +- typescript/src/index.ts | 24 + typescript/src/version.ts | 1 + typescript/tsconfig.build.json | 9 + typescript/tsconfig.json | 19 + 1654 files changed, 11546 insertions(+), 180863 deletions(-) rename c/external/cJSON.licence => LICENSE (86%) delete mode 100644 c/.openapi-generator/FILES delete mode 100644 c/.openapi-generator/VERSION delete mode 100644 c/CMakeLists.txt delete mode 100644 c/Packing.cmake delete mode 100644 c/README.md delete mode 100644 c/api/ChannelAPI.c delete mode 100644 c/api/ChannelAPI.h delete mode 100644 c/api/MediaAPI.c delete mode 100644 c/api/MediaAPI.h delete mode 100644 c/api/MessagingAPI.c delete mode 100644 c/api/MessagingAPI.h delete mode 100644 c/api/ProductsCatalogsAPI.c delete mode 100644 c/api/ProductsCatalogsAPI.h delete mode 100644 c/api/TemplatesAPI.c delete mode 100644 c/api/TemplatesAPI.h delete mode 100644 c/api/WebhooksAPI.c delete mode 100644 c/api/WebhooksAPI.h delete mode 100644 c/docs/ChannelAPI.md delete mode 100644 c/docs/MediaAPI.md delete mode 100644 c/docs/MessagingAPI.md delete mode 100644 c/docs/ProductsCatalogsAPI.md delete mode 100644 c/docs/TemplatesAPI.md delete mode 100644 c/docs/WebhooksAPI.md delete mode 100644 c/docs/ack.md delete mode 100644 c/docs/add_template_request.md delete mode 100644 c/docs/channel_extended_statistics.md delete mode 100644 c/docs/channel_extended_statistics_inner.md delete mode 100644 c/docs/channel_statistics.md delete mode 100644 c/docs/channel_status.md delete mode 100644 c/docs/chat_id_prop.md delete mode 100644 c/docs/commerce.md delete mode 100644 c/docs/commerce_params.md delete mode 100644 c/docs/contacts.md delete mode 100644 c/docs/contacts_contacts_inner.md delete mode 100644 c/docs/contacts_request.md delete mode 100644 c/docs/get_ack_info.md delete mode 100644 c/docs/get_ack_info_hooks_inner.md delete mode 100644 c/docs/get_commerce.md delete mode 100644 c/docs/get_commerce_inner.md delete mode 100644 c/docs/get_ip.md delete mode 100644 c/docs/get_me.md delete mode 100644 c/docs/get_me_401_response.md delete mode 100644 c/docs/get_messages.md delete mode 100644 c/docs/get_messages_messages_inner.md delete mode 100644 c/docs/get_templates.md delete mode 100644 c/docs/get_templates_templates_inner.md delete mode 100644 c/docs/me_components.md delete mode 100644 c/docs/media_id.md delete mode 100644 c/docs/message.md delete mode 100644 c/docs/message_id_prop.md delete mode 100644 c/docs/phone_prop.md delete mode 100644 c/docs/read_message_request.md delete mode 100644 c/docs/remove_template_request.md delete mode 100644 c/docs/send_contact_request.md delete mode 100644 c/docs/send_file_request.md delete mode 100644 c/docs/send_list_request.md delete mode 100644 c/docs/send_list_request_all_of_rows.md delete mode 100644 c/docs/send_list_request_all_of_sections.md delete mode 100644 c/docs/send_location_request.md delete mode 100644 c/docs/send_message_request.md delete mode 100644 c/docs/send_message_status.md delete mode 100644 c/docs/send_product_request.md delete mode 100644 c/docs/send_product_request_all_of_action.md delete mode 100644 c/docs/send_product_request_all_of_action_product_items.md delete mode 100644 c/docs/send_product_request_all_of_action_sections.md delete mode 100644 c/docs/send_template_request.md delete mode 100644 c/docs/send_template_request_all_of_currency.md delete mode 100644 c/docs/send_template_request_all_of_date_time.md delete mode 100644 c/docs/send_template_request_all_of_date_time_component.md delete mode 100644 c/docs/send_template_request_all_of_date_time_unix_epoch.md delete mode 100644 c/docs/send_template_request_all_of_language.md delete mode 100644 c/docs/send_template_request_all_of_params.md delete mode 100644 c/docs/set_commerce.md delete mode 100644 c/docs/set_me.md delete mode 100644 c/docs/set_me_request.md delete mode 100644 c/docs/set_settings_200_response.md delete mode 100644 c/docs/set_settings_200_response_all_of_update.md delete mode 100644 c/docs/set_webhook_status.md delete mode 100644 c/docs/settings.md delete mode 100644 c/docs/template_category_prop.md delete mode 100644 c/docs/template_components_prop.md delete mode 100644 c/docs/template_components_prop_inner.md delete mode 100644 c/docs/template_components_prop_inner_buttons_inner.md delete mode 100644 c/docs/template_language_prop.md delete mode 100644 c/docs/template_namespace_field.md delete mode 100644 c/docs/upload_media.md delete mode 100644 c/docs/webhook_url.md delete mode 100644 c/external/cJSON.c delete mode 100644 c/external/cJSON.h delete mode 100644 c/include/apiClient.h delete mode 100644 c/include/binary.h delete mode 100644 c/include/keyValuePair.h delete mode 100644 c/include/list.h delete mode 100644 c/libcurl.licence delete mode 100644 c/model/ack.c delete mode 100644 c/model/ack.h delete mode 100644 c/model/add_template_request.c delete mode 100644 c/model/add_template_request.h delete mode 100644 c/model/channel_extended_statistics.c delete mode 100644 c/model/channel_extended_statistics.h delete mode 100644 c/model/channel_extended_statistics_inner.c delete mode 100644 c/model/channel_extended_statistics_inner.h delete mode 100644 c/model/channel_statistics.c delete mode 100644 c/model/channel_statistics.h delete mode 100644 c/model/channel_status.c delete mode 100644 c/model/channel_status.h delete mode 100644 c/model/chat_id_prop.c delete mode 100644 c/model/chat_id_prop.h delete mode 100644 c/model/commerce.c delete mode 100644 c/model/commerce.h delete mode 100644 c/model/commerce_params.c delete mode 100644 c/model/commerce_params.h delete mode 100644 c/model/contacts.c delete mode 100644 c/model/contacts.h delete mode 100644 c/model/contacts_contacts_inner.c delete mode 100644 c/model/contacts_contacts_inner.h delete mode 100644 c/model/contacts_request.c delete mode 100644 c/model/contacts_request.h delete mode 100644 c/model/get_ack_info.c delete mode 100644 c/model/get_ack_info.h delete mode 100644 c/model/get_ack_info_hooks_inner.c delete mode 100644 c/model/get_ack_info_hooks_inner.h delete mode 100644 c/model/get_commerce.c delete mode 100644 c/model/get_commerce.h delete mode 100644 c/model/get_commerce_inner.c delete mode 100644 c/model/get_commerce_inner.h delete mode 100644 c/model/get_ip.c delete mode 100644 c/model/get_ip.h delete mode 100644 c/model/get_me.c delete mode 100644 c/model/get_me.h delete mode 100644 c/model/get_me_401_response.c delete mode 100644 c/model/get_me_401_response.h delete mode 100644 c/model/get_messages.c delete mode 100644 c/model/get_messages.h delete mode 100644 c/model/get_messages_messages_inner.c delete mode 100644 c/model/get_messages_messages_inner.h delete mode 100644 c/model/get_templates.c delete mode 100644 c/model/get_templates.h delete mode 100644 c/model/get_templates_templates_inner.c delete mode 100644 c/model/get_templates_templates_inner.h delete mode 100644 c/model/me_components.c delete mode 100644 c/model/me_components.h delete mode 100644 c/model/media_id.c delete mode 100644 c/model/media_id.h delete mode 100644 c/model/message.c delete mode 100644 c/model/message.h delete mode 100644 c/model/message_id_prop.c delete mode 100644 c/model/message_id_prop.h delete mode 100644 c/model/object.c delete mode 100644 c/model/object.h delete mode 100644 c/model/phone_prop.c delete mode 100644 c/model/phone_prop.h delete mode 100644 c/model/read_message_request.c delete mode 100644 c/model/read_message_request.h delete mode 100644 c/model/remove_template_request.c delete mode 100644 c/model/remove_template_request.h delete mode 100644 c/model/send_contact_request.c delete mode 100644 c/model/send_contact_request.h delete mode 100644 c/model/send_file_request.c delete mode 100644 c/model/send_file_request.h delete mode 100644 c/model/send_list_request.c delete mode 100644 c/model/send_list_request.h delete mode 100644 c/model/send_list_request_all_of_rows.c delete mode 100644 c/model/send_list_request_all_of_rows.h delete mode 100644 c/model/send_list_request_all_of_sections.c delete mode 100644 c/model/send_list_request_all_of_sections.h delete mode 100644 c/model/send_location_request.c delete mode 100644 c/model/send_location_request.h delete mode 100644 c/model/send_message_request.c delete mode 100644 c/model/send_message_request.h delete mode 100644 c/model/send_message_status.c delete mode 100644 c/model/send_message_status.h delete mode 100644 c/model/send_product_request.c delete mode 100644 c/model/send_product_request.h delete mode 100644 c/model/send_product_request_all_of_action.c delete mode 100644 c/model/send_product_request_all_of_action.h delete mode 100644 c/model/send_product_request_all_of_action_product_items.c delete mode 100644 c/model/send_product_request_all_of_action_product_items.h delete mode 100644 c/model/send_product_request_all_of_action_sections.c delete mode 100644 c/model/send_product_request_all_of_action_sections.h delete mode 100644 c/model/send_template_request.c delete mode 100644 c/model/send_template_request.h delete mode 100644 c/model/send_template_request_all_of_currency.c delete mode 100644 c/model/send_template_request_all_of_currency.h delete mode 100644 c/model/send_template_request_all_of_date_time.c delete mode 100644 c/model/send_template_request_all_of_date_time.h delete mode 100644 c/model/send_template_request_all_of_date_time_component.c delete mode 100644 c/model/send_template_request_all_of_date_time_component.h delete mode 100644 c/model/send_template_request_all_of_date_time_unix_epoch.c delete mode 100644 c/model/send_template_request_all_of_date_time_unix_epoch.h delete mode 100644 c/model/send_template_request_all_of_language.c delete mode 100644 c/model/send_template_request_all_of_language.h delete mode 100644 c/model/send_template_request_all_of_params.c delete mode 100644 c/model/send_template_request_all_of_params.h delete mode 100644 c/model/set_commerce.c delete mode 100644 c/model/set_commerce.h delete mode 100644 c/model/set_me.c delete mode 100644 c/model/set_me.h delete mode 100644 c/model/set_me_request.c delete mode 100644 c/model/set_me_request.h delete mode 100644 c/model/set_settings_200_response.c delete mode 100644 c/model/set_settings_200_response.h delete mode 100644 c/model/set_settings_200_response_all_of_update.c delete mode 100644 c/model/set_settings_200_response_all_of_update.h delete mode 100644 c/model/set_webhook_status.c delete mode 100644 c/model/set_webhook_status.h delete mode 100644 c/model/settings.c delete mode 100644 c/model/settings.h delete mode 100644 c/model/template_category_prop.c delete mode 100644 c/model/template_category_prop.h delete mode 100644 c/model/template_components_prop.c delete mode 100644 c/model/template_components_prop.h delete mode 100644 c/model/template_components_prop_inner.c delete mode 100644 c/model/template_components_prop_inner.h delete mode 100644 c/model/template_components_prop_inner_buttons_inner.c delete mode 100644 c/model/template_components_prop_inner_buttons_inner.h delete mode 100644 c/model/template_language_prop.c delete mode 100644 c/model/template_language_prop.h delete mode 100644 c/model/template_namespace_field.c delete mode 100644 c/model/template_namespace_field.h delete mode 100644 c/model/upload_media.c delete mode 100644 c/model/upload_media.h delete mode 100644 c/model/webhook_url.c delete mode 100644 c/model/webhook_url.h delete mode 100644 c/src/apiClient.c delete mode 100644 c/src/apiKey.c delete mode 100644 c/src/binary.c delete mode 100644 c/src/list.c delete mode 100644 c/uncrustify-rules.cfg delete mode 100644 c/unit-test/test_ack.c delete mode 100644 c/unit-test/test_add_template_request.c delete mode 100644 c/unit-test/test_channel_extended_statistics.c delete mode 100644 c/unit-test/test_channel_extended_statistics_inner.c delete mode 100644 c/unit-test/test_channel_statistics.c delete mode 100644 c/unit-test/test_channel_status.c delete mode 100644 c/unit-test/test_chat_id_prop.c delete mode 100644 c/unit-test/test_commerce.c delete mode 100644 c/unit-test/test_commerce_params.c delete mode 100644 c/unit-test/test_contacts.c delete mode 100644 c/unit-test/test_contacts_contacts_inner.c delete mode 100644 c/unit-test/test_contacts_request.c delete mode 100644 c/unit-test/test_get_ack_info.c delete mode 100644 c/unit-test/test_get_ack_info_hooks_inner.c delete mode 100644 c/unit-test/test_get_commerce.c delete mode 100644 c/unit-test/test_get_commerce_inner.c delete mode 100644 c/unit-test/test_get_ip.c delete mode 100644 c/unit-test/test_get_me.c delete mode 100644 c/unit-test/test_get_me_401_response.c delete mode 100644 c/unit-test/test_get_messages.c delete mode 100644 c/unit-test/test_get_messages_messages_inner.c delete mode 100644 c/unit-test/test_get_templates.c delete mode 100644 c/unit-test/test_get_templates_templates_inner.c delete mode 100644 c/unit-test/test_me_components.c delete mode 100644 c/unit-test/test_media_id.c delete mode 100644 c/unit-test/test_message.c delete mode 100644 c/unit-test/test_message_id_prop.c delete mode 100644 c/unit-test/test_phone_prop.c delete mode 100644 c/unit-test/test_read_message_request.c delete mode 100644 c/unit-test/test_remove_template_request.c delete mode 100644 c/unit-test/test_send_contact_request.c delete mode 100644 c/unit-test/test_send_file_request.c delete mode 100644 c/unit-test/test_send_list_request.c delete mode 100644 c/unit-test/test_send_list_request_all_of_rows.c delete mode 100644 c/unit-test/test_send_list_request_all_of_sections.c delete mode 100644 c/unit-test/test_send_location_request.c delete mode 100644 c/unit-test/test_send_message_request.c delete mode 100644 c/unit-test/test_send_message_status.c delete mode 100644 c/unit-test/test_send_product_request.c delete mode 100644 c/unit-test/test_send_product_request_all_of_action.c delete mode 100644 c/unit-test/test_send_product_request_all_of_action_product_items.c delete mode 100644 c/unit-test/test_send_product_request_all_of_action_sections.c delete mode 100644 c/unit-test/test_send_template_request.c delete mode 100644 c/unit-test/test_send_template_request_all_of_currency.c delete mode 100644 c/unit-test/test_send_template_request_all_of_date_time.c delete mode 100644 c/unit-test/test_send_template_request_all_of_date_time_component.c delete mode 100644 c/unit-test/test_send_template_request_all_of_date_time_unix_epoch.c delete mode 100644 c/unit-test/test_send_template_request_all_of_language.c delete mode 100644 c/unit-test/test_send_template_request_all_of_params.c delete mode 100644 c/unit-test/test_set_commerce.c delete mode 100644 c/unit-test/test_set_me.c delete mode 100644 c/unit-test/test_set_me_request.c delete mode 100644 c/unit-test/test_set_settings_200_response.c delete mode 100644 c/unit-test/test_set_settings_200_response_all_of_update.c delete mode 100644 c/unit-test/test_set_webhook_status.c delete mode 100644 c/unit-test/test_settings.c delete mode 100644 c/unit-test/test_template_category_prop.c delete mode 100644 c/unit-test/test_template_components_prop.c delete mode 100644 c/unit-test/test_template_components_prop_inner.c delete mode 100644 c/unit-test/test_template_components_prop_inner_buttons_inner.c delete mode 100644 c/unit-test/test_template_language_prop.c delete mode 100644 c/unit-test/test_template_namespace_field.c delete mode 100644 c/unit-test/test_upload_media.c delete mode 100644 c/unit-test/test_webhook_url.c delete mode 100644 cpp-restsdk/.gitignore delete mode 100644 cpp-restsdk/.openapi-generator-ignore delete mode 100644 cpp-restsdk/.openapi-generator/FILES delete mode 100644 cpp-restsdk/.openapi-generator/VERSION delete mode 100644 cpp-restsdk/CMakeLists.txt delete mode 100644 cpp-restsdk/Config.cmake.in delete mode 100644 cpp-restsdk/README.md delete mode 100644 cpp-restsdk/git_push.sh delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/ApiClient.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/ApiConfiguration.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/ApiException.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/HttpContent.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/IHttpBody.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/JsonBody.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/ModelBase.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/MultipartFormData.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/Object.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/api/ChannelApi.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/api/MediaApi.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/api/MessagingApi.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/api/ProductsCatalogsApi.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/api/TemplatesApi.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/api/WebhooksApi.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Ack.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/AddTemplateRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatistics.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatus.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ChatIdProp.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce_params.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ContactsRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts_contacts_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetIP.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe_401_response.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages_messages_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates_templates_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/MeComponents.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/MediaId.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Message.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/MessageIdProp.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/PhoneProp.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/ReadMessageRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/RemoveTemplateRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendContactRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendFileRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendLocationRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageStatus.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SetCommerce.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SetMe.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SetMeRequest.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/SetWebhookStatus.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/Settings.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateCategoryProp.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateLanguageProp.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateNamespaceField.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/UploadMedia.h delete mode 100644 cpp-restsdk/include/CppRestOpenAPIClient/model/WebhookUrl.h delete mode 100644 cpp-restsdk/src/ApiClient.cpp delete mode 100644 cpp-restsdk/src/ApiConfiguration.cpp delete mode 100644 cpp-restsdk/src/ApiException.cpp delete mode 100644 cpp-restsdk/src/HttpContent.cpp delete mode 100644 cpp-restsdk/src/JsonBody.cpp delete mode 100644 cpp-restsdk/src/ModelBase.cpp delete mode 100644 cpp-restsdk/src/MultipartFormData.cpp delete mode 100644 cpp-restsdk/src/Object.cpp delete mode 100644 cpp-restsdk/src/api/ChannelApi.cpp delete mode 100644 cpp-restsdk/src/api/MediaApi.cpp delete mode 100644 cpp-restsdk/src/api/MessagingApi.cpp delete mode 100644 cpp-restsdk/src/api/ProductsCatalogsApi.cpp delete mode 100644 cpp-restsdk/src/api/TemplatesApi.cpp delete mode 100644 cpp-restsdk/src/api/WebhooksApi.cpp delete mode 100644 cpp-restsdk/src/model/Ack.cpp delete mode 100644 cpp-restsdk/src/model/AddTemplateRequest.cpp delete mode 100644 cpp-restsdk/src/model/ChannelExtendedStatistics.cpp delete mode 100644 cpp-restsdk/src/model/ChannelExtendedStatistics_inner.cpp delete mode 100644 cpp-restsdk/src/model/ChannelStatistics.cpp delete mode 100644 cpp-restsdk/src/model/ChannelStatus.cpp delete mode 100644 cpp-restsdk/src/model/ChatIdProp.cpp delete mode 100644 cpp-restsdk/src/model/Commerce.cpp delete mode 100644 cpp-restsdk/src/model/Commerce_params.cpp delete mode 100644 cpp-restsdk/src/model/Contacts.cpp delete mode 100644 cpp-restsdk/src/model/ContactsRequest.cpp delete mode 100644 cpp-restsdk/src/model/Contacts_contacts_inner.cpp delete mode 100644 cpp-restsdk/src/model/GetAckInfo.cpp delete mode 100644 cpp-restsdk/src/model/GetAckInfo_hooks_inner.cpp delete mode 100644 cpp-restsdk/src/model/GetCommerce.cpp delete mode 100644 cpp-restsdk/src/model/GetCommerce_inner.cpp delete mode 100644 cpp-restsdk/src/model/GetIP.cpp delete mode 100644 cpp-restsdk/src/model/GetMe.cpp delete mode 100644 cpp-restsdk/src/model/GetMe_401_response.cpp delete mode 100644 cpp-restsdk/src/model/GetMessages.cpp delete mode 100644 cpp-restsdk/src/model/GetMessages_messages_inner.cpp delete mode 100644 cpp-restsdk/src/model/GetTemplates.cpp delete mode 100644 cpp-restsdk/src/model/GetTemplates_templates_inner.cpp delete mode 100644 cpp-restsdk/src/model/MeComponents.cpp delete mode 100644 cpp-restsdk/src/model/MediaId.cpp delete mode 100644 cpp-restsdk/src/model/Message.cpp delete mode 100644 cpp-restsdk/src/model/MessageIdProp.cpp delete mode 100644 cpp-restsdk/src/model/PhoneProp.cpp delete mode 100644 cpp-restsdk/src/model/ReadMessageRequest.cpp delete mode 100644 cpp-restsdk/src/model/RemoveTemplateRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendContactRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendFileRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendListRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendListRequest_allOf_rows.cpp delete mode 100644 cpp-restsdk/src/model/SendListRequest_allOf_sections.cpp delete mode 100644 cpp-restsdk/src/model/SendLocationRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendMessageRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendMessageStatus.cpp delete mode 100644 cpp-restsdk/src/model/SendProductRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendProductRequest_allOf_action.cpp delete mode 100644 cpp-restsdk/src/model/SendProductRequest_allOf_action_product_items.cpp delete mode 100644 cpp-restsdk/src/model/SendProductRequest_allOf_action_sections.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest_allOf_currency.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_component.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_unix_epoch.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest_allOf_language.cpp delete mode 100644 cpp-restsdk/src/model/SendTemplateRequest_allOf_params.cpp delete mode 100644 cpp-restsdk/src/model/SetCommerce.cpp delete mode 100644 cpp-restsdk/src/model/SetMe.cpp delete mode 100644 cpp-restsdk/src/model/SetMeRequest.cpp delete mode 100644 cpp-restsdk/src/model/SetSettings_200_response.cpp delete mode 100644 cpp-restsdk/src/model/SetSettings_200_response_allOf_update.cpp delete mode 100644 cpp-restsdk/src/model/SetWebhookStatus.cpp delete mode 100644 cpp-restsdk/src/model/Settings.cpp delete mode 100644 cpp-restsdk/src/model/TemplateCategoryProp.cpp delete mode 100644 cpp-restsdk/src/model/TemplateComponentsProp.cpp delete mode 100644 cpp-restsdk/src/model/TemplateComponentsProp_inner.cpp delete mode 100644 cpp-restsdk/src/model/TemplateComponentsProp_inner_buttons_inner.cpp delete mode 100644 cpp-restsdk/src/model/TemplateLanguageProp.cpp delete mode 100644 cpp-restsdk/src/model/TemplateNamespaceField.cpp delete mode 100644 cpp-restsdk/src/model/UploadMedia.cpp delete mode 100644 cpp-restsdk/src/model/WebhookUrl.cpp delete mode 100644 csharp/.gitignore delete mode 100644 csharp/.openapi-generator-ignore delete mode 100644 csharp/.openapi-generator/FILES delete mode 100644 csharp/.openapi-generator/VERSION delete mode 100644 csharp/OneMessage.io.sln delete mode 100644 csharp/README.md delete mode 100644 csharp/api/openapi.yaml delete mode 100644 csharp/appveyor.yml delete mode 100644 csharp/docs/Ack.md delete mode 100644 csharp/docs/AddTemplateRequest.md delete mode 100644 csharp/docs/ChannelApi.md delete mode 100644 csharp/docs/ChannelExtendedStatistics.md delete mode 100644 csharp/docs/ChannelExtendedStatisticsInner.md delete mode 100644 csharp/docs/ChannelStatistics.md delete mode 100644 csharp/docs/ChannelStatus.md delete mode 100644 csharp/docs/ChatIdProp.md delete mode 100644 csharp/docs/Commerce.md delete mode 100644 csharp/docs/CommerceParams.md delete mode 100644 csharp/docs/Contacts.md delete mode 100644 csharp/docs/ContactsContactsInner.md delete mode 100644 csharp/docs/ContactsRequest.md delete mode 100644 csharp/docs/GetAckInfo.md delete mode 100644 csharp/docs/GetAckInfoHooksInner.md delete mode 100644 csharp/docs/GetCommerce.md delete mode 100644 csharp/docs/GetCommerceInner.md delete mode 100644 csharp/docs/GetIP.md delete mode 100644 csharp/docs/GetMe.md delete mode 100644 csharp/docs/GetMe401Response.md delete mode 100644 csharp/docs/GetMessages.md delete mode 100644 csharp/docs/GetMessagesMessagesInner.md delete mode 100644 csharp/docs/GetTemplates.md delete mode 100644 csharp/docs/GetTemplatesTemplatesInner.md delete mode 100644 csharp/docs/MeComponents.md delete mode 100644 csharp/docs/MediaApi.md delete mode 100644 csharp/docs/MediaId.md delete mode 100644 csharp/docs/Message.md delete mode 100644 csharp/docs/MessageIdProp.md delete mode 100644 csharp/docs/MessagingApi.md delete mode 100644 csharp/docs/PhoneProp.md delete mode 100644 csharp/docs/ProductsCatalogsApi.md delete mode 100644 csharp/docs/ReadMessageRequest.md delete mode 100644 csharp/docs/RemoveTemplateRequest.md delete mode 100644 csharp/docs/SendContactRequest.md delete mode 100644 csharp/docs/SendFileRequest.md delete mode 100644 csharp/docs/SendListRequest.md delete mode 100644 csharp/docs/SendListRequestAllOfRows.md delete mode 100644 csharp/docs/SendListRequestAllOfSections.md delete mode 100644 csharp/docs/SendLocationRequest.md delete mode 100644 csharp/docs/SendMessageRequest.md delete mode 100644 csharp/docs/SendMessageStatus.md delete mode 100644 csharp/docs/SendProductRequest.md delete mode 100644 csharp/docs/SendProductRequestAllOfAction.md delete mode 100644 csharp/docs/SendProductRequestAllOfActionProductItems.md delete mode 100644 csharp/docs/SendProductRequestAllOfActionSections.md delete mode 100644 csharp/docs/SendTemplateRequest.md delete mode 100644 csharp/docs/SendTemplateRequestAllOfCurrency.md delete mode 100644 csharp/docs/SendTemplateRequestAllOfDateTime.md delete mode 100644 csharp/docs/SendTemplateRequestAllOfDateTimeComponent.md delete mode 100644 csharp/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md delete mode 100644 csharp/docs/SendTemplateRequestAllOfLanguage.md delete mode 100644 csharp/docs/SendTemplateRequestAllOfParams.md delete mode 100644 csharp/docs/SetCommerce.md delete mode 100644 csharp/docs/SetMe.md delete mode 100644 csharp/docs/SetMeRequest.md delete mode 100644 csharp/docs/SetSettings200Response.md delete mode 100644 csharp/docs/SetSettings200ResponseAllOfUpdate.md delete mode 100644 csharp/docs/SetWebhookStatus.md delete mode 100644 csharp/docs/Settings.md delete mode 100644 csharp/docs/TemplateCategoryProp.md delete mode 100644 csharp/docs/TemplateComponentsProp.md delete mode 100644 csharp/docs/TemplateComponentsPropInner.md delete mode 100644 csharp/docs/TemplateComponentsPropInnerButtonsInner.md delete mode 100644 csharp/docs/TemplateLanguageProp.md delete mode 100644 csharp/docs/TemplateNamespaceField.md delete mode 100644 csharp/docs/TemplatesApi.md delete mode 100644 csharp/docs/UploadMedia.md delete mode 100644 csharp/docs/WebhookUrl.md delete mode 100644 csharp/docs/WebhooksApi.md delete mode 100644 csharp/git_push.sh delete mode 100644 csharp/src/OneMessage.io.Test/Api/ChannelApiTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Api/MediaApiTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Api/MessagingApiTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Api/ProductsCatalogsApiTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Api/TemplatesApiTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Api/WebhooksApiTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/AckTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/AddTemplateRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ChannelStatisticsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ChannelStatusTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ChatIdPropTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/CommerceParamsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/CommerceTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ContactsContactsInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ContactsRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ContactsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetAckInfoHooksInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetAckInfoTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetCommerceInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetCommerceTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetIPTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetMe401ResponseTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetMeTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetMessagesMessagesInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetMessagesTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetTemplatesTemplatesInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/GetTemplatesTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/MeComponentsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/MediaIdTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/MessageIdPropTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/MessageTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/PhonePropTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/ReadMessageRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/RemoveTemplateRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendContactRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendFileRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfRowsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfSectionsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendListRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendLocationRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendMessageRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendMessageStatusTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionProductItemsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionSectionsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendProductRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfCurrencyTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeComponentTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeUnixEpochTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfLanguageTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfParamsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SendTemplateRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SetCommerceTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SetMeRequestTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SetMeTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseAllOfUpdateTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SetWebhookStatusTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/SettingsTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/TemplateCategoryPropTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerButtonsInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/TemplateLanguagePropTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/TemplateNamespaceFieldTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/UploadMediaTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/Model/WebhookUrlTests.cs delete mode 100644 csharp/src/OneMessage.io.Test/OneMessage.io.Test.csproj delete mode 100644 csharp/src/OneMessage.io/Api/ChannelApi.cs delete mode 100644 csharp/src/OneMessage.io/Api/MediaApi.cs delete mode 100644 csharp/src/OneMessage.io/Api/MessagingApi.cs delete mode 100644 csharp/src/OneMessage.io/Api/ProductsCatalogsApi.cs delete mode 100644 csharp/src/OneMessage.io/Api/TemplatesApi.cs delete mode 100644 csharp/src/OneMessage.io/Api/WebhooksApi.cs delete mode 100644 csharp/src/OneMessage.io/Client/ApiClient.cs delete mode 100644 csharp/src/OneMessage.io/Client/ApiException.cs delete mode 100644 csharp/src/OneMessage.io/Client/ApiResponse.cs delete mode 100644 csharp/src/OneMessage.io/Client/ClientUtils.cs delete mode 100644 csharp/src/OneMessage.io/Client/Configuration.cs delete mode 100644 csharp/src/OneMessage.io/Client/ExceptionFactory.cs delete mode 100644 csharp/src/OneMessage.io/Client/GlobalConfiguration.cs delete mode 100644 csharp/src/OneMessage.io/Client/HttpMethod.cs delete mode 100644 csharp/src/OneMessage.io/Client/IApiAccessor.cs delete mode 100644 csharp/src/OneMessage.io/Client/IAsynchronousClient.cs delete mode 100644 csharp/src/OneMessage.io/Client/IReadableConfiguration.cs delete mode 100644 csharp/src/OneMessage.io/Client/ISynchronousClient.cs delete mode 100644 csharp/src/OneMessage.io/Client/Multimap.cs delete mode 100644 csharp/src/OneMessage.io/Client/OpenAPIDateConverter.cs delete mode 100644 csharp/src/OneMessage.io/Client/RequestOptions.cs delete mode 100644 csharp/src/OneMessage.io/Client/RetryConfiguration.cs delete mode 100644 csharp/src/OneMessage.io/Model/AbstractOpenAPISchema.cs delete mode 100644 csharp/src/OneMessage.io/Model/Ack.cs delete mode 100644 csharp/src/OneMessage.io/Model/AddTemplateRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/ChannelExtendedStatistics.cs delete mode 100644 csharp/src/OneMessage.io/Model/ChannelExtendedStatisticsInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/ChannelStatistics.cs delete mode 100644 csharp/src/OneMessage.io/Model/ChannelStatus.cs delete mode 100644 csharp/src/OneMessage.io/Model/ChatIdProp.cs delete mode 100644 csharp/src/OneMessage.io/Model/Commerce.cs delete mode 100644 csharp/src/OneMessage.io/Model/CommerceParams.cs delete mode 100644 csharp/src/OneMessage.io/Model/Contacts.cs delete mode 100644 csharp/src/OneMessage.io/Model/ContactsContactsInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/ContactsRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetAckInfo.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetAckInfoHooksInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetCommerce.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetCommerceInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetIP.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetMe.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetMe401Response.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetMessages.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetMessagesMessagesInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetTemplates.cs delete mode 100644 csharp/src/OneMessage.io/Model/GetTemplatesTemplatesInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/MeComponents.cs delete mode 100644 csharp/src/OneMessage.io/Model/MediaId.cs delete mode 100644 csharp/src/OneMessage.io/Model/Message.cs delete mode 100644 csharp/src/OneMessage.io/Model/MessageIdProp.cs delete mode 100644 csharp/src/OneMessage.io/Model/PhoneProp.cs delete mode 100644 csharp/src/OneMessage.io/Model/ReadMessageRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/RemoveTemplateRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendContactRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendFileRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendListRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendListRequestAllOfRows.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendListRequestAllOfSections.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendLocationRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendMessageRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendMessageStatus.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendProductRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendProductRequestAllOfAction.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionProductItems.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionSections.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfCurrency.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTime.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeComponent.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeUnixEpoch.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfLanguage.cs delete mode 100644 csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfParams.cs delete mode 100644 csharp/src/OneMessage.io/Model/SetCommerce.cs delete mode 100644 csharp/src/OneMessage.io/Model/SetMe.cs delete mode 100644 csharp/src/OneMessage.io/Model/SetMeRequest.cs delete mode 100644 csharp/src/OneMessage.io/Model/SetSettings200Response.cs delete mode 100644 csharp/src/OneMessage.io/Model/SetSettings200ResponseAllOfUpdate.cs delete mode 100644 csharp/src/OneMessage.io/Model/SetWebhookStatus.cs delete mode 100644 csharp/src/OneMessage.io/Model/Settings.cs delete mode 100644 csharp/src/OneMessage.io/Model/TemplateCategoryProp.cs delete mode 100644 csharp/src/OneMessage.io/Model/TemplateComponentsProp.cs delete mode 100644 csharp/src/OneMessage.io/Model/TemplateComponentsPropInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/TemplateComponentsPropInnerButtonsInner.cs delete mode 100644 csharp/src/OneMessage.io/Model/TemplateLanguageProp.cs delete mode 100644 csharp/src/OneMessage.io/Model/TemplateNamespaceField.cs delete mode 100644 csharp/src/OneMessage.io/Model/UploadMedia.cs delete mode 100644 csharp/src/OneMessage.io/Model/WebhookUrl.cs delete mode 100644 csharp/src/OneMessage.io/OneMessage.io.csproj delete mode 100644 csharp/src/OneMessage.io/README.md delete mode 100644 java/.github/workflows/maven.yml delete mode 100644 java/.gitignore delete mode 100644 java/.openapi-generator-ignore delete mode 100644 java/.openapi-generator/FILES delete mode 100644 java/.openapi-generator/VERSION delete mode 100644 java/.travis.yml delete mode 100644 java/README.md delete mode 100644 java/api/openapi.yaml delete mode 100644 java/build.gradle delete mode 100644 java/build.sbt delete mode 100644 java/docs/Ack.md delete mode 100644 java/docs/AddTemplateRequest.md delete mode 100644 java/docs/ChannelApi.md delete mode 100644 java/docs/ChannelExtendedStatistics.md delete mode 100644 java/docs/ChannelExtendedStatisticsInner.md delete mode 100644 java/docs/ChannelStatistics.md delete mode 100644 java/docs/ChannelStatus.md delete mode 100644 java/docs/ChatIdProp.md delete mode 100644 java/docs/Commerce.md delete mode 100644 java/docs/CommerceParams.md delete mode 100644 java/docs/Contacts.md delete mode 100644 java/docs/ContactsContactsInner.md delete mode 100644 java/docs/ContactsRequest.md delete mode 100644 java/docs/GetAckInfo.md delete mode 100644 java/docs/GetAckInfoHooksInner.md delete mode 100644 java/docs/GetCommerce.md delete mode 100644 java/docs/GetCommerceInner.md delete mode 100644 java/docs/GetIP.md delete mode 100644 java/docs/GetMe.md delete mode 100644 java/docs/GetMe401Response.md delete mode 100644 java/docs/GetMessages.md delete mode 100644 java/docs/GetMessagesMessagesInner.md delete mode 100644 java/docs/GetTemplates.md delete mode 100644 java/docs/GetTemplatesTemplatesInner.md delete mode 100644 java/docs/MeComponents.md delete mode 100644 java/docs/MediaApi.md delete mode 100644 java/docs/MediaId.md delete mode 100644 java/docs/Message.md delete mode 100644 java/docs/MessageIdProp.md delete mode 100644 java/docs/MessagingApi.md delete mode 100644 java/docs/PhoneProp.md delete mode 100644 java/docs/ProductsCatalogsApi.md delete mode 100644 java/docs/ReadMessageRequest.md delete mode 100644 java/docs/RemoveTemplateRequest.md delete mode 100644 java/docs/SendContactRequest.md delete mode 100644 java/docs/SendFileRequest.md delete mode 100644 java/docs/SendListRequest.md delete mode 100644 java/docs/SendListRequestAllOfRows.md delete mode 100644 java/docs/SendListRequestAllOfSections.md delete mode 100644 java/docs/SendLocationRequest.md delete mode 100644 java/docs/SendMessageRequest.md delete mode 100644 java/docs/SendMessageStatus.md delete mode 100644 java/docs/SendProductRequest.md delete mode 100644 java/docs/SendProductRequestAllOfAction.md delete mode 100644 java/docs/SendProductRequestAllOfActionProductItems.md delete mode 100644 java/docs/SendProductRequestAllOfActionSections.md delete mode 100644 java/docs/SendTemplateRequest.md delete mode 100644 java/docs/SendTemplateRequestAllOfCurrency.md delete mode 100644 java/docs/SendTemplateRequestAllOfDateTime.md delete mode 100644 java/docs/SendTemplateRequestAllOfDateTimeComponent.md delete mode 100644 java/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md delete mode 100644 java/docs/SendTemplateRequestAllOfLanguage.md delete mode 100644 java/docs/SendTemplateRequestAllOfParams.md delete mode 100644 java/docs/SetCommerce.md delete mode 100644 java/docs/SetMe.md delete mode 100644 java/docs/SetMeRequest.md delete mode 100644 java/docs/SetSettings200Response.md delete mode 100644 java/docs/SetSettings200ResponseAllOfUpdate.md delete mode 100644 java/docs/SetWebhookStatus.md delete mode 100644 java/docs/Settings.md delete mode 100644 java/docs/TemplateCategoryProp.md delete mode 100644 java/docs/TemplateComponentsProp.md delete mode 100644 java/docs/TemplateComponentsPropInner.md delete mode 100644 java/docs/TemplateComponentsPropInnerButtonsInner.md delete mode 100644 java/docs/TemplateLanguageProp.md delete mode 100644 java/docs/TemplateNamespaceField.md delete mode 100644 java/docs/TemplatesApi.md delete mode 100644 java/docs/UploadMedia.md delete mode 100644 java/docs/WebhookUrl.md delete mode 100644 java/docs/WebhooksApi.md delete mode 100644 java/git_push.sh delete mode 100644 java/gradle.properties delete mode 100644 java/gradle/wrapper/gradle-wrapper.jar delete mode 100644 java/gradle/wrapper/gradle-wrapper.properties delete mode 100644 java/gradlew delete mode 100644 java/gradlew.bat delete mode 100644 java/pom.xml delete mode 100644 java/settings.gradle delete mode 100644 java/src/main/AndroidManifest.xml delete mode 100644 java/src/main/java/org/openapitools/client/ApiCallback.java delete mode 100644 java/src/main/java/org/openapitools/client/ApiClient.java delete mode 100644 java/src/main/java/org/openapitools/client/ApiException.java delete mode 100644 java/src/main/java/org/openapitools/client/ApiResponse.java delete mode 100644 java/src/main/java/org/openapitools/client/Configuration.java delete mode 100644 java/src/main/java/org/openapitools/client/GzipRequestInterceptor.java delete mode 100644 java/src/main/java/org/openapitools/client/JSON.java delete mode 100644 java/src/main/java/org/openapitools/client/Pair.java delete mode 100644 java/src/main/java/org/openapitools/client/ProgressRequestBody.java delete mode 100644 java/src/main/java/org/openapitools/client/ProgressResponseBody.java delete mode 100644 java/src/main/java/org/openapitools/client/ServerConfiguration.java delete mode 100644 java/src/main/java/org/openapitools/client/ServerVariable.java delete mode 100644 java/src/main/java/org/openapitools/client/StringUtil.java delete mode 100644 java/src/main/java/org/openapitools/client/api/ChannelApi.java delete mode 100644 java/src/main/java/org/openapitools/client/api/MediaApi.java delete mode 100644 java/src/main/java/org/openapitools/client/api/MessagingApi.java delete mode 100644 java/src/main/java/org/openapitools/client/api/ProductsCatalogsApi.java delete mode 100644 java/src/main/java/org/openapitools/client/api/TemplatesApi.java delete mode 100644 java/src/main/java/org/openapitools/client/api/WebhooksApi.java delete mode 100644 java/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java delete mode 100644 java/src/main/java/org/openapitools/client/auth/Authentication.java delete mode 100644 java/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java delete mode 100644 java/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java delete mode 100644 java/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java delete mode 100644 java/src/main/java/org/openapitools/client/model/Ack.java delete mode 100644 java/src/main/java/org/openapitools/client/model/AddTemplateRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ChannelExtendedStatistics.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ChannelExtendedStatisticsInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ChannelStatistics.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ChannelStatus.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ChatIdProp.java delete mode 100644 java/src/main/java/org/openapitools/client/model/Commerce.java delete mode 100644 java/src/main/java/org/openapitools/client/model/CommerceParams.java delete mode 100644 java/src/main/java/org/openapitools/client/model/Contacts.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ContactsContactsInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ContactsRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetAckInfo.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetAckInfoHooksInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetCommerce.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetCommerceInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetIP.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetMe.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetMe401Response.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetMessages.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetMessagesMessagesInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetTemplates.java delete mode 100644 java/src/main/java/org/openapitools/client/model/GetTemplatesTemplatesInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/MeComponents.java delete mode 100644 java/src/main/java/org/openapitools/client/model/MediaId.java delete mode 100644 java/src/main/java/org/openapitools/client/model/Message.java delete mode 100644 java/src/main/java/org/openapitools/client/model/MessageIdProp.java delete mode 100644 java/src/main/java/org/openapitools/client/model/PhoneProp.java delete mode 100644 java/src/main/java/org/openapitools/client/model/ReadMessageRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/RemoveTemplateRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendContactRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendFileRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendListRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendListRequestAllOfRows.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendListRequestAllOfSections.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendLocationRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendMessageRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendMessageStatus.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendProductRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfAction.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItems.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionSections.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrency.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTime.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponent.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpoch.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguage.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfParams.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SetCommerce.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SetMe.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SetMeRequest.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SetSettings200Response.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdate.java delete mode 100644 java/src/main/java/org/openapitools/client/model/SetWebhookStatus.java delete mode 100644 java/src/main/java/org/openapitools/client/model/Settings.java delete mode 100644 java/src/main/java/org/openapitools/client/model/TemplateCategoryProp.java delete mode 100644 java/src/main/java/org/openapitools/client/model/TemplateComponentsProp.java delete mode 100644 java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInner.java delete mode 100644 java/src/main/java/org/openapitools/client/model/TemplateLanguageProp.java delete mode 100644 java/src/main/java/org/openapitools/client/model/TemplateNamespaceField.java delete mode 100644 java/src/main/java/org/openapitools/client/model/UploadMedia.java delete mode 100644 java/src/main/java/org/openapitools/client/model/WebhookUrl.java delete mode 100644 java/src/test/java/org/openapitools/client/api/ChannelApiTest.java delete mode 100644 java/src/test/java/org/openapitools/client/api/MediaApiTest.java delete mode 100644 java/src/test/java/org/openapitools/client/api/MessagingApiTest.java delete mode 100644 java/src/test/java/org/openapitools/client/api/ProductsCatalogsApiTest.java delete mode 100644 java/src/test/java/org/openapitools/client/api/TemplatesApiTest.java delete mode 100644 java/src/test/java/org/openapitools/client/api/WebhooksApiTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/AckTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/AddTemplateRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ChannelStatisticsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ChannelStatusTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ChatIdPropTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/CommerceParamsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/CommerceTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ContactsContactsInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ContactsRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ContactsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetAckInfoHooksInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetAckInfoTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetCommerceInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetCommerceTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetIPTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetMe401ResponseTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetMeTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetMessagesMessagesInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetMessagesTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetTemplatesTemplatesInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/GetTemplatesTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/MeComponentsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/MediaIdTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/MessageIdPropTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/MessageTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/PhonePropTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/ReadMessageRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/RemoveTemplateRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendContactRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendFileRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendListRequestAllOfRowsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendListRequestAllOfSectionsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendListRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendLocationRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendMessageRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendMessageStatusTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItemsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionSectionsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendProductRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrencyTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponentTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpochTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguageTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfParamsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SendTemplateRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SetCommerceTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SetMeRequestTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SetMeTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdateTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SetSettings200ResponseTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SetWebhookStatusTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/SettingsTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/TemplateCategoryPropTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/TemplateComponentsPropTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/TemplateLanguagePropTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/TemplateNamespaceFieldTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/UploadMediaTest.java delete mode 100644 java/src/test/java/org/openapitools/client/model/WebhookUrlTest.java delete mode 100644 js/.babelrc delete mode 100644 js/.gitignore delete mode 100644 js/.openapi-generator-ignore delete mode 100644 js/.openapi-generator/FILES delete mode 100644 js/.openapi-generator/VERSION delete mode 100644 js/.travis.yml delete mode 100644 js/README.md delete mode 100644 js/docs/Ack.md delete mode 100644 js/docs/AddTemplateRequest.md delete mode 100644 js/docs/ChannelApi.md delete mode 100644 js/docs/ChannelExtendedStatistics.md delete mode 100644 js/docs/ChannelExtendedStatisticsInner.md delete mode 100644 js/docs/ChannelStatistics.md delete mode 100644 js/docs/ChannelStatus.md delete mode 100644 js/docs/ChatIdProp.md delete mode 100644 js/docs/Commerce.md delete mode 100644 js/docs/CommerceParams.md delete mode 100644 js/docs/Contacts.md delete mode 100644 js/docs/ContactsContactsInner.md delete mode 100644 js/docs/ContactsRequest.md delete mode 100644 js/docs/GetAckInfo.md delete mode 100644 js/docs/GetAckInfoHooksInner.md delete mode 100644 js/docs/GetCommerce.md delete mode 100644 js/docs/GetCommerceInner.md delete mode 100644 js/docs/GetIP.md delete mode 100644 js/docs/GetMe.md delete mode 100644 js/docs/GetMe401Response.md delete mode 100644 js/docs/GetMessages.md delete mode 100644 js/docs/GetMessagesMessagesInner.md delete mode 100644 js/docs/GetTemplates.md delete mode 100644 js/docs/GetTemplatesTemplatesInner.md delete mode 100644 js/docs/MeComponents.md delete mode 100644 js/docs/MediaApi.md delete mode 100644 js/docs/MediaId.md delete mode 100644 js/docs/Message.md delete mode 100644 js/docs/MessageIdProp.md delete mode 100644 js/docs/MessagingApi.md delete mode 100644 js/docs/PhoneProp.md delete mode 100644 js/docs/ProductsCatalogsApi.md delete mode 100644 js/docs/ReadMessageRequest.md delete mode 100644 js/docs/RemoveTemplateRequest.md delete mode 100644 js/docs/SendContactRequest.md delete mode 100644 js/docs/SendFileRequest.md delete mode 100644 js/docs/SendListRequest.md delete mode 100644 js/docs/SendListRequestAllOfRows.md delete mode 100644 js/docs/SendListRequestAllOfSections.md delete mode 100644 js/docs/SendLocationRequest.md delete mode 100644 js/docs/SendMessageRequest.md delete mode 100644 js/docs/SendMessageStatus.md delete mode 100644 js/docs/SendProductRequest.md delete mode 100644 js/docs/SendProductRequestAllOfAction.md delete mode 100644 js/docs/SendProductRequestAllOfActionProductItems.md delete mode 100644 js/docs/SendProductRequestAllOfActionSections.md delete mode 100644 js/docs/SendTemplateRequest.md delete mode 100644 js/docs/SendTemplateRequestAllOfCurrency.md delete mode 100644 js/docs/SendTemplateRequestAllOfDateTime.md delete mode 100644 js/docs/SendTemplateRequestAllOfDateTimeComponent.md delete mode 100644 js/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md delete mode 100644 js/docs/SendTemplateRequestAllOfLanguage.md delete mode 100644 js/docs/SendTemplateRequestAllOfParams.md delete mode 100644 js/docs/SetCommerce.md delete mode 100644 js/docs/SetMe.md delete mode 100644 js/docs/SetMeRequest.md delete mode 100644 js/docs/SetSettings200Response.md delete mode 100644 js/docs/SetSettings200ResponseAllOfUpdate.md delete mode 100644 js/docs/SetWebhookStatus.md delete mode 100644 js/docs/Settings.md delete mode 100644 js/docs/TemplateCategoryProp.md delete mode 100644 js/docs/TemplateComponentsProp.md delete mode 100644 js/docs/TemplateComponentsPropInner.md delete mode 100644 js/docs/TemplateComponentsPropInnerButtonsInner.md delete mode 100644 js/docs/TemplateLanguageProp.md delete mode 100644 js/docs/TemplateNamespaceField.md delete mode 100644 js/docs/TemplatesApi.md delete mode 100644 js/docs/UploadMedia.md delete mode 100644 js/docs/WebhookUrl.md delete mode 100644 js/docs/WebhooksApi.md delete mode 100644 js/git_push.sh delete mode 100644 js/mocha.opts delete mode 100644 js/package.json delete mode 100644 js/src/ApiClient.js delete mode 100644 js/src/api/ChannelApi.js delete mode 100644 js/src/api/MediaApi.js delete mode 100644 js/src/api/MessagingApi.js delete mode 100644 js/src/api/ProductsCatalogsApi.js delete mode 100644 js/src/api/TemplatesApi.js delete mode 100644 js/src/api/WebhooksApi.js delete mode 100644 js/src/index.js delete mode 100644 js/src/model/Ack.js delete mode 100644 js/src/model/AddTemplateRequest.js delete mode 100644 js/src/model/ChannelExtendedStatistics.js delete mode 100644 js/src/model/ChannelExtendedStatisticsInner.js delete mode 100644 js/src/model/ChannelStatistics.js delete mode 100644 js/src/model/ChannelStatus.js delete mode 100644 js/src/model/ChatIdProp.js delete mode 100644 js/src/model/Commerce.js delete mode 100644 js/src/model/CommerceParams.js delete mode 100644 js/src/model/Contacts.js delete mode 100644 js/src/model/ContactsContactsInner.js delete mode 100644 js/src/model/ContactsRequest.js delete mode 100644 js/src/model/GetAckInfo.js delete mode 100644 js/src/model/GetAckInfoHooksInner.js delete mode 100644 js/src/model/GetCommerce.js delete mode 100644 js/src/model/GetCommerceInner.js delete mode 100644 js/src/model/GetIP.js delete mode 100644 js/src/model/GetMe.js delete mode 100644 js/src/model/GetMe401Response.js delete mode 100644 js/src/model/GetMessages.js delete mode 100644 js/src/model/GetMessagesMessagesInner.js delete mode 100644 js/src/model/GetTemplates.js delete mode 100644 js/src/model/GetTemplatesTemplatesInner.js delete mode 100644 js/src/model/MeComponents.js delete mode 100644 js/src/model/MediaId.js delete mode 100644 js/src/model/Message.js delete mode 100644 js/src/model/MessageIdProp.js delete mode 100644 js/src/model/PhoneProp.js delete mode 100644 js/src/model/ReadMessageRequest.js delete mode 100644 js/src/model/RemoveTemplateRequest.js delete mode 100644 js/src/model/SendContactRequest.js delete mode 100644 js/src/model/SendFileRequest.js delete mode 100644 js/src/model/SendListRequest.js delete mode 100644 js/src/model/SendListRequestAllOfRows.js delete mode 100644 js/src/model/SendListRequestAllOfSections.js delete mode 100644 js/src/model/SendLocationRequest.js delete mode 100644 js/src/model/SendMessageRequest.js delete mode 100644 js/src/model/SendMessageStatus.js delete mode 100644 js/src/model/SendProductRequest.js delete mode 100644 js/src/model/SendProductRequestAllOfAction.js delete mode 100644 js/src/model/SendProductRequestAllOfActionProductItems.js delete mode 100644 js/src/model/SendProductRequestAllOfActionSections.js delete mode 100644 js/src/model/SendTemplateRequest.js delete mode 100644 js/src/model/SendTemplateRequestAllOfCurrency.js delete mode 100644 js/src/model/SendTemplateRequestAllOfDateTime.js delete mode 100644 js/src/model/SendTemplateRequestAllOfDateTimeComponent.js delete mode 100644 js/src/model/SendTemplateRequestAllOfDateTimeUnixEpoch.js delete mode 100644 js/src/model/SendTemplateRequestAllOfLanguage.js delete mode 100644 js/src/model/SendTemplateRequestAllOfParams.js delete mode 100644 js/src/model/SetCommerce.js delete mode 100644 js/src/model/SetMe.js delete mode 100644 js/src/model/SetMeRequest.js delete mode 100644 js/src/model/SetSettings200Response.js delete mode 100644 js/src/model/SetSettings200ResponseAllOfUpdate.js delete mode 100644 js/src/model/SetWebhookStatus.js delete mode 100644 js/src/model/Settings.js delete mode 100644 js/src/model/TemplateCategoryProp.js delete mode 100644 js/src/model/TemplateComponentsProp.js delete mode 100644 js/src/model/TemplateComponentsPropInner.js delete mode 100644 js/src/model/TemplateComponentsPropInnerButtonsInner.js delete mode 100644 js/src/model/TemplateLanguageProp.js delete mode 100644 js/src/model/TemplateNamespaceField.js delete mode 100644 js/src/model/UploadMedia.js delete mode 100644 js/src/model/WebhookUrl.js delete mode 100644 js/test/api/ChannelApi.spec.js delete mode 100644 js/test/api/MediaApi.spec.js delete mode 100644 js/test/api/MessagingApi.spec.js delete mode 100644 js/test/api/ProductsCatalogsApi.spec.js delete mode 100644 js/test/api/TemplatesApi.spec.js delete mode 100644 js/test/api/WebhooksApi.spec.js delete mode 100644 js/test/model/Ack.spec.js delete mode 100644 js/test/model/AddTemplateRequest.spec.js delete mode 100644 js/test/model/ChannelExtendedStatistics.spec.js delete mode 100644 js/test/model/ChannelExtendedStatisticsInner.spec.js delete mode 100644 js/test/model/ChannelStatistics.spec.js delete mode 100644 js/test/model/ChannelStatus.spec.js delete mode 100644 js/test/model/ChatIdProp.spec.js delete mode 100644 js/test/model/Commerce.spec.js delete mode 100644 js/test/model/CommerceParams.spec.js delete mode 100644 js/test/model/Contacts.spec.js delete mode 100644 js/test/model/ContactsContactsInner.spec.js delete mode 100644 js/test/model/ContactsRequest.spec.js delete mode 100644 js/test/model/GetAckInfo.spec.js delete mode 100644 js/test/model/GetAckInfoHooksInner.spec.js delete mode 100644 js/test/model/GetCommerce.spec.js delete mode 100644 js/test/model/GetCommerceInner.spec.js delete mode 100644 js/test/model/GetIP.spec.js delete mode 100644 js/test/model/GetMe.spec.js delete mode 100644 js/test/model/GetMe401Response.spec.js delete mode 100644 js/test/model/GetMessages.spec.js delete mode 100644 js/test/model/GetMessagesMessagesInner.spec.js delete mode 100644 js/test/model/GetTemplates.spec.js delete mode 100644 js/test/model/GetTemplatesTemplatesInner.spec.js delete mode 100644 js/test/model/MeComponents.spec.js delete mode 100644 js/test/model/MediaId.spec.js delete mode 100644 js/test/model/Message.spec.js delete mode 100644 js/test/model/MessageIdProp.spec.js delete mode 100644 js/test/model/PhoneProp.spec.js delete mode 100644 js/test/model/ReadMessageRequest.spec.js delete mode 100644 js/test/model/RemoveTemplateRequest.spec.js delete mode 100644 js/test/model/SendContactRequest.spec.js delete mode 100644 js/test/model/SendFileRequest.spec.js delete mode 100644 js/test/model/SendListRequest.spec.js delete mode 100644 js/test/model/SendListRequestAllOfRows.spec.js delete mode 100644 js/test/model/SendListRequestAllOfSections.spec.js delete mode 100644 js/test/model/SendLocationRequest.spec.js delete mode 100644 js/test/model/SendMessageRequest.spec.js delete mode 100644 js/test/model/SendMessageStatus.spec.js delete mode 100644 js/test/model/SendProductRequest.spec.js delete mode 100644 js/test/model/SendProductRequestAllOfAction.spec.js delete mode 100644 js/test/model/SendProductRequestAllOfActionProductItems.spec.js delete mode 100644 js/test/model/SendProductRequestAllOfActionSections.spec.js delete mode 100644 js/test/model/SendTemplateRequest.spec.js delete mode 100644 js/test/model/SendTemplateRequestAllOfCurrency.spec.js delete mode 100644 js/test/model/SendTemplateRequestAllOfDateTime.spec.js delete mode 100644 js/test/model/SendTemplateRequestAllOfDateTimeComponent.spec.js delete mode 100644 js/test/model/SendTemplateRequestAllOfDateTimeUnixEpoch.spec.js delete mode 100644 js/test/model/SendTemplateRequestAllOfLanguage.spec.js delete mode 100644 js/test/model/SendTemplateRequestAllOfParams.spec.js delete mode 100644 js/test/model/SetCommerce.spec.js delete mode 100644 js/test/model/SetMe.spec.js delete mode 100644 js/test/model/SetMeRequest.spec.js delete mode 100644 js/test/model/SetSettings200Response.spec.js delete mode 100644 js/test/model/SetSettings200ResponseAllOfUpdate.spec.js delete mode 100644 js/test/model/SetWebhookStatus.spec.js delete mode 100644 js/test/model/Settings.spec.js delete mode 100644 js/test/model/TemplateCategoryProp.spec.js delete mode 100644 js/test/model/TemplateComponentsProp.spec.js delete mode 100644 js/test/model/TemplateComponentsPropInner.spec.js delete mode 100644 js/test/model/TemplateComponentsPropInnerButtonsInner.spec.js delete mode 100644 js/test/model/TemplateLanguageProp.spec.js delete mode 100644 js/test/model/TemplateNamespaceField.spec.js delete mode 100644 js/test/model/UploadMedia.spec.js delete mode 100644 js/test/model/WebhookUrl.spec.js delete mode 100644 php/README.md delete mode 100644 python/.github/workflows/python.yml delete mode 100644 python/.gitignore delete mode 100644 python/.gitlab-ci.yml delete mode 100644 python/.openapi-generator-ignore delete mode 100644 python/.openapi-generator/FILES delete mode 100644 python/.openapi-generator/VERSION delete mode 100644 python/.travis.yml delete mode 100644 python/README.md delete mode 100644 python/docs/Ack.md delete mode 100644 python/docs/AddTemplateRequest.md delete mode 100644 python/docs/ChannelApi.md delete mode 100644 python/docs/ChannelExtendedStatistics.md delete mode 100644 python/docs/ChannelExtendedStatisticsInner.md delete mode 100644 python/docs/ChannelStatistics.md delete mode 100644 python/docs/ChannelStatus.md delete mode 100644 python/docs/ChatIdProp.md delete mode 100644 python/docs/Commerce.md delete mode 100644 python/docs/CommerceParams.md delete mode 100644 python/docs/Contacts.md delete mode 100644 python/docs/ContactsContactsInner.md delete mode 100644 python/docs/ContactsRequest.md delete mode 100644 python/docs/GetAckInfo.md delete mode 100644 python/docs/GetAckInfoHooksInner.md delete mode 100644 python/docs/GetCommerce.md delete mode 100644 python/docs/GetCommerceInner.md delete mode 100644 python/docs/GetIP.md delete mode 100644 python/docs/GetMe.md delete mode 100644 python/docs/GetMe401Response.md delete mode 100644 python/docs/GetMessages.md delete mode 100644 python/docs/GetMessagesMessagesInner.md delete mode 100644 python/docs/GetTemplates.md delete mode 100644 python/docs/GetTemplatesTemplatesInner.md delete mode 100644 python/docs/MeComponents.md delete mode 100644 python/docs/MediaApi.md delete mode 100644 python/docs/MediaId.md delete mode 100644 python/docs/Message.md delete mode 100644 python/docs/MessageIdProp.md delete mode 100644 python/docs/MessagingApi.md delete mode 100644 python/docs/PhoneProp.md delete mode 100644 python/docs/ProductsCatalogsApi.md delete mode 100644 python/docs/ReadMessageRequest.md delete mode 100644 python/docs/RemoveTemplateRequest.md delete mode 100644 python/docs/SendContactRequest.md delete mode 100644 python/docs/SendFileRequest.md delete mode 100644 python/docs/SendListRequest.md delete mode 100644 python/docs/SendListRequestAllOfRows.md delete mode 100644 python/docs/SendListRequestAllOfSections.md delete mode 100644 python/docs/SendLocationRequest.md delete mode 100644 python/docs/SendMessageRequest.md delete mode 100644 python/docs/SendMessageStatus.md delete mode 100644 python/docs/SendProductRequest.md delete mode 100644 python/docs/SendProductRequestAllOfAction.md delete mode 100644 python/docs/SendProductRequestAllOfActionProductItems.md delete mode 100644 python/docs/SendProductRequestAllOfActionSections.md delete mode 100644 python/docs/SendTemplateRequest.md delete mode 100644 python/docs/SendTemplateRequestAllOfCurrency.md delete mode 100644 python/docs/SendTemplateRequestAllOfDateTime.md delete mode 100644 python/docs/SendTemplateRequestAllOfDateTimeComponent.md delete mode 100644 python/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md delete mode 100644 python/docs/SendTemplateRequestAllOfLanguage.md delete mode 100644 python/docs/SendTemplateRequestAllOfParams.md delete mode 100644 python/docs/SetCommerce.md delete mode 100644 python/docs/SetMe.md delete mode 100644 python/docs/SetMeRequest.md delete mode 100644 python/docs/SetSettings200Response.md delete mode 100644 python/docs/SetSettings200ResponseAllOfUpdate.md delete mode 100644 python/docs/SetWebhookStatus.md delete mode 100644 python/docs/Settings.md delete mode 100644 python/docs/TemplateCategoryProp.md delete mode 100644 python/docs/TemplateComponentsProp.md delete mode 100644 python/docs/TemplateComponentsPropInner.md delete mode 100644 python/docs/TemplateComponentsPropInnerButtonsInner.md delete mode 100644 python/docs/TemplateLanguageProp.md delete mode 100644 python/docs/TemplateNamespaceField.md delete mode 100644 python/docs/TemplatesApi.md delete mode 100644 python/docs/UploadMedia.md delete mode 100644 python/docs/WebhookUrl.md delete mode 100644 python/docs/WebhooksApi.md delete mode 100644 python/git_push.sh delete mode 100644 python/one_msg_waba_sdk/__init__.py delete mode 100644 python/one_msg_waba_sdk/api/__init__.py delete mode 100644 python/one_msg_waba_sdk/api/channel_api.py delete mode 100644 python/one_msg_waba_sdk/api/media_api.py delete mode 100644 python/one_msg_waba_sdk/api/messaging_api.py delete mode 100644 python/one_msg_waba_sdk/api/products_catalogs_api.py delete mode 100644 python/one_msg_waba_sdk/api/templates_api.py delete mode 100644 python/one_msg_waba_sdk/api/webhooks_api.py delete mode 100644 python/one_msg_waba_sdk/api_client.py delete mode 100644 python/one_msg_waba_sdk/api_response.py delete mode 100644 python/one_msg_waba_sdk/configuration.py delete mode 100644 python/one_msg_waba_sdk/exceptions.py delete mode 100644 python/one_msg_waba_sdk/models/__init__.py delete mode 100644 python/one_msg_waba_sdk/models/ack.py delete mode 100644 python/one_msg_waba_sdk/models/add_template_request.py delete mode 100644 python/one_msg_waba_sdk/models/channel_extended_statistics.py delete mode 100644 python/one_msg_waba_sdk/models/channel_extended_statistics_inner.py delete mode 100644 python/one_msg_waba_sdk/models/channel_statistics.py delete mode 100644 python/one_msg_waba_sdk/models/channel_status.py delete mode 100644 python/one_msg_waba_sdk/models/chat_id_prop.py delete mode 100644 python/one_msg_waba_sdk/models/commerce.py delete mode 100644 python/one_msg_waba_sdk/models/commerce_params.py delete mode 100644 python/one_msg_waba_sdk/models/contacts.py delete mode 100644 python/one_msg_waba_sdk/models/contacts_contacts_inner.py delete mode 100644 python/one_msg_waba_sdk/models/contacts_request.py delete mode 100644 python/one_msg_waba_sdk/models/get_ack_info.py delete mode 100644 python/one_msg_waba_sdk/models/get_ack_info_hooks_inner.py delete mode 100644 python/one_msg_waba_sdk/models/get_commerce.py delete mode 100644 python/one_msg_waba_sdk/models/get_commerce_inner.py delete mode 100644 python/one_msg_waba_sdk/models/get_ip.py delete mode 100644 python/one_msg_waba_sdk/models/get_me.py delete mode 100644 python/one_msg_waba_sdk/models/get_me401_response.py delete mode 100644 python/one_msg_waba_sdk/models/get_messages.py delete mode 100644 python/one_msg_waba_sdk/models/get_messages_messages_inner.py delete mode 100644 python/one_msg_waba_sdk/models/get_templates.py delete mode 100644 python/one_msg_waba_sdk/models/get_templates_templates_inner.py delete mode 100644 python/one_msg_waba_sdk/models/me_components.py delete mode 100644 python/one_msg_waba_sdk/models/media_id.py delete mode 100644 python/one_msg_waba_sdk/models/message.py delete mode 100644 python/one_msg_waba_sdk/models/message_id_prop.py delete mode 100644 python/one_msg_waba_sdk/models/phone_prop.py delete mode 100644 python/one_msg_waba_sdk/models/read_message_request.py delete mode 100644 python/one_msg_waba_sdk/models/remove_template_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_contact_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_file_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_list_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_list_request_all_of_rows.py delete mode 100644 python/one_msg_waba_sdk/models/send_list_request_all_of_sections.py delete mode 100644 python/one_msg_waba_sdk/models/send_location_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_message_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_message_status.py delete mode 100644 python/one_msg_waba_sdk/models/send_product_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_product_request_all_of_action.py delete mode 100644 python/one_msg_waba_sdk/models/send_product_request_all_of_action_product_items.py delete mode 100644 python/one_msg_waba_sdk/models/send_product_request_all_of_action_sections.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request_all_of_currency.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request_all_of_date_time.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_component.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_unix_epoch.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request_all_of_language.py delete mode 100644 python/one_msg_waba_sdk/models/send_template_request_all_of_params.py delete mode 100644 python/one_msg_waba_sdk/models/set_commerce.py delete mode 100644 python/one_msg_waba_sdk/models/set_me.py delete mode 100644 python/one_msg_waba_sdk/models/set_me_request.py delete mode 100644 python/one_msg_waba_sdk/models/set_settings200_response.py delete mode 100644 python/one_msg_waba_sdk/models/set_settings200_response_all_of_update.py delete mode 100644 python/one_msg_waba_sdk/models/set_webhook_status.py delete mode 100644 python/one_msg_waba_sdk/models/settings.py delete mode 100644 python/one_msg_waba_sdk/models/template_category_prop.py delete mode 100644 python/one_msg_waba_sdk/models/template_components_prop.py delete mode 100644 python/one_msg_waba_sdk/models/template_components_prop_inner.py delete mode 100644 python/one_msg_waba_sdk/models/template_components_prop_inner_buttons_inner.py delete mode 100644 python/one_msg_waba_sdk/models/template_language_prop.py delete mode 100644 python/one_msg_waba_sdk/models/template_namespace_field.py delete mode 100644 python/one_msg_waba_sdk/models/upload_media.py delete mode 100644 python/one_msg_waba_sdk/models/webhook_url.py delete mode 100644 python/one_msg_waba_sdk/py.typed delete mode 100644 python/one_msg_waba_sdk/rest.py delete mode 100644 python/pyproject.toml delete mode 100644 python/requirements.txt delete mode 100644 python/setup.cfg delete mode 100644 python/setup.py delete mode 100644 python/test-requirements.txt delete mode 100644 python/test/__init__.py delete mode 100644 python/test/test_ack.py delete mode 100644 python/test/test_add_template_request.py delete mode 100644 python/test/test_channel_api.py delete mode 100644 python/test/test_channel_extended_statistics.py delete mode 100644 python/test/test_channel_extended_statistics_inner.py delete mode 100644 python/test/test_channel_statistics.py delete mode 100644 python/test/test_channel_status.py delete mode 100644 python/test/test_chat_id_prop.py delete mode 100644 python/test/test_commerce.py delete mode 100644 python/test/test_commerce_params.py delete mode 100644 python/test/test_contacts.py delete mode 100644 python/test/test_contacts_contacts_inner.py delete mode 100644 python/test/test_contacts_request.py delete mode 100644 python/test/test_get_ack_info.py delete mode 100644 python/test/test_get_ack_info_hooks_inner.py delete mode 100644 python/test/test_get_commerce.py delete mode 100644 python/test/test_get_commerce_inner.py delete mode 100644 python/test/test_get_ip.py delete mode 100644 python/test/test_get_me.py delete mode 100644 python/test/test_get_me401_response.py delete mode 100644 python/test/test_get_messages.py delete mode 100644 python/test/test_get_messages_messages_inner.py delete mode 100644 python/test/test_get_templates.py delete mode 100644 python/test/test_get_templates_templates_inner.py delete mode 100644 python/test/test_me_components.py delete mode 100644 python/test/test_media_api.py delete mode 100644 python/test/test_media_id.py delete mode 100644 python/test/test_message.py delete mode 100644 python/test/test_message_id_prop.py delete mode 100644 python/test/test_messaging_api.py delete mode 100644 python/test/test_phone_prop.py delete mode 100644 python/test/test_products_catalogs_api.py delete mode 100644 python/test/test_read_message_request.py delete mode 100644 python/test/test_remove_template_request.py delete mode 100644 python/test/test_send_contact_request.py delete mode 100644 python/test/test_send_file_request.py delete mode 100644 python/test/test_send_list_request.py delete mode 100644 python/test/test_send_list_request_all_of_rows.py delete mode 100644 python/test/test_send_list_request_all_of_sections.py delete mode 100644 python/test/test_send_location_request.py delete mode 100644 python/test/test_send_message_request.py delete mode 100644 python/test/test_send_message_status.py delete mode 100644 python/test/test_send_product_request.py delete mode 100644 python/test/test_send_product_request_all_of_action.py delete mode 100644 python/test/test_send_product_request_all_of_action_product_items.py delete mode 100644 python/test/test_send_product_request_all_of_action_sections.py delete mode 100644 python/test/test_send_template_request.py delete mode 100644 python/test/test_send_template_request_all_of_currency.py delete mode 100644 python/test/test_send_template_request_all_of_date_time.py delete mode 100644 python/test/test_send_template_request_all_of_date_time_component.py delete mode 100644 python/test/test_send_template_request_all_of_date_time_unix_epoch.py delete mode 100644 python/test/test_send_template_request_all_of_language.py delete mode 100644 python/test/test_send_template_request_all_of_params.py delete mode 100644 python/test/test_set_commerce.py delete mode 100644 python/test/test_set_me.py delete mode 100644 python/test/test_set_me_request.py delete mode 100644 python/test/test_set_settings200_response.py delete mode 100644 python/test/test_set_settings200_response_all_of_update.py delete mode 100644 python/test/test_set_webhook_status.py delete mode 100644 python/test/test_settings.py delete mode 100644 python/test/test_template_category_prop.py delete mode 100644 python/test/test_template_components_prop.py delete mode 100644 python/test/test_template_components_prop_inner.py delete mode 100644 python/test/test_template_components_prop_inner_buttons_inner.py delete mode 100644 python/test/test_template_language_prop.py delete mode 100644 python/test/test_template_namespace_field.py delete mode 100644 python/test/test_templates_api.py delete mode 100644 python/test/test_upload_media.py delete mode 100644 python/test/test_webhook_url.py delete mode 100644 python/test/test_webhooks_api.py delete mode 100644 python/tox.ini delete mode 100644 swagger.waba.json delete mode 100644 typescript-fetch/.openapi-generator-ignore delete mode 100644 typescript-fetch/.openapi-generator/FILES delete mode 100644 typescript-fetch/.openapi-generator/VERSION delete mode 100644 typescript-fetch/README.md delete mode 100644 typescript-fetch/apis/ChannelApi.ts delete mode 100644 typescript-fetch/apis/MediaApi.ts delete mode 100644 typescript-fetch/apis/MessagingApi.ts delete mode 100644 typescript-fetch/apis/ProductsCatalogsApi.ts delete mode 100644 typescript-fetch/apis/TemplatesApi.ts delete mode 100644 typescript-fetch/apis/WebhooksApi.ts delete mode 100644 typescript-fetch/apis/index.ts delete mode 100644 typescript-fetch/models/Ack.ts delete mode 100644 typescript-fetch/models/AddTemplateRequest.ts delete mode 100644 typescript-fetch/models/ChannelExtendedStatistics.ts delete mode 100644 typescript-fetch/models/ChannelExtendedStatisticsInner.ts delete mode 100644 typescript-fetch/models/ChannelStatistics.ts delete mode 100644 typescript-fetch/models/ChannelStatus.ts delete mode 100644 typescript-fetch/models/Commerce.ts delete mode 100644 typescript-fetch/models/CommerceParams.ts delete mode 100644 typescript-fetch/models/Contacts.ts delete mode 100644 typescript-fetch/models/ContactsContactsInner.ts delete mode 100644 typescript-fetch/models/ContactsRequest.ts delete mode 100644 typescript-fetch/models/GetAckInfo.ts delete mode 100644 typescript-fetch/models/GetAckInfoHooksInner.ts delete mode 100644 typescript-fetch/models/GetCommerce.ts delete mode 100644 typescript-fetch/models/GetCommerceInner.ts delete mode 100644 typescript-fetch/models/GetIP.ts delete mode 100644 typescript-fetch/models/GetMe.ts delete mode 100644 typescript-fetch/models/GetMe401Response.ts delete mode 100644 typescript-fetch/models/GetMessages.ts delete mode 100644 typescript-fetch/models/GetMessagesMessagesInner.ts delete mode 100644 typescript-fetch/models/GetTemplates.ts delete mode 100644 typescript-fetch/models/GetTemplatesTemplatesInner.ts delete mode 100644 typescript-fetch/models/MeComponents.ts delete mode 100644 typescript-fetch/models/MediaId.ts delete mode 100644 typescript-fetch/models/Message.ts delete mode 100644 typescript-fetch/models/ReadMessageRequest.ts delete mode 100644 typescript-fetch/models/RemoveTemplateRequest.ts delete mode 100644 typescript-fetch/models/SendContactRequest.ts delete mode 100644 typescript-fetch/models/SendFileRequest.ts delete mode 100644 typescript-fetch/models/SendListRequest.ts delete mode 100644 typescript-fetch/models/SendListRequestAllOfRows.ts delete mode 100644 typescript-fetch/models/SendListRequestAllOfSections.ts delete mode 100644 typescript-fetch/models/SendLocationRequest.ts delete mode 100644 typescript-fetch/models/SendMessageRequest.ts delete mode 100644 typescript-fetch/models/SendMessageStatus.ts delete mode 100644 typescript-fetch/models/SendProductRequest.ts delete mode 100644 typescript-fetch/models/SendProductRequestAllOfAction.ts delete mode 100644 typescript-fetch/models/SendProductRequestAllOfActionProductItems.ts delete mode 100644 typescript-fetch/models/SendProductRequestAllOfActionSections.ts delete mode 100644 typescript-fetch/models/SendTemplateRequest.ts delete mode 100644 typescript-fetch/models/SendTemplateRequestAllOfCurrency.ts delete mode 100644 typescript-fetch/models/SendTemplateRequestAllOfDateTime.ts delete mode 100644 typescript-fetch/models/SendTemplateRequestAllOfDateTimeComponent.ts delete mode 100644 typescript-fetch/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts delete mode 100644 typescript-fetch/models/SendTemplateRequestAllOfLanguage.ts delete mode 100644 typescript-fetch/models/SendTemplateRequestAllOfParams.ts delete mode 100644 typescript-fetch/models/SetCommerce.ts delete mode 100644 typescript-fetch/models/SetMe.ts delete mode 100644 typescript-fetch/models/SetMeRequest.ts delete mode 100644 typescript-fetch/models/SetSettings200Response.ts delete mode 100644 typescript-fetch/models/SetSettings200ResponseAllOfUpdate.ts delete mode 100644 typescript-fetch/models/SetWebhookStatus.ts delete mode 100644 typescript-fetch/models/Settings.ts delete mode 100644 typescript-fetch/models/TemplateCategoryProp.ts delete mode 100644 typescript-fetch/models/TemplateComponentsProp.ts delete mode 100644 typescript-fetch/models/TemplateComponentsPropInner.ts delete mode 100644 typescript-fetch/models/TemplateComponentsPropInnerButtonsInner.ts delete mode 100644 typescript-fetch/models/TemplateLanguageProp.ts delete mode 100644 typescript-fetch/models/UploadMedia.ts delete mode 100644 typescript-fetch/models/WebhookUrl.ts delete mode 100644 typescript-fetch/models/index.ts delete mode 100644 typescript-fetch/openapitools.json delete mode 100644 typescript-fetch/package-lock.json delete mode 100644 typescript-fetch/package.json delete mode 100644 typescript-fetch/runtime.ts delete mode 100644 typescript-fetch/src/apis/ChannelApi.ts delete mode 100644 typescript-fetch/src/apis/MediaApi.ts delete mode 100644 typescript-fetch/src/apis/MessagingApi.ts delete mode 100644 typescript-fetch/src/apis/ProductsCatalogsApi.ts delete mode 100644 typescript-fetch/src/apis/TemplatesApi.ts delete mode 100644 typescript-fetch/src/apis/WebhooksApi.ts delete mode 100644 typescript-fetch/src/apis/index.ts delete mode 100644 typescript-fetch/src/index.ts delete mode 100644 typescript-fetch/src/models/Ack.ts delete mode 100644 typescript-fetch/src/models/AddTemplateRequest.ts delete mode 100644 typescript-fetch/src/models/ChannelExtendedStatisticsInner.ts delete mode 100644 typescript-fetch/src/models/ChannelStatistics.ts delete mode 100644 typescript-fetch/src/models/ChannelStatus.ts delete mode 100644 typescript-fetch/src/models/Commerce.ts delete mode 100644 typescript-fetch/src/models/CommerceParams.ts delete mode 100644 typescript-fetch/src/models/Contacts.ts delete mode 100644 typescript-fetch/src/models/ContactsContactsInner.ts delete mode 100644 typescript-fetch/src/models/ContactsRequest.ts delete mode 100644 typescript-fetch/src/models/GetAckInfo.ts delete mode 100644 typescript-fetch/src/models/GetAckInfoHooksInner.ts delete mode 100644 typescript-fetch/src/models/GetCommerceInner.ts delete mode 100644 typescript-fetch/src/models/GetIP.ts delete mode 100644 typescript-fetch/src/models/GetMe.ts delete mode 100644 typescript-fetch/src/models/GetMe401Response.ts delete mode 100644 typescript-fetch/src/models/GetMessages.ts delete mode 100644 typescript-fetch/src/models/GetMessagesMessagesInner.ts delete mode 100644 typescript-fetch/src/models/GetTemplates.ts delete mode 100644 typescript-fetch/src/models/GetTemplatesTemplatesInner.ts delete mode 100644 typescript-fetch/src/models/MeComponents.ts delete mode 100644 typescript-fetch/src/models/MediaId.ts delete mode 100644 typescript-fetch/src/models/Message.ts delete mode 100644 typescript-fetch/src/models/ReadMessageRequest.ts delete mode 100644 typescript-fetch/src/models/RemoveTemplateRequest.ts delete mode 100644 typescript-fetch/src/models/SendContactRequest.ts delete mode 100644 typescript-fetch/src/models/SendFileRequest.ts delete mode 100644 typescript-fetch/src/models/SendListRequest.ts delete mode 100644 typescript-fetch/src/models/SendListRequestAllOfRows.ts delete mode 100644 typescript-fetch/src/models/SendListRequestAllOfSections.ts delete mode 100644 typescript-fetch/src/models/SendLocationRequest.ts delete mode 100644 typescript-fetch/src/models/SendMessageRequest.ts delete mode 100644 typescript-fetch/src/models/SendMessageStatus.ts delete mode 100644 typescript-fetch/src/models/SendProductRequest.ts delete mode 100644 typescript-fetch/src/models/SendProductRequestAllOfAction.ts delete mode 100644 typescript-fetch/src/models/SendProductRequestAllOfActionProductItems.ts delete mode 100644 typescript-fetch/src/models/SendProductRequestAllOfActionSections.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequest.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequestAllOfCurrency.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequestAllOfDateTime.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeComponent.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequestAllOfLanguage.ts delete mode 100644 typescript-fetch/src/models/SendTemplateRequestAllOfParams.ts delete mode 100644 typescript-fetch/src/models/SetCommerce.ts delete mode 100644 typescript-fetch/src/models/SetMe.ts delete mode 100644 typescript-fetch/src/models/SetMeRequest.ts delete mode 100644 typescript-fetch/src/models/SetSettings200Response.ts delete mode 100644 typescript-fetch/src/models/SetSettings200ResponseAllOfUpdate.ts delete mode 100644 typescript-fetch/src/models/SetWebhookStatus.ts delete mode 100644 typescript-fetch/src/models/Settings.ts delete mode 100644 typescript-fetch/src/models/TemplateCategoryProp.ts delete mode 100644 typescript-fetch/src/models/TemplateComponentsPropInner.ts delete mode 100644 typescript-fetch/src/models/TemplateComponentsPropInnerButtonsInner.ts delete mode 100644 typescript-fetch/src/models/TemplateLanguageProp.ts delete mode 100644 typescript-fetch/src/models/UploadMedia.ts delete mode 100644 typescript-fetch/src/models/WebhookUrl.ts delete mode 100644 typescript-fetch/src/models/index.ts create mode 100644 typescript/.openapi-generator-ignore create mode 100644 typescript/LICENSE create mode 100644 typescript/README.md create mode 100644 typescript/jest.config.js create mode 100644 typescript/package.json create mode 100644 typescript/src/__tests__/chat-api-client.test.ts create mode 100644 typescript/src/__tests__/chat-api-config.test.ts create mode 100644 typescript/src/__tests__/fixtures/send-message.ts create mode 100644 typescript/src/chat-api-client.ts create mode 100644 typescript/src/chat-api-config.ts rename {typescript-fetch => typescript/src/generated}/.gitignore (100%) rename {typescript-fetch => typescript/src/generated}/.npmignore (100%) rename {c => typescript/src/generated}/.openapi-generator-ignore (100%) create mode 100644 typescript/src/generated/README.md create mode 100644 typescript/src/generated/docs/CreateGroups200Response.md create mode 100644 typescript/src/generated/docs/CreateReadMessage200Response.md create mode 100644 typescript/src/generated/docs/CreateReadMessage401Response.md create mode 100644 typescript/src/generated/docs/CreateReadMessageRequest.md create mode 100644 typescript/src/generated/docs/DeleteFlowsFlowId200Response.md create mode 100644 typescript/src/generated/docs/DeleteGroupsGroupId200Response.md create mode 100644 typescript/src/generated/docs/ErrorResponse.md create mode 100644 typescript/src/generated/docs/FlowsApi.md create mode 100644 typescript/src/generated/docs/GroupsApi.md create mode 100644 typescript/src/generated/docs/ListFlows200Response.md create mode 100644 typescript/src/generated/docs/ListMessages200Response.md create mode 100644 typescript/src/generated/docs/ListTemplates200Response.md create mode 100644 typescript/src/generated/docs/MessageSentResponse.md create mode 100644 typescript/src/generated/docs/MessagingApi.md create mode 100644 typescript/src/generated/docs/PatchFlowsFlowIdAssets200Response.md create mode 100644 typescript/src/generated/docs/ProfileApi.md create mode 100644 typescript/src/generated/docs/ProfileInfo.md create mode 100644 typescript/src/generated/docs/SendButtonRequest.md create mode 100644 typescript/src/generated/docs/SendButtonRequestSectionsInner.md create mode 100644 typescript/src/generated/docs/SendButtonRequestSectionsInnerReply.md create mode 100644 typescript/src/generated/docs/SendCarouselRequest1.md create mode 100644 typescript/src/generated/docs/SendContactRequest.md create mode 100644 typescript/src/generated/docs/SendContactRequestContactsInner.md create mode 100644 typescript/src/generated/docs/SendContactRequestContactsInnerName.md create mode 100644 typescript/src/generated/docs/SendContactRequestContactsInnerOrg.md create mode 100644 typescript/src/generated/docs/SendContactRequestContactsInnerPhonesInner.md create mode 100644 typescript/src/generated/docs/SendFileRequest.md create mode 100644 typescript/src/generated/docs/SendFlowRequest1.md create mode 100644 typescript/src/generated/docs/SendFlowRequest1Header.md create mode 100644 typescript/src/generated/docs/SendFlowRequestHeader.md create mode 100644 typescript/src/generated/docs/SendListRequest.md create mode 100644 typescript/src/generated/docs/SendListRequestSectionsInner.md create mode 100644 typescript/src/generated/docs/SendListRequestSectionsInnerRowsInner.md create mode 100644 typescript/src/generated/docs/SendLocationRequest1.md create mode 100644 typescript/src/generated/docs/SendLocationRequestRequest.md create mode 100644 typescript/src/generated/docs/SendMessageRequest.md create mode 100644 typescript/src/generated/docs/SendReactionRequest.md create mode 100644 typescript/src/generated/docs/SendTemplateRequest.md create mode 100644 typescript/src/generated/docs/SendTemplateRequestLanguage.md create mode 100644 typescript/src/generated/docs/SuccessResponse.md create mode 100644 typescript/src/generated/docs/TemplatesApi.md create mode 100644 typescript/src/generated/package.json create mode 100644 typescript/src/generated/src/apis/FlowsApi.ts create mode 100644 typescript/src/generated/src/apis/GroupsApi.ts create mode 100644 typescript/src/generated/src/apis/MessagingApi.ts create mode 100644 typescript/src/generated/src/apis/ProfileApi.ts create mode 100644 typescript/src/generated/src/apis/TemplatesApi.ts create mode 100644 typescript/src/generated/src/apis/index.ts rename {typescript-fetch => typescript/src/generated/src}/index.ts (100%) create mode 100644 typescript/src/generated/src/models/CreateGroups200Response.ts create mode 100644 typescript/src/generated/src/models/CreateReadMessage200Response.ts create mode 100644 typescript/src/generated/src/models/CreateReadMessage401Response.ts create mode 100644 typescript/src/generated/src/models/CreateReadMessageRequest.ts create mode 100644 typescript/src/generated/src/models/DeleteFlowsFlowId200Response.ts create mode 100644 typescript/src/generated/src/models/DeleteGroupsGroupId200Response.ts create mode 100644 typescript/src/generated/src/models/ErrorResponse.ts create mode 100644 typescript/src/generated/src/models/ListFlows200Response.ts create mode 100644 typescript/src/generated/src/models/ListMessages200Response.ts create mode 100644 typescript/src/generated/src/models/ListTemplates200Response.ts create mode 100644 typescript/src/generated/src/models/MessageSentResponse.ts create mode 100644 typescript/src/generated/src/models/PatchFlowsFlowIdAssets200Response.ts create mode 100644 typescript/src/generated/src/models/ProfileInfo.ts create mode 100644 typescript/src/generated/src/models/SendButtonRequest.ts create mode 100644 typescript/src/generated/src/models/SendButtonRequestSectionsInner.ts create mode 100644 typescript/src/generated/src/models/SendButtonRequestSectionsInnerReply.ts create mode 100644 typescript/src/generated/src/models/SendCarouselRequest1.ts create mode 100644 typescript/src/generated/src/models/SendContactRequest.ts create mode 100644 typescript/src/generated/src/models/SendContactRequestContactsInner.ts create mode 100644 typescript/src/generated/src/models/SendContactRequestContactsInnerName.ts create mode 100644 typescript/src/generated/src/models/SendContactRequestContactsInnerOrg.ts create mode 100644 typescript/src/generated/src/models/SendContactRequestContactsInnerPhonesInner.ts create mode 100644 typescript/src/generated/src/models/SendFileRequest.ts create mode 100644 typescript/src/generated/src/models/SendFlowRequest1.ts create mode 100644 typescript/src/generated/src/models/SendFlowRequest1Header.ts create mode 100644 typescript/src/generated/src/models/SendFlowRequestHeader.ts create mode 100644 typescript/src/generated/src/models/SendListRequest.ts create mode 100644 typescript/src/generated/src/models/SendListRequestSectionsInner.ts create mode 100644 typescript/src/generated/src/models/SendListRequestSectionsInnerRowsInner.ts create mode 100644 typescript/src/generated/src/models/SendLocationRequest1.ts create mode 100644 typescript/src/generated/src/models/SendLocationRequestRequest.ts create mode 100644 typescript/src/generated/src/models/SendMessageRequest.ts create mode 100644 typescript/src/generated/src/models/SendReactionRequest.ts create mode 100644 typescript/src/generated/src/models/SendTemplateRequest.ts create mode 100644 typescript/src/generated/src/models/SendTemplateRequestLanguage.ts create mode 100644 typescript/src/generated/src/models/SuccessResponse.ts create mode 100644 typescript/src/generated/src/models/index.ts rename {typescript-fetch => typescript/src/generated}/src/runtime.ts (89%) create mode 100644 typescript/src/generated/tsconfig.esm.json rename {typescript-fetch => typescript/src/generated}/tsconfig.json (78%) create mode 100644 typescript/src/index.ts create mode 100644 typescript/src/version.ts create mode 100644 typescript/tsconfig.build.json create mode 100644 typescript/tsconfig.json diff --git a/c/external/cJSON.licence b/LICENSE similarity index 86% rename from c/external/cJSON.licence rename to LICENSE index 4723447..b9fe06c 100644 --- a/c/external/cJSON.licence +++ b/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2009-2017 Dave Gamble and cJSON contributors +MIT License + +Copyright (c) 2026 1MSG Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -7,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 93f59b5..50fb33e 100644 --- a/README.md +++ b/README.md @@ -1 +1,28 @@ -# 1sdk \ No newline at end of file +# 1msg SDK + +Public SDKs for [1msg.io](https://1msg.io) extended WhatsApp API. + +## TypeScript / JavaScript + +```bash +npm install @1msg/sdk +``` + +```typescript +import { createClient } from '@1msg/sdk'; + +const client = createClient({ + baseUrl: 'https://api.1msg.io', + instanceId: 'YOUR_INSTANCE_ID', + token: process.env.MSG_API_TOKEN!, +}); + +await client.sendMessage({ body: 'Hello', chatId: '12020721369@c.us' }); +``` + +Source: [`typescript/`](./typescript) + +## Other languages + +Additional SDKs will be published gradually to their respective package registries. +See the [1msg Developers Platform](https://1msg.io) for install commands. diff --git a/c/.openapi-generator/FILES b/c/.openapi-generator/FILES deleted file mode 100644 index 4d08530..0000000 --- a/c/.openapi-generator/FILES +++ /dev/null @@ -1,293 +0,0 @@ -.openapi-generator-ignore -CMakeLists.txt -Packing.cmake -README.md -api/ChannelAPI.c -api/ChannelAPI.h -api/MediaAPI.c -api/MediaAPI.h -api/MessagingAPI.c -api/MessagingAPI.h -api/ProductsCatalogsAPI.c -api/ProductsCatalogsAPI.h -api/TemplatesAPI.c -api/TemplatesAPI.h -api/WebhooksAPI.c -api/WebhooksAPI.h -docs/ChannelAPI.md -docs/MediaAPI.md -docs/MessagingAPI.md -docs/ProductsCatalogsAPI.md -docs/TemplatesAPI.md -docs/WebhooksAPI.md -docs/ack.md -docs/add_template_request.md -docs/channel_extended_statistics.md -docs/channel_extended_statistics_inner.md -docs/channel_statistics.md -docs/channel_status.md -docs/chat_id_prop.md -docs/commerce.md -docs/commerce_params.md -docs/contacts.md -docs/contacts_contacts_inner.md -docs/contacts_request.md -docs/get_ack_info.md -docs/get_ack_info_hooks_inner.md -docs/get_commerce.md -docs/get_commerce_inner.md -docs/get_ip.md -docs/get_me.md -docs/get_me_401_response.md -docs/get_messages.md -docs/get_messages_messages_inner.md -docs/get_templates.md -docs/get_templates_templates_inner.md -docs/me_components.md -docs/media_id.md -docs/message.md -docs/message_id_prop.md -docs/phone_prop.md -docs/read_message_request.md -docs/remove_template_request.md -docs/send_contact_request.md -docs/send_file_request.md -docs/send_list_request.md -docs/send_list_request_all_of_rows.md -docs/send_list_request_all_of_sections.md -docs/send_location_request.md -docs/send_message_request.md -docs/send_message_status.md -docs/send_product_request.md -docs/send_product_request_all_of_action.md -docs/send_product_request_all_of_action_product_items.md -docs/send_product_request_all_of_action_sections.md -docs/send_template_request.md -docs/send_template_request_all_of_currency.md -docs/send_template_request_all_of_date_time.md -docs/send_template_request_all_of_date_time_component.md -docs/send_template_request_all_of_date_time_unix_epoch.md -docs/send_template_request_all_of_language.md -docs/send_template_request_all_of_params.md -docs/set_commerce.md -docs/set_me.md -docs/set_me_request.md -docs/set_settings_200_response.md -docs/set_settings_200_response_all_of_update.md -docs/set_webhook_status.md -docs/settings.md -docs/template_category_prop.md -docs/template_components_prop.md -docs/template_components_prop_inner.md -docs/template_components_prop_inner_buttons_inner.md -docs/template_language_prop.md -docs/template_namespace_field.md -docs/upload_media.md -docs/webhook_url.md -external/cJSON.c -external/cJSON.h -external/cJSON.licence -include/apiClient.h -include/binary.h -include/keyValuePair.h -include/list.h -libcurl.licence -model/ack.c -model/ack.h -model/add_template_request.c -model/add_template_request.h -model/channel_extended_statistics.c -model/channel_extended_statistics.h -model/channel_extended_statistics_inner.c -model/channel_extended_statistics_inner.h -model/channel_statistics.c -model/channel_statistics.h -model/channel_status.c -model/channel_status.h -model/chat_id_prop.c -model/chat_id_prop.h -model/commerce.c -model/commerce.h -model/commerce_params.c -model/commerce_params.h -model/contacts.c -model/contacts.h -model/contacts_contacts_inner.c -model/contacts_contacts_inner.h -model/contacts_request.c -model/contacts_request.h -model/get_ack_info.c -model/get_ack_info.h -model/get_ack_info_hooks_inner.c -model/get_ack_info_hooks_inner.h -model/get_commerce.c -model/get_commerce.h -model/get_commerce_inner.c -model/get_commerce_inner.h -model/get_ip.c -model/get_ip.h -model/get_me.c -model/get_me.h -model/get_me_401_response.c -model/get_me_401_response.h -model/get_messages.c -model/get_messages.h -model/get_messages_messages_inner.c -model/get_messages_messages_inner.h -model/get_templates.c -model/get_templates.h -model/get_templates_templates_inner.c -model/get_templates_templates_inner.h -model/me_components.c -model/me_components.h -model/media_id.c -model/media_id.h -model/message.c -model/message.h -model/message_id_prop.c -model/message_id_prop.h -model/object.c -model/object.h -model/phone_prop.c -model/phone_prop.h -model/read_message_request.c -model/read_message_request.h -model/remove_template_request.c -model/remove_template_request.h -model/send_contact_request.c -model/send_contact_request.h -model/send_file_request.c -model/send_file_request.h -model/send_list_request.c -model/send_list_request.h -model/send_list_request_all_of_rows.c -model/send_list_request_all_of_rows.h -model/send_list_request_all_of_sections.c -model/send_list_request_all_of_sections.h -model/send_location_request.c -model/send_location_request.h -model/send_message_request.c -model/send_message_request.h -model/send_message_status.c -model/send_message_status.h -model/send_product_request.c -model/send_product_request.h -model/send_product_request_all_of_action.c -model/send_product_request_all_of_action.h -model/send_product_request_all_of_action_product_items.c -model/send_product_request_all_of_action_product_items.h -model/send_product_request_all_of_action_sections.c -model/send_product_request_all_of_action_sections.h -model/send_template_request.c -model/send_template_request.h -model/send_template_request_all_of_currency.c -model/send_template_request_all_of_currency.h -model/send_template_request_all_of_date_time.c -model/send_template_request_all_of_date_time.h -model/send_template_request_all_of_date_time_component.c -model/send_template_request_all_of_date_time_component.h -model/send_template_request_all_of_date_time_unix_epoch.c -model/send_template_request_all_of_date_time_unix_epoch.h -model/send_template_request_all_of_language.c -model/send_template_request_all_of_language.h -model/send_template_request_all_of_params.c -model/send_template_request_all_of_params.h -model/set_commerce.c -model/set_commerce.h -model/set_me.c -model/set_me.h -model/set_me_request.c -model/set_me_request.h -model/set_settings_200_response.c -model/set_settings_200_response.h -model/set_settings_200_response_all_of_update.c -model/set_settings_200_response_all_of_update.h -model/set_webhook_status.c -model/set_webhook_status.h -model/settings.c -model/settings.h -model/template_category_prop.c -model/template_category_prop.h -model/template_components_prop.c -model/template_components_prop.h -model/template_components_prop_inner.c -model/template_components_prop_inner.h -model/template_components_prop_inner_buttons_inner.c -model/template_components_prop_inner_buttons_inner.h -model/template_language_prop.c -model/template_language_prop.h -model/template_namespace_field.c -model/template_namespace_field.h -model/upload_media.c -model/upload_media.h -model/webhook_url.c -model/webhook_url.h -src/apiClient.c -src/apiKey.c -src/binary.c -src/list.c -uncrustify-rules.cfg -unit-test/test_ack.c -unit-test/test_add_template_request.c -unit-test/test_channel_extended_statistics.c -unit-test/test_channel_extended_statistics_inner.c -unit-test/test_channel_statistics.c -unit-test/test_channel_status.c -unit-test/test_chat_id_prop.c -unit-test/test_commerce.c -unit-test/test_commerce_params.c -unit-test/test_contacts.c -unit-test/test_contacts_contacts_inner.c -unit-test/test_contacts_request.c -unit-test/test_get_ack_info.c -unit-test/test_get_ack_info_hooks_inner.c -unit-test/test_get_commerce.c -unit-test/test_get_commerce_inner.c -unit-test/test_get_ip.c -unit-test/test_get_me.c -unit-test/test_get_me_401_response.c -unit-test/test_get_messages.c -unit-test/test_get_messages_messages_inner.c -unit-test/test_get_templates.c -unit-test/test_get_templates_templates_inner.c -unit-test/test_me_components.c -unit-test/test_media_id.c -unit-test/test_message.c -unit-test/test_message_id_prop.c -unit-test/test_phone_prop.c -unit-test/test_read_message_request.c -unit-test/test_remove_template_request.c -unit-test/test_send_contact_request.c -unit-test/test_send_file_request.c -unit-test/test_send_list_request.c -unit-test/test_send_list_request_all_of_rows.c -unit-test/test_send_list_request_all_of_sections.c -unit-test/test_send_location_request.c -unit-test/test_send_message_request.c -unit-test/test_send_message_status.c -unit-test/test_send_product_request.c -unit-test/test_send_product_request_all_of_action.c -unit-test/test_send_product_request_all_of_action_product_items.c -unit-test/test_send_product_request_all_of_action_sections.c -unit-test/test_send_template_request.c -unit-test/test_send_template_request_all_of_currency.c -unit-test/test_send_template_request_all_of_date_time.c -unit-test/test_send_template_request_all_of_date_time_component.c -unit-test/test_send_template_request_all_of_date_time_unix_epoch.c -unit-test/test_send_template_request_all_of_language.c -unit-test/test_send_template_request_all_of_params.c -unit-test/test_set_commerce.c -unit-test/test_set_me.c -unit-test/test_set_me_request.c -unit-test/test_set_settings_200_response.c -unit-test/test_set_settings_200_response_all_of_update.c -unit-test/test_set_webhook_status.c -unit-test/test_settings.c -unit-test/test_template_category_prop.c -unit-test/test_template_components_prop.c -unit-test/test_template_components_prop_inner.c -unit-test/test_template_components_prop_inner_buttons_inner.c -unit-test/test_template_language_prop.c -unit-test/test_template_namespace_field.c -unit-test/test_upload_media.c -unit-test/test_webhook_url.c diff --git a/c/.openapi-generator/VERSION b/c/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/c/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt deleted file mode 100644 index 0bd6acf..0000000 --- a/c/CMakeLists.txt +++ /dev/null @@ -1,310 +0,0 @@ -cmake_minimum_required (VERSION 2.6...3.10.2) -project (CGenerator) - -cmake_policy(SET CMP0063 NEW) - -set(CMAKE_C_VISIBILITY_PRESET default) -set(CMAKE_CXX_VISIBILITY_PRESET default) -set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF) -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -option(BUILD_SHARED_LIBS "Build using shared libraries" ON) - -find_package(OpenSSL) - -if (OPENSSL_FOUND) - message (STATUS "OPENSSL found") - - set(CMAKE_C_FLAGS "-DOPENSSL") - if(CMAKE_VERSION VERSION_LESS 3.4) - include_directories(${OPENSSL_INCLUDE_DIR}) - include_directories(${OPENSSL_INCLUDE_DIRS}) - link_directories(${OPENSSL_LIBRARIES}) - endif() - - message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") -else() - message (STATUS "OpenSSL Not found.") -endif() - -set(pkgName "one_msg_waba_sdk") - -# this default version can be overridden in PreTarget.cmake -set(PROJECT_VERSION_MAJOR 0) -set(PROJECT_VERSION_MINOR 0) -set(PROJECT_VERSION_PATCH 1) - -if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES)) - include_directories(${CURL_INCLUDE_DIR}) - set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} ) -else() - find_package(CURL 7.58.0 REQUIRED) - if(CURL_FOUND) - include_directories(${CURL_INCLUDE_DIR}) - set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} ) - else(CURL_FOUND) - message(FATAL_ERROR "Could not find the CURL library and development files.") - endif() -endif() - -set(SRCS - src/list.c - src/apiKey.c - src/apiClient.c - src/binary.c - external/cJSON.c - model/object.c - model/ack.c - model/add_template_request.c - model/channel_extended_statistics.c - model/channel_extended_statistics_inner.c - model/channel_statistics.c - model/channel_status.c - model/chat_id_prop.c - model/commerce.c - model/commerce_params.c - model/contacts.c - model/contacts_contacts_inner.c - model/contacts_request.c - model/get_ack_info.c - model/get_ack_info_hooks_inner.c - model/get_commerce.c - model/get_commerce_inner.c - model/get_ip.c - model/get_me.c - model/get_me_401_response.c - model/get_messages.c - model/get_messages_messages_inner.c - model/get_templates.c - model/get_templates_templates_inner.c - model/me_components.c - model/media_id.c - model/message.c - model/message_id_prop.c - model/phone_prop.c - model/read_message_request.c - model/remove_template_request.c - model/send_contact_request.c - model/send_file_request.c - model/send_list_request.c - model/send_list_request_all_of_rows.c - model/send_list_request_all_of_sections.c - model/send_location_request.c - model/send_message_request.c - model/send_message_status.c - model/send_product_request.c - model/send_product_request_all_of_action.c - model/send_product_request_all_of_action_product_items.c - model/send_product_request_all_of_action_sections.c - model/send_template_request.c - model/send_template_request_all_of_currency.c - model/send_template_request_all_of_date_time.c - model/send_template_request_all_of_date_time_component.c - model/send_template_request_all_of_date_time_unix_epoch.c - model/send_template_request_all_of_language.c - model/send_template_request_all_of_params.c - model/set_commerce.c - model/set_me.c - model/set_me_request.c - model/set_settings_200_response.c - model/set_settings_200_response_all_of_update.c - model/set_webhook_status.c - model/settings.c - model/template_category_prop.c - model/template_components_prop.c - model/template_components_prop_inner.c - model/template_components_prop_inner_buttons_inner.c - model/template_language_prop.c - model/template_namespace_field.c - model/upload_media.c - model/webhook_url.c - api/ChannelAPI.c - api/MediaAPI.c - api/MessagingAPI.c - api/ProductsCatalogsAPI.c - api/TemplatesAPI.c - api/WebhooksAPI.c - -) - -set(HDRS - include/apiClient.h - include/list.h - include/binary.h - include/keyValuePair.h - external/cJSON.h - model/object.h - model/ack.h - model/add_template_request.h - model/channel_extended_statistics.h - model/channel_extended_statistics_inner.h - model/channel_statistics.h - model/channel_status.h - model/chat_id_prop.h - model/commerce.h - model/commerce_params.h - model/contacts.h - model/contacts_contacts_inner.h - model/contacts_request.h - model/get_ack_info.h - model/get_ack_info_hooks_inner.h - model/get_commerce.h - model/get_commerce_inner.h - model/get_ip.h - model/get_me.h - model/get_me_401_response.h - model/get_messages.h - model/get_messages_messages_inner.h - model/get_templates.h - model/get_templates_templates_inner.h - model/me_components.h - model/media_id.h - model/message.h - model/message_id_prop.h - model/phone_prop.h - model/read_message_request.h - model/remove_template_request.h - model/send_contact_request.h - model/send_file_request.h - model/send_list_request.h - model/send_list_request_all_of_rows.h - model/send_list_request_all_of_sections.h - model/send_location_request.h - model/send_message_request.h - model/send_message_status.h - model/send_product_request.h - model/send_product_request_all_of_action.h - model/send_product_request_all_of_action_product_items.h - model/send_product_request_all_of_action_sections.h - model/send_template_request.h - model/send_template_request_all_of_currency.h - model/send_template_request_all_of_date_time.h - model/send_template_request_all_of_date_time_component.h - model/send_template_request_all_of_date_time_unix_epoch.h - model/send_template_request_all_of_language.h - model/send_template_request_all_of_params.h - model/set_commerce.h - model/set_me.h - model/set_me_request.h - model/set_settings_200_response.h - model/set_settings_200_response_all_of_update.h - model/set_webhook_status.h - model/settings.h - model/template_category_prop.h - model/template_components_prop.h - model/template_components_prop_inner.h - model/template_components_prop_inner_buttons_inner.h - model/template_language_prop.h - model/template_namespace_field.h - model/upload_media.h - model/webhook_url.h - api/ChannelAPI.h - api/MediaAPI.h - api/MessagingAPI.h - api/ProductsCatalogsAPI.h - api/TemplatesAPI.h - api/WebhooksAPI.h - -) - -include(PreTarget.cmake OPTIONAL) - -set(PROJECT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") - -# Add library with project file with project name as library name -add_library(${pkgName} ${SRCS} ${HDRS}) -# Link dependent libraries -if(NOT CMAKE_VERSION VERSION_LESS 3.4) - target_link_libraries(${pkgName} PRIVATE OpenSSL::SSL OpenSSL::Crypto) -endif() -target_link_libraries(${pkgName} PUBLIC ${CURL_LIBRARIES} ) -target_include_directories( - ${pkgName} PUBLIC $ - $ -) - -include(PostTarget.cmake OPTIONAL) - -# installation of libraries, headers, and config files -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in) - install(TARGETS ${pkgName} DESTINATION lib) -else() - include(GNUInstallDirs) - install(TARGETS ${pkgName} DESTINATION lib EXPORT ${pkgName}Targets) - - foreach(HDR_FILE ${HDRS}) - get_filename_component(HDR_DIRECTORY ${HDR_FILE} DIRECTORY) - get_filename_component(ABSOLUTE_HDR_DIRECTORY ${HDR_DIRECTORY} ABSOLUTE) - file(RELATIVE_PATH RELATIVE_HDR_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${ABSOLUTE_HDR_DIRECTORY}) - install(FILES ${HDR_FILE} DESTINATION include/${pkgName}/${RELATIVE_HDR_PATH}) - endforeach() - - include(CMakePackageConfigHelpers) - write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake" - VERSION "${PROJECT_VERSION_STRING}" - COMPATIBILITY AnyNewerVersion - ) - - export(EXPORT ${pkgName}Targets - FILE "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Targets.cmake" - NAMESPACE ${pkgName}:: - ) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake" - @ONLY - ) - - set(ConfigPackageLocation lib/cmake/${pkgName}) - install(EXPORT ${pkgName}Targets - FILE - ${pkgName}Targets.cmake - NAMESPACE - ${pkgName}:: - DESTINATION - ${ConfigPackageLocation} - ) - install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake" - DESTINATION - ${ConfigPackageLocation} - ) -endif() - -# make installation packages -include(Packing.cmake OPTIONAL) - -# Setting file variables to null -set(SRCS "") -set(HDRS "") - - -## This section shows how to use the above compiled library to compile the source files -## set source files -#set(SRCS -# unit-tests/manual-ChannelAPI.c -# unit-tests/manual-MediaAPI.c -# unit-tests/manual-MessagingAPI.c -# unit-tests/manual-ProductsCatalogsAPI.c -# unit-tests/manual-TemplatesAPI.c -# unit-tests/manual-WebhooksAPI.c -#) - -##set header files -#set(HDRS -#) - -## loop over all files in SRCS variable -#foreach(SOURCE_FILE ${SRCS}) -# # Get only the file name from the file as add_executable does not support executable with slash("/") -# get_filename_component(FILE_NAME_ONLY ${SOURCE_FILE} NAME_WE) -# # Remove .c from the file name and set it as executable name -# string( REPLACE ".c" "" EXECUTABLE_FILE ${FILE_NAME_ONLY}) -# # Add executable for every source file in SRCS -# add_executable(unit-${EXECUTABLE_FILE} ${SOURCE_FILE}) -# # Link above created library to executable and dependent library curl -# target_link_libraries(unit-${EXECUTABLE_FILE} ${CURL_LIBRARIES} ${pkgName} ) -#endforeach(SOURCE_FILE ${SRCS}) diff --git a/c/Packing.cmake b/c/Packing.cmake deleted file mode 100644 index 15bd4c8..0000000 --- a/c/Packing.cmake +++ /dev/null @@ -1,24 +0,0 @@ -set(CPACK_PACKAGE_NAME lib${pkgName}) - -set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) - -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_PACKAGE_DESCRIPTION_SUMMARY}) -set(CPACK_PACKAGE_VENDOR ${PROJECT_PACKAGE_VENDOR}) -set(CPACK_PACKAGE_CONTACT ${PROJECT_PACKAGE_CONTACT}) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PROJECT_PACKAGE_MAINTAINER}) - -set(CPACK_VERBATIM_VARIABLES YES) - -set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) - -set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) - -set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) - -set(CPACK_DEB_COMPONENT_INSTALL YES) - -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) - -include(CPack) \ No newline at end of file diff --git a/c/README.md b/c/README.md deleted file mode 100644 index 7bdef01..0000000 --- a/c/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# C API client for one_msg_waba_sdk - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 2.39.0 -- Package version: -- Build package: org.openapitools.codegen.languages.CLibcurlClientCodegen - -## Installation -You'll need the `curl 7.58.0` package in order to build the API. To have code formatted nicely, you also need to have uncrustify version 0.67 or later. - -# Prerequisites - -## Install the `curl 7.58.0` package with the following command on Linux. -```bash -sudo apt remove curl -wget http://curl.haxx.se/download/curl-7.58.0.tar.gz -tar -xvf curl-7.58.0.tar.gz -cd curl-7.58.0/ -./configure -make -sudo make install -``` -## Install the `uncrustify 0.67` package with the following command on Linux. -```bash -git clone https://github.com/uncrustify/uncrustify.git -cd uncrustify -mkdir build -cd build -cmake .. -make -sudo make install -``` - -## Compile the sample: -This will compile the generated code and create a library in the build folder which has to be linked to the codes where API will be used. -```bash -mkdir build -cd build -// To install library to specific location, use following commands -cmake -DCMAKE_INSTALL_PREFIX=/pathtolocation .. -// for normal install use following command -cmake .. -make -sudo make install -``` -## How to use compiled library -Considering the test/source code which uses the API is written in main.c(respective api include is written and all objects necessary are defined and created) - -To compile main.c(considering the file is present in build folder) use following command --L - location of the library(not required if cmake with normal installation is performed) --l library name -```bash -gcc main.c -L. -lone_msg_waba_sdk -o main -``` -Once compiled, you can run it with ``` ./main ``` - -Note: You don't need to specify includes for models and include folder separately as they are path linked. You just have to import the api.h file in your code, the include linking will work. - -## Documentation for API Endpoints - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Category | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ChannelAPI* | [**ChannelAPI_getCommerce**](docs/ChannelAPI.md#ChannelAPI_getCommerce) | **GET** /commerce | Get Commerce Settings -*ChannelAPI* | [**ChannelAPI_getExtendedStatistics**](docs/ChannelAPI.md#ChannelAPI_getExtendedStatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -*ChannelAPI* | [**ChannelAPI_getMe**](docs/ChannelAPI.md#ChannelAPI_getMe) | **GET** /me | Get Profile Info -*ChannelAPI* | [**ChannelAPI_getSettings**](docs/ChannelAPI.md#ChannelAPI_getSettings) | **GET** /settings | Get Settings -*ChannelAPI* | [**ChannelAPI_getStatistics**](docs/ChannelAPI.md#ChannelAPI_getStatistics) | **GET** /statistics | Get Channel statistics -*ChannelAPI* | [**ChannelAPI_getStatus**](docs/ChannelAPI.md#ChannelAPI_getStatus) | **GET** /status | Get Status -*ChannelAPI* | [**ChannelAPI_outputIP**](docs/ChannelAPI.md#ChannelAPI_outputIP) | **GET** /outputIP | Get channel server IP -*ChannelAPI* | [**ChannelAPI_setMe**](docs/ChannelAPI.md#ChannelAPI_setMe) | **POST** /me | Change user info -*ChannelAPI* | [**ChannelAPI_setSettings**](docs/ChannelAPI.md#ChannelAPI_setSettings) | **POST** /settings | Set settings -*MediaAPI* | [**MediaAPI_uploadMedia**](docs/MediaAPI.md#MediaAPI_uploadMedia) | **POST** /uploadMedia | Upload media & get mediaId -*MessagingAPI* | [**MessagingAPI_messagesList**](docs/MessagingAPI.md#MessagingAPI_messagesList) | **GET** /messages | Get messages list -*MessagingAPI* | [**MessagingAPI_readMessage**](docs/MessagingAPI.md#MessagingAPI_readMessage) | **POST** /readMessage | Mark message as read -*MessagingAPI* | [**MessagingAPI_sendContact**](docs/MessagingAPI.md#MessagingAPI_sendContact) | **POST** /sendContact | Send a Contact -*MessagingAPI* | [**MessagingAPI_sendFile**](docs/MessagingAPI.md#MessagingAPI_sendFile) | **POST** /sendFile | Send a File -*MessagingAPI* | [**MessagingAPI_sendList**](docs/MessagingAPI.md#MessagingAPI_sendList) | **POST** /sendList | Send List Message -*MessagingAPI* | [**MessagingAPI_sendLocation**](docs/MessagingAPI.md#MessagingAPI_sendLocation) | **POST** /sendLocation | Send a Location -*MessagingAPI* | [**MessagingAPI_sendMessage**](docs/MessagingAPI.md#MessagingAPI_sendMessage) | **POST** /sendMessage | Send a Message -*ProductsCatalogsAPI* | [**ProductsCatalogsAPI_sendProduct**](docs/ProductsCatalogsAPI.md#ProductsCatalogsAPI_sendProduct) | **POST** /sendProduct | Send a Product -*ProductsCatalogsAPI* | [**ProductsCatalogsAPI_setCommerce**](docs/ProductsCatalogsAPI.md#ProductsCatalogsAPI_setCommerce) | **POST** /commerce | Set Commerce Settings -*TemplatesAPI* | [**TemplatesAPI_addTemplate**](docs/TemplatesAPI.md#TemplatesAPI_addTemplate) | **POST** /addTemplate | Create template -*TemplatesAPI* | [**TemplatesAPI_removeTemplate**](docs/TemplatesAPI.md#TemplatesAPI_removeTemplate) | **POST** /removeTemplate | Remove template -*TemplatesAPI* | [**TemplatesAPI_sendTemplate**](docs/TemplatesAPI.md#TemplatesAPI_sendTemplate) | **POST** /sendTemplate | Send Template Message -*TemplatesAPI* | [**TemplatesAPI_templatesList**](docs/TemplatesAPI.md#TemplatesAPI_templatesList) | **GET** /templates | Get templates list -*WebhooksAPI* | [**WebhooksAPI_ackHookInfo**](docs/WebhooksAPI.md#WebhooksAPI_ackHookInfo) | **GET** /hookInfo | Check ACKs -*WebhooksAPI* | [**WebhooksAPI_setWebhook**](docs/WebhooksAPI.md#WebhooksAPI_setWebhook) | **POST** /webhook | Set webhook - - -## Documentation for Models - - - [ack_t](docs/ack.md) - - [add_template_request_t](docs/add_template_request.md) - - [channel_extended_statistics_t](docs/channel_extended_statistics.md) - - [channel_extended_statistics_inner_t](docs/channel_extended_statistics_inner.md) - - [channel_statistics_t](docs/channel_statistics.md) - - [channel_status_t](docs/channel_status.md) - - [chat_id_prop_t](docs/chat_id_prop.md) - - [commerce_t](docs/commerce.md) - - [commerce_params_t](docs/commerce_params.md) - - [contacts_t](docs/contacts.md) - - [contacts_contacts_inner_t](docs/contacts_contacts_inner.md) - - [contacts_request_t](docs/contacts_request.md) - - [get_ack_info_t](docs/get_ack_info.md) - - [get_ack_info_hooks_inner_t](docs/get_ack_info_hooks_inner.md) - - [get_commerce_t](docs/get_commerce.md) - - [get_commerce_inner_t](docs/get_commerce_inner.md) - - [get_ip_t](docs/get_ip.md) - - [get_me_t](docs/get_me.md) - - [get_me_401_response_t](docs/get_me_401_response.md) - - [get_messages_t](docs/get_messages.md) - - [get_messages_messages_inner_t](docs/get_messages_messages_inner.md) - - [get_templates_t](docs/get_templates.md) - - [get_templates_templates_inner_t](docs/get_templates_templates_inner.md) - - [me_components_t](docs/me_components.md) - - [media_id_t](docs/media_id.md) - - [message_t](docs/message.md) - - [message_id_prop_t](docs/message_id_prop.md) - - [phone_prop_t](docs/phone_prop.md) - - [read_message_request_t](docs/read_message_request.md) - - [remove_template_request_t](docs/remove_template_request.md) - - [send_contact_request_t](docs/send_contact_request.md) - - [send_file_request_t](docs/send_file_request.md) - - [send_list_request_t](docs/send_list_request.md) - - [send_list_request_all_of_rows_t](docs/send_list_request_all_of_rows.md) - - [send_list_request_all_of_sections_t](docs/send_list_request_all_of_sections.md) - - [send_location_request_t](docs/send_location_request.md) - - [send_message_request_t](docs/send_message_request.md) - - [send_message_status_t](docs/send_message_status.md) - - [send_product_request_t](docs/send_product_request.md) - - [send_product_request_all_of_action_t](docs/send_product_request_all_of_action.md) - - [send_product_request_all_of_action_product_items_t](docs/send_product_request_all_of_action_product_items.md) - - [send_product_request_all_of_action_sections_t](docs/send_product_request_all_of_action_sections.md) - - [send_template_request_t](docs/send_template_request.md) - - [send_template_request_all_of_currency_t](docs/send_template_request_all_of_currency.md) - - [send_template_request_all_of_date_time_t](docs/send_template_request_all_of_date_time.md) - - [send_template_request_all_of_date_time_component_t](docs/send_template_request_all_of_date_time_component.md) - - [send_template_request_all_of_date_time_unix_epoch_t](docs/send_template_request_all_of_date_time_unix_epoch.md) - - [send_template_request_all_of_language_t](docs/send_template_request_all_of_language.md) - - [send_template_request_all_of_params_t](docs/send_template_request_all_of_params.md) - - [set_commerce_t](docs/set_commerce.md) - - [set_me_t](docs/set_me.md) - - [set_me_request_t](docs/set_me_request.md) - - [set_settings_200_response_t](docs/set_settings_200_response.md) - - [set_settings_200_response_all_of_update_t](docs/set_settings_200_response_all_of_update.md) - - [set_webhook_status_t](docs/set_webhook_status.md) - - [settings_t](docs/settings.md) - - [template_category_prop_t](docs/template_category_prop.md) - - [template_components_prop_t](docs/template_components_prop.md) - - [template_components_prop_inner_t](docs/template_components_prop_inner.md) - - [template_components_prop_inner_buttons_inner_t](docs/template_components_prop_inner_buttons_inner.md) - - [template_language_prop_t](docs/template_language_prop.md) - - [template_namespace_field_t](docs/template_namespace_field.md) - - [upload_media_t](docs/upload_media.md) - - [webhook_url_t](docs/webhook_url.md) - - -## Documentation for Authorization - - -Authentication schemes defined for the API: -### token - -- **Type**: API key - -- **API key parameter name**: token -- **Location**: URL query string - - -## Author - -hello@1msg.io - diff --git a/c/api/ChannelAPI.c b/c/api/ChannelAPI.c deleted file mode 100644 index 0a5bd1f..0000000 --- a/c/api/ChannelAPI.c +++ /dev/null @@ -1,661 +0,0 @@ -#include -#include -#include -#include "ChannelAPI.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// Get Commerce Settings -// -// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. -// -get_commerce_t* -ChannelAPI_getCommerce(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/commerce")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/commerce"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - get_commerce_t *elementToReturn = get_commerce_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get Extended Channel statistics -// -// Get channel usage extended statistics -// -channel_extended_statistics_t* -ChannelAPI_getExtendedStatistics(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/extendedStatistics")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/extendedStatistics"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - channel_extended_statistics_t *elementToReturn = channel_extended_statistics_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get Profile Info -// -// Use this edge to retrieve your profile's About info -// -get_me_t* -ChannelAPI_getMe(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/me")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/me"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - get_me_t *elementToReturn = get_me_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get Settings -// -// **webhookUrl** - Http or https URL for receiving notifications. -// -settings_t* -ChannelAPI_getSettings(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/settings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/settings"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - settings_t *elementToReturn = settings_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get Channel statistics -// -// Get channel usage statistics -// -channel_statistics_t* -ChannelAPI_getStatistics(apiClient_t *apiClient, char * date ) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/statistics")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/statistics"); - - - - - // query parameters - char *keyQuery_date = NULL; - char * valueQuery_date = NULL; - keyValuePair_t *keyPairQuery_date = 0; - if (date) - { - keyQuery_date = strdup("date"); - valueQuery_date = strdup((date)); - keyPairQuery_date = keyValuePair_create(keyQuery_date, valueQuery_date); - list_addElement(localVarQueryParameters,keyPairQuery_date); - } - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - channel_statistics_t *elementToReturn = channel_statistics_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_date){ - free(keyQuery_date); - keyQuery_date = NULL; - } - if(valueQuery_date){ - free(valueQuery_date); - valueQuery_date = NULL; - } - if(keyPairQuery_date){ - keyValuePair_free(keyPairQuery_date); - keyPairQuery_date = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get Status -// -// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**/**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) -// -channel_status_t* -ChannelAPI_getStatus(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/status"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - channel_status_t *elementToReturn = channel_status_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get channel server IP -// -// -// -get_ip_t* -ChannelAPI_outputIP(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/outputIP")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/outputIP"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - get_ip_t *elementToReturn = get_ip_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Change user info -// -// Change user info -// -set_me_t* -ChannelAPI_setMe(apiClient_t *apiClient, set_me_request_t * set_me_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/me")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/me"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_set_me_request = NULL; - if (set_me_request != NULL) - { - //string - localVarSingleItemJSON_set_me_request = set_me_request_convertToJSON(set_me_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_set_me_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - set_me_t *elementToReturn = set_me_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_set_me_request) { - cJSON_Delete(localVarSingleItemJSON_set_me_request); - localVarSingleItemJSON_set_me_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Set settings -// -// **webhookUrl** - Http or https URL for receiving notifications. -// -set_settings_200_response_t* -ChannelAPI_setSettings(apiClient_t *apiClient, settings_t * settings ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/settings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/settings"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_settings = NULL; - if (settings != NULL) - { - //string - localVarSingleItemJSON_settings = settings_convertToJSON(settings); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_settings); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/json"); //consumes - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ChannelAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - set_settings_200_response_t *elementToReturn = set_settings_200_response_parseFromJSON(ChannelAPIlocalVarJSON); - cJSON_Delete(ChannelAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_settings) { - cJSON_Delete(localVarSingleItemJSON_settings); - localVarSingleItemJSON_settings = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/c/api/ChannelAPI.h b/c/api/ChannelAPI.h deleted file mode 100644 index 9a01912..0000000 --- a/c/api/ChannelAPI.h +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/channel_extended_statistics.h" -#include "../model/channel_statistics.h" -#include "../model/channel_status.h" -#include "../model/get_commerce.h" -#include "../model/get_ip.h" -#include "../model/get_me.h" -#include "../model/get_me_401_response.h" -#include "../model/set_me.h" -#include "../model/set_me_request.h" -#include "../model/set_settings_200_response.h" -#include "../model/settings.h" - - -// Get Commerce Settings -// -// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. -// -get_commerce_t* -ChannelAPI_getCommerce(apiClient_t *apiClient); - - -// Get Extended Channel statistics -// -// Get channel usage extended statistics -// -channel_extended_statistics_t* -ChannelAPI_getExtendedStatistics(apiClient_t *apiClient); - - -// Get Profile Info -// -// Use this edge to retrieve your profile's About info -// -get_me_t* -ChannelAPI_getMe(apiClient_t *apiClient); - - -// Get Settings -// -// **webhookUrl** - Http or https URL for receiving notifications. -// -settings_t* -ChannelAPI_getSettings(apiClient_t *apiClient); - - -// Get Channel statistics -// -// Get channel usage statistics -// -channel_statistics_t* -ChannelAPI_getStatistics(apiClient_t *apiClient, char * date ); - - -// Get Status -// -// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**/**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) -// -channel_status_t* -ChannelAPI_getStatus(apiClient_t *apiClient); - - -// Get channel server IP -// -// -// -get_ip_t* -ChannelAPI_outputIP(apiClient_t *apiClient); - - -// Change user info -// -// Change user info -// -set_me_t* -ChannelAPI_setMe(apiClient_t *apiClient, set_me_request_t * set_me_request ); - - -// Set settings -// -// **webhookUrl** - Http or https URL for receiving notifications. -// -set_settings_200_response_t* -ChannelAPI_setSettings(apiClient_t *apiClient, settings_t * settings ); - - diff --git a/c/api/MediaAPI.c b/c/api/MediaAPI.c deleted file mode 100644 index b302931..0000000 --- a/c/api/MediaAPI.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include -#include "MediaAPI.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// Upload media & get mediaId -// -// Upload media and get mediaId. Uploaded media can be sent in template -// -media_id_t* -MediaAPI_uploadMedia(apiClient_t *apiClient, upload_media_t * upload_media ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/uploadMedia")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/uploadMedia"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_upload_media = NULL; - if (upload_media != NULL) - { - //string - localVarSingleItemJSON_upload_media = upload_media_convertToJSON(upload_media); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_upload_media); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *MediaAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - media_id_t *elementToReturn = media_id_parseFromJSON(MediaAPIlocalVarJSON); - cJSON_Delete(MediaAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_upload_media) { - cJSON_Delete(localVarSingleItemJSON_upload_media); - localVarSingleItemJSON_upload_media = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/c/api/MediaAPI.h b/c/api/MediaAPI.h deleted file mode 100644 index d832c4a..0000000 --- a/c/api/MediaAPI.h +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/media_id.h" -#include "../model/upload_media.h" - - -// Upload media & get mediaId -// -// Upload media and get mediaId. Uploaded media can be sent in template -// -media_id_t* -MediaAPI_uploadMedia(apiClient_t *apiClient, upload_media_t * upload_media ); - - diff --git a/c/api/MessagingAPI.c b/c/api/MessagingAPI.c deleted file mode 100644 index 3f24a9f..0000000 --- a/c/api/MessagingAPI.c +++ /dev/null @@ -1,757 +0,0 @@ -#include -#include -#include -#include "MessagingAPI.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// Get messages list -// -// -// -get_messages_t* -MessagingAPI_messagesList(apiClient_t *apiClient, int last , int lastMessageNumber , int firstMessageNumber , int limit , char * chatId , int min_time , int max_time , char * msgId ) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/messages")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/messages"); - - - - - // query parameters - char *keyQuery_last = NULL; - char * valueQuery_last = NULL; - keyValuePair_t *keyPairQuery_last = 0; - if (1) // Always send boolean parameters to the API server - { - keyQuery_last = strdup("last"); - valueQuery_last = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_last, MAX_NUMBER_LENGTH, "%d", last); - keyPairQuery_last = keyValuePair_create(keyQuery_last, valueQuery_last); - list_addElement(localVarQueryParameters,keyPairQuery_last); - } - - // query parameters - char *keyQuery_lastMessageNumber = NULL; - char * valueQuery_lastMessageNumber = NULL; - keyValuePair_t *keyPairQuery_lastMessageNumber = 0; - if (1) // Always send integer parameters to the API server - { - keyQuery_lastMessageNumber = strdup("lastMessageNumber"); - valueQuery_lastMessageNumber = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_lastMessageNumber, MAX_NUMBER_LENGTH, "%d", lastMessageNumber); - keyPairQuery_lastMessageNumber = keyValuePair_create(keyQuery_lastMessageNumber, valueQuery_lastMessageNumber); - list_addElement(localVarQueryParameters,keyPairQuery_lastMessageNumber); - } - - // query parameters - char *keyQuery_firstMessageNumber = NULL; - char * valueQuery_firstMessageNumber = NULL; - keyValuePair_t *keyPairQuery_firstMessageNumber = 0; - if (1) // Always send integer parameters to the API server - { - keyQuery_firstMessageNumber = strdup("firstMessageNumber"); - valueQuery_firstMessageNumber = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_firstMessageNumber, MAX_NUMBER_LENGTH, "%d", firstMessageNumber); - keyPairQuery_firstMessageNumber = keyValuePair_create(keyQuery_firstMessageNumber, valueQuery_firstMessageNumber); - list_addElement(localVarQueryParameters,keyPairQuery_firstMessageNumber); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (1) // Always send integer parameters to the API server - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_chatId = NULL; - char * valueQuery_chatId = NULL; - keyValuePair_t *keyPairQuery_chatId = 0; - if (chatId) - { - keyQuery_chatId = strdup("chatId"); - valueQuery_chatId = strdup((chatId)); - keyPairQuery_chatId = keyValuePair_create(keyQuery_chatId, valueQuery_chatId); - list_addElement(localVarQueryParameters,keyPairQuery_chatId); - } - - // query parameters - char *keyQuery_min_time = NULL; - char * valueQuery_min_time = NULL; - keyValuePair_t *keyPairQuery_min_time = 0; - if (1) // Always send integer parameters to the API server - { - keyQuery_min_time = strdup("min_time"); - valueQuery_min_time = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_min_time, MAX_NUMBER_LENGTH, "%d", min_time); - keyPairQuery_min_time = keyValuePair_create(keyQuery_min_time, valueQuery_min_time); - list_addElement(localVarQueryParameters,keyPairQuery_min_time); - } - - // query parameters - char *keyQuery_max_time = NULL; - char * valueQuery_max_time = NULL; - keyValuePair_t *keyPairQuery_max_time = 0; - if (1) // Always send integer parameters to the API server - { - keyQuery_max_time = strdup("max_time"); - valueQuery_max_time = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_max_time, MAX_NUMBER_LENGTH, "%d", max_time); - keyPairQuery_max_time = keyValuePair_create(keyQuery_max_time, valueQuery_max_time); - list_addElement(localVarQueryParameters,keyPairQuery_max_time); - } - - // query parameters - char *keyQuery_msgId = NULL; - char * valueQuery_msgId = NULL; - keyValuePair_t *keyPairQuery_msgId = 0; - if (msgId) - { - keyQuery_msgId = strdup("msgId"); - valueQuery_msgId = strdup((msgId)); - keyPairQuery_msgId = keyValuePair_create(keyQuery_msgId, valueQuery_msgId); - list_addElement(localVarQueryParameters,keyPairQuery_msgId); - } - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - get_messages_t *elementToReturn = get_messages_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_last){ - free(keyQuery_last); - keyQuery_last = NULL; - } - if(valueQuery_last){ - free(valueQuery_last); - valueQuery_last = NULL; - } - if(keyPairQuery_last){ - keyValuePair_free(keyPairQuery_last); - keyPairQuery_last = NULL; - } - if(keyQuery_lastMessageNumber){ - free(keyQuery_lastMessageNumber); - keyQuery_lastMessageNumber = NULL; - } - if(valueQuery_lastMessageNumber){ - free(valueQuery_lastMessageNumber); - valueQuery_lastMessageNumber = NULL; - } - if(keyPairQuery_lastMessageNumber){ - keyValuePair_free(keyPairQuery_lastMessageNumber); - keyPairQuery_lastMessageNumber = NULL; - } - if(keyQuery_firstMessageNumber){ - free(keyQuery_firstMessageNumber); - keyQuery_firstMessageNumber = NULL; - } - if(valueQuery_firstMessageNumber){ - free(valueQuery_firstMessageNumber); - valueQuery_firstMessageNumber = NULL; - } - if(keyPairQuery_firstMessageNumber){ - keyValuePair_free(keyPairQuery_firstMessageNumber); - keyPairQuery_firstMessageNumber = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_chatId){ - free(keyQuery_chatId); - keyQuery_chatId = NULL; - } - if(valueQuery_chatId){ - free(valueQuery_chatId); - valueQuery_chatId = NULL; - } - if(keyPairQuery_chatId){ - keyValuePair_free(keyPairQuery_chatId); - keyPairQuery_chatId = NULL; - } - if(keyQuery_min_time){ - free(keyQuery_min_time); - keyQuery_min_time = NULL; - } - if(valueQuery_min_time){ - free(valueQuery_min_time); - valueQuery_min_time = NULL; - } - if(keyPairQuery_min_time){ - keyValuePair_free(keyPairQuery_min_time); - keyPairQuery_min_time = NULL; - } - if(keyQuery_max_time){ - free(keyQuery_max_time); - keyQuery_max_time = NULL; - } - if(valueQuery_max_time){ - free(valueQuery_max_time); - valueQuery_max_time = NULL; - } - if(keyPairQuery_max_time){ - keyValuePair_free(keyPairQuery_max_time); - keyPairQuery_max_time = NULL; - } - if(keyQuery_msgId){ - free(keyQuery_msgId); - keyQuery_msgId = NULL; - } - if(valueQuery_msgId){ - free(valueQuery_msgId); - valueQuery_msgId = NULL; - } - if(keyPairQuery_msgId){ - keyValuePair_free(keyPairQuery_msgId); - keyPairQuery_msgId = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Mark message as read -// -// -// -set_me_t* -MessagingAPI_readMessage(apiClient_t *apiClient, read_message_request_t * read_message_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/readMessage")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/readMessage"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_read_message_request = NULL; - if (read_message_request != NULL) - { - //string - localVarSingleItemJSON_read_message_request = read_message_request_convertToJSON(read_message_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_read_message_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - set_me_t *elementToReturn = set_me_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_read_message_request) { - cJSON_Delete(localVarSingleItemJSON_read_message_request); - localVarSingleItemJSON_read_message_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Send a Contact -// -// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendContact(apiClient_t *apiClient, send_contact_request_t * send_contact_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendContact")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendContact"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_contact_request = NULL; - if (send_contact_request != NULL) - { - //string - localVarSingleItemJSON_send_contact_request = send_contact_request_convertToJSON(send_contact_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_contact_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_contact_request) { - cJSON_Delete(localVarSingleItemJSON_send_contact_request); - localVarSingleItemJSON_send_contact_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Send a File -// -// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendFile(apiClient_t *apiClient, send_file_request_t * send_file_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendFile")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendFile"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_file_request = NULL; - if (send_file_request != NULL) - { - //string - localVarSingleItemJSON_send_file_request = send_file_request_convertToJSON(send_file_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_file_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_file_request) { - cJSON_Delete(localVarSingleItemJSON_send_file_request); - localVarSingleItemJSON_send_file_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Send List Message -// -// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendList(apiClient_t *apiClient, send_list_request_t * send_list_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendList")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendList"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_list_request = NULL; - if (send_list_request != NULL) - { - //string - localVarSingleItemJSON_send_list_request = send_list_request_convertToJSON(send_list_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_list_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_list_request) { - cJSON_Delete(localVarSingleItemJSON_send_list_request); - localVarSingleItemJSON_send_list_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Send a Location -// -// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendLocation(apiClient_t *apiClient, send_location_request_t * send_location_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendLocation")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendLocation"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_location_request = NULL; - if (send_location_request != NULL) - { - //string - localVarSingleItemJSON_send_location_request = send_location_request_convertToJSON(send_location_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_location_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_location_request) { - cJSON_Delete(localVarSingleItemJSON_send_location_request); - localVarSingleItemJSON_send_location_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Send a Message -// -// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendMessage(apiClient_t *apiClient, send_message_request_t * send_message_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendMessage")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendMessage"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_message_request = NULL; - if (send_message_request != NULL) - { - //string - localVarSingleItemJSON_send_message_request = send_message_request_convertToJSON(send_message_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_message_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *MessagingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(MessagingAPIlocalVarJSON); - cJSON_Delete(MessagingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_message_request) { - cJSON_Delete(localVarSingleItemJSON_send_message_request); - localVarSingleItemJSON_send_message_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/c/api/MessagingAPI.h b/c/api/MessagingAPI.h deleted file mode 100644 index 3f4fdc5..0000000 --- a/c/api/MessagingAPI.h +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/get_me_401_response.h" -#include "../model/get_messages.h" -#include "../model/read_message_request.h" -#include "../model/send_contact_request.h" -#include "../model/send_file_request.h" -#include "../model/send_list_request.h" -#include "../model/send_location_request.h" -#include "../model/send_message_request.h" -#include "../model/send_message_status.h" -#include "../model/set_me.h" - - -// Get messages list -// -// -// -get_messages_t* -MessagingAPI_messagesList(apiClient_t *apiClient, int last , int lastMessageNumber , int firstMessageNumber , int limit , char * chatId , int min_time , int max_time , char * msgId ); - - -// Mark message as read -// -// -// -set_me_t* -MessagingAPI_readMessage(apiClient_t *apiClient, read_message_request_t * read_message_request ); - - -// Send a Contact -// -// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendContact(apiClient_t *apiClient, send_contact_request_t * send_contact_request ); - - -// Send a File -// -// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendFile(apiClient_t *apiClient, send_file_request_t * send_file_request ); - - -// Send List Message -// -// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendList(apiClient_t *apiClient, send_list_request_t * send_list_request ); - - -// Send a Location -// -// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendLocation(apiClient_t *apiClient, send_location_request_t * send_location_request ); - - -// Send a Message -// -// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* -MessagingAPI_sendMessage(apiClient_t *apiClient, send_message_request_t * send_message_request ); - - diff --git a/c/api/ProductsCatalogsAPI.c b/c/api/ProductsCatalogsAPI.c deleted file mode 100644 index 381385f..0000000 --- a/c/api/ProductsCatalogsAPI.c +++ /dev/null @@ -1,176 +0,0 @@ -#include -#include -#include -#include "ProductsCatalogsAPI.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// Send a Product -// -// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** -// -send_message_status_t* -ProductsCatalogsAPI_sendProduct(apiClient_t *apiClient, send_product_request_t * send_product_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendProduct")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendProduct"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_product_request = NULL; - if (send_product_request != NULL) - { - //string - localVarSingleItemJSON_send_product_request = send_product_request_convertToJSON(send_product_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_product_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *ProductsCatalogsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(ProductsCatalogsAPIlocalVarJSON); - cJSON_Delete(ProductsCatalogsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_product_request) { - cJSON_Delete(localVarSingleItemJSON_send_product_request); - localVarSingleItemJSON_send_product_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Set Commerce Settings -// -// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. -// -set_commerce_t* -ProductsCatalogsAPI_setCommerce(apiClient_t *apiClient, commerce_t * commerce ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/commerce")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/commerce"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_commerce = NULL; - if (commerce != NULL) - { - //string - localVarSingleItemJSON_commerce = commerce_convertToJSON(commerce); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_commerce); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/json"); //consumes - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *ProductsCatalogsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - set_commerce_t *elementToReturn = set_commerce_parseFromJSON(ProductsCatalogsAPIlocalVarJSON); - cJSON_Delete(ProductsCatalogsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_commerce) { - cJSON_Delete(localVarSingleItemJSON_commerce); - localVarSingleItemJSON_commerce = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/c/api/ProductsCatalogsAPI.h b/c/api/ProductsCatalogsAPI.h deleted file mode 100644 index 42cfde1..0000000 --- a/c/api/ProductsCatalogsAPI.h +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/commerce.h" -#include "../model/get_me_401_response.h" -#include "../model/send_message_status.h" -#include "../model/send_product_request.h" -#include "../model/set_commerce.h" - - -// Send a Product -// -// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** -// -send_message_status_t* -ProductsCatalogsAPI_sendProduct(apiClient_t *apiClient, send_product_request_t * send_product_request ); - - -// Set Commerce Settings -// -// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. -// -set_commerce_t* -ProductsCatalogsAPI_setCommerce(apiClient_t *apiClient, commerce_t * commerce ); - - diff --git a/c/api/TemplatesAPI.c b/c/api/TemplatesAPI.c deleted file mode 100644 index ced11b8..0000000 --- a/c/api/TemplatesAPI.c +++ /dev/null @@ -1,318 +0,0 @@ -#include -#include -#include -#include "TemplatesAPI.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// Create template -// -// Create new template for sending. -// -object_t* -TemplatesAPI_addTemplate(apiClient_t *apiClient, add_template_request_t * add_template_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/addTemplate")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/addTemplate"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_add_template_request = NULL; - if (add_template_request != NULL) - { - //string - localVarSingleItemJSON_add_template_request = add_template_request_convertToJSON(add_template_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_add_template_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *TemplatesAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(TemplatesAPIlocalVarJSON); - cJSON_Delete(TemplatesAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_add_template_request) { - cJSON_Delete(localVarSingleItemJSON_add_template_request); - localVarSingleItemJSON_add_template_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Remove template -// -// Deleted template can not be restored. -// -set_me_t* -TemplatesAPI_removeTemplate(apiClient_t *apiClient, remove_template_request_t * remove_template_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/removeTemplate")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/removeTemplate"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_remove_template_request = NULL; - if (remove_template_request != NULL) - { - //string - localVarSingleItemJSON_remove_template_request = remove_template_request_convertToJSON(remove_template_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_remove_template_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *TemplatesAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - set_me_t *elementToReturn = set_me_parseFromJSON(TemplatesAPIlocalVarJSON); - cJSON_Delete(TemplatesAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_remove_template_request) { - cJSON_Delete(localVarSingleItemJSON_remove_template_request); - localVarSingleItemJSON_remove_template_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Send Template Message -// -// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} -// -send_message_status_t* -TemplatesAPI_sendTemplate(apiClient_t *apiClient, send_template_request_t * send_template_request ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/sendTemplate")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/sendTemplate"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_send_template_request = NULL; - if (send_template_request != NULL) - { - //string - localVarSingleItemJSON_send_template_request = send_template_request_convertToJSON(send_template_request); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_send_template_request); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *TemplatesAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - send_message_status_t *elementToReturn = send_message_status_parseFromJSON(TemplatesAPIlocalVarJSON); - cJSON_Delete(TemplatesAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_send_template_request) { - cJSON_Delete(localVarSingleItemJSON_send_template_request); - localVarSingleItemJSON_send_template_request = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Get templates list -// -// -// -get_templates_t* -TemplatesAPI_templatesList(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/templates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/templates"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *TemplatesAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - get_templates_t *elementToReturn = get_templates_parseFromJSON(TemplatesAPIlocalVarJSON); - cJSON_Delete(TemplatesAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/c/api/TemplatesAPI.h b/c/api/TemplatesAPI.h deleted file mode 100644 index d140497..0000000 --- a/c/api/TemplatesAPI.h +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/add_template_request.h" -#include "../model/get_me_401_response.h" -#include "../model/get_templates.h" -#include "../model/object.h" -#include "../model/remove_template_request.h" -#include "../model/send_message_status.h" -#include "../model/send_template_request.h" -#include "../model/set_me.h" - - -// Create template -// -// Create new template for sending. -// -object_t* -TemplatesAPI_addTemplate(apiClient_t *apiClient, add_template_request_t * add_template_request ); - - -// Remove template -// -// Deleted template can not be restored. -// -set_me_t* -TemplatesAPI_removeTemplate(apiClient_t *apiClient, remove_template_request_t * remove_template_request ); - - -// Send Template Message -// -// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} -// -send_message_status_t* -TemplatesAPI_sendTemplate(apiClient_t *apiClient, send_template_request_t * send_template_request ); - - -// Get templates list -// -// -// -get_templates_t* -TemplatesAPI_templatesList(apiClient_t *apiClient); - - diff --git a/c/api/WebhooksAPI.c b/c/api/WebhooksAPI.c deleted file mode 100644 index 7421123..0000000 --- a/c/api/WebhooksAPI.c +++ /dev/null @@ -1,184 +0,0 @@ -#include -#include -#include -#include "WebhooksAPI.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// Check ACKs -// -// -// -get_ack_info_t* -WebhooksAPI_ackHookInfo(apiClient_t *apiClient, char * messageId ) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/hookInfo")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/hookInfo"); - - - - - // query parameters - char *keyQuery_messageId = NULL; - char * valueQuery_messageId = NULL; - keyValuePair_t *keyPairQuery_messageId = 0; - if (messageId) - { - keyQuery_messageId = strdup("messageId"); - valueQuery_messageId = strdup((messageId)); - keyPairQuery_messageId = keyValuePair_create(keyQuery_messageId, valueQuery_messageId); - list_addElement(localVarQueryParameters,keyPairQuery_messageId); - } - list_addElement(localVarHeaderType,"application/json"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Invalid token"); - //} - //nonprimitive not container - cJSON *WebhooksAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - get_ack_info_t *elementToReturn = get_ack_info_parseFromJSON(WebhooksAPIlocalVarJSON); - cJSON_Delete(WebhooksAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_messageId){ - free(keyQuery_messageId); - keyQuery_messageId = NULL; - } - if(valueQuery_messageId){ - free(valueQuery_messageId); - valueQuery_messageId = NULL; - } - if(keyPairQuery_messageId){ - keyValuePair_free(keyPairQuery_messageId); - keyPairQuery_messageId = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// Set webhook -// -// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** -// -set_webhook_status_t* -WebhooksAPI_setWebhook(apiClient_t *apiClient, webhook_url_t * webhook_url ) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/webhook")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/webhook"); - - - - - // Body Param - cJSON *localVarSingleItemJSON_webhook_url = NULL; - if (webhook_url != NULL) - { - //string - localVarSingleItemJSON_webhook_url = webhook_url_convertToJSON(webhook_url); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_webhook_url); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarContentType,"application/x-www-form-urlencoded"); //consumes - list_addElement(localVarContentType,"application/json"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","Server response example"); - //} - //nonprimitive not container - cJSON *WebhooksAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - set_webhook_status_t *elementToReturn = set_webhook_status_parseFromJSON(WebhooksAPIlocalVarJSON); - cJSON_Delete(WebhooksAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - if (localVarSingleItemJSON_webhook_url) { - cJSON_Delete(localVarSingleItemJSON_webhook_url); - localVarSingleItemJSON_webhook_url = NULL; - } - free(localVarBodyParameters); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/c/api/WebhooksAPI.h b/c/api/WebhooksAPI.h deleted file mode 100644 index 55ef6b7..0000000 --- a/c/api/WebhooksAPI.h +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/get_ack_info.h" -#include "../model/get_me_401_response.h" -#include "../model/set_webhook_status.h" -#include "../model/webhook_url.h" - - -// Check ACKs -// -// -// -get_ack_info_t* -WebhooksAPI_ackHookInfo(apiClient_t *apiClient, char * messageId ); - - -// Set webhook -// -// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** -// -set_webhook_status_t* -WebhooksAPI_setWebhook(apiClient_t *apiClient, webhook_url_t * webhook_url ); - - diff --git a/c/docs/ChannelAPI.md b/c/docs/ChannelAPI.md deleted file mode 100644 index e6ceef5..0000000 --- a/c/docs/ChannelAPI.md +++ /dev/null @@ -1,290 +0,0 @@ -# ChannelAPI - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ChannelAPI_getCommerce**](ChannelAPI.md#ChannelAPI_getCommerce) | **GET** /commerce | Get Commerce Settings -[**ChannelAPI_getExtendedStatistics**](ChannelAPI.md#ChannelAPI_getExtendedStatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -[**ChannelAPI_getMe**](ChannelAPI.md#ChannelAPI_getMe) | **GET** /me | Get Profile Info -[**ChannelAPI_getSettings**](ChannelAPI.md#ChannelAPI_getSettings) | **GET** /settings | Get Settings -[**ChannelAPI_getStatistics**](ChannelAPI.md#ChannelAPI_getStatistics) | **GET** /statistics | Get Channel statistics -[**ChannelAPI_getStatus**](ChannelAPI.md#ChannelAPI_getStatus) | **GET** /status | Get Status -[**ChannelAPI_outputIP**](ChannelAPI.md#ChannelAPI_outputIP) | **GET** /outputIP | Get channel server IP -[**ChannelAPI_setMe**](ChannelAPI.md#ChannelAPI_setMe) | **POST** /me | Change user info -[**ChannelAPI_setSettings**](ChannelAPI.md#ChannelAPI_setSettings) | **POST** /settings | Set settings - - -# **ChannelAPI_getCommerce** -```c -// Get Commerce Settings -// -// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. -// -get_commerce_t* ChannelAPI_getCommerce(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[get_commerce_t](get_commerce.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_getExtendedStatistics** -```c -// Get Extended Channel statistics -// -// Get channel usage extended statistics -// -channel_extended_statistics_t* ChannelAPI_getExtendedStatistics(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[channel_extended_statistics_t](channel_extended_statistics.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_getMe** -```c -// Get Profile Info -// -// Use this edge to retrieve your profile's About info -// -get_me_t* ChannelAPI_getMe(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[get_me_t](get_me.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_getSettings** -```c -// Get Settings -// -// **webhookUrl** - Http or https URL for receiving notifications. -// -settings_t* ChannelAPI_getSettings(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[settings_t](settings.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_getStatistics** -```c -// Get Channel statistics -// -// Get channel usage statistics -// -channel_statistics_t* ChannelAPI_getStatistics(apiClient_t *apiClient, char * date); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**date** | **char \*** | Month and year in format mm.YYYY. | [optional] - -### Return type - -[channel_statistics_t](channel_statistics.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_getStatus** -```c -// Get Status -// -// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**/**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) -// -channel_status_t* ChannelAPI_getStatus(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[channel_status_t](channel_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_outputIP** -```c -// Get channel server IP -// -// -// -get_ip_t* ChannelAPI_outputIP(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[get_ip_t](get_ip.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_setMe** -```c -// Change user info -// -// Change user info -// -set_me_t* ChannelAPI_setMe(apiClient_t *apiClient, set_me_request_t * set_me_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**set_me_request** | **[set_me_request_t](set_me_request.md) \*** | | - -### Return type - -[set_me_t](set_me.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ChannelAPI_setSettings** -```c -// Set settings -// -// **webhookUrl** - Http or https URL for receiving notifications. -// -set_settings_200_response_t* ChannelAPI_setSettings(apiClient_t *apiClient, settings_t * settings); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**settings** | **[settings_t](settings.md) \*** | | - -### Return type - -[set_settings_200_response_t](set_settings_200_response.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/c/docs/MediaAPI.md b/c/docs/MediaAPI.md deleted file mode 100644 index a312c6d..0000000 --- a/c/docs/MediaAPI.md +++ /dev/null @@ -1,40 +0,0 @@ -# MediaAPI - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**MediaAPI_uploadMedia**](MediaAPI.md#MediaAPI_uploadMedia) | **POST** /uploadMedia | Upload media & get mediaId - - -# **MediaAPI_uploadMedia** -```c -// Upload media & get mediaId -// -// Upload media and get mediaId. Uploaded media can be sent in template -// -media_id_t* MediaAPI_uploadMedia(apiClient_t *apiClient, upload_media_t * upload_media); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**upload_media** | **[upload_media_t](upload_media.md) \*** | | - -### Return type - -[media_id_t](media_id.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/c/docs/MessagingAPI.md b/c/docs/MessagingAPI.md deleted file mode 100644 index 67246c1..0000000 --- a/c/docs/MessagingAPI.md +++ /dev/null @@ -1,239 +0,0 @@ -# MessagingAPI - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**MessagingAPI_messagesList**](MessagingAPI.md#MessagingAPI_messagesList) | **GET** /messages | Get messages list -[**MessagingAPI_readMessage**](MessagingAPI.md#MessagingAPI_readMessage) | **POST** /readMessage | Mark message as read -[**MessagingAPI_sendContact**](MessagingAPI.md#MessagingAPI_sendContact) | **POST** /sendContact | Send a Contact -[**MessagingAPI_sendFile**](MessagingAPI.md#MessagingAPI_sendFile) | **POST** /sendFile | Send a File -[**MessagingAPI_sendList**](MessagingAPI.md#MessagingAPI_sendList) | **POST** /sendList | Send List Message -[**MessagingAPI_sendLocation**](MessagingAPI.md#MessagingAPI_sendLocation) | **POST** /sendLocation | Send a Location -[**MessagingAPI_sendMessage**](MessagingAPI.md#MessagingAPI_sendMessage) | **POST** /sendMessage | Send a Message - - -# **MessagingAPI_messagesList** -```c -// Get messages list -// -// -// -get_messages_t* MessagingAPI_messagesList(apiClient_t *apiClient, int last, int lastMessageNumber, int firstMessageNumber, int limit, char * chatId, int min_time, int max_time, char * msgId); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**last** | **int** | Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. | [optional] -**lastMessageNumber** | **int** | The lastMessageNumber parameter from the last response. Example: 100 | [optional] -**firstMessageNumber** | **int** | The firstMessageNumber parameter from the last response. Example: 1 | [optional] -**limit** | **int** | Sets length of the message list. Default 100. With value 0 returns all messages. | [optional] -**chatId** | **char \*** | Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us | [optional] -**min_time** | **int** | Filter messages received after specified time. Example: 1665396610 | [optional] -**max_time** | **int** | Filter messages received before specified time. Example: 1665396610 | [optional] -**msgId** | **char \*** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -### Return type - -[get_messages_t](get_messages.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MessagingAPI_readMessage** -```c -// Mark message as read -// -// -// -set_me_t* MessagingAPI_readMessage(apiClient_t *apiClient, read_message_request_t * read_message_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**read_message_request** | **[read_message_request_t](read_message_request.md) \*** | | [optional] - -### Return type - -[set_me_t](set_me.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MessagingAPI_sendContact** -```c -// Send a Contact -// -// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* MessagingAPI_sendContact(apiClient_t *apiClient, send_contact_request_t * send_contact_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_contact_request** | **[send_contact_request_t](send_contact_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MessagingAPI_sendFile** -```c -// Send a File -// -// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* MessagingAPI_sendFile(apiClient_t *apiClient, send_file_request_t * send_file_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_file_request** | **[send_file_request_t](send_file_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MessagingAPI_sendList** -```c -// Send List Message -// -// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* MessagingAPI_sendList(apiClient_t *apiClient, send_list_request_t * send_list_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_list_request** | **[send_list_request_t](send_list_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MessagingAPI_sendLocation** -```c -// Send a Location -// -// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* MessagingAPI_sendLocation(apiClient_t *apiClient, send_location_request_t * send_location_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_location_request** | **[send_location_request_t](send_location_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MessagingAPI_sendMessage** -```c -// Send a Message -// -// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. -// -send_message_status_t* MessagingAPI_sendMessage(apiClient_t *apiClient, send_message_request_t * send_message_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_message_request** | **[send_message_request_t](send_message_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/c/docs/ProductsCatalogsAPI.md b/c/docs/ProductsCatalogsAPI.md deleted file mode 100644 index 6ef9769..0000000 --- a/c/docs/ProductsCatalogsAPI.md +++ /dev/null @@ -1,72 +0,0 @@ -# ProductsCatalogsAPI - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ProductsCatalogsAPI_sendProduct**](ProductsCatalogsAPI.md#ProductsCatalogsAPI_sendProduct) | **POST** /sendProduct | Send a Product -[**ProductsCatalogsAPI_setCommerce**](ProductsCatalogsAPI.md#ProductsCatalogsAPI_setCommerce) | **POST** /commerce | Set Commerce Settings - - -# **ProductsCatalogsAPI_sendProduct** -```c -// Send a Product -// -// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** -// -send_message_status_t* ProductsCatalogsAPI_sendProduct(apiClient_t *apiClient, send_product_request_t * send_product_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_product_request** | **[send_product_request_t](send_product_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ProductsCatalogsAPI_setCommerce** -```c -// Set Commerce Settings -// -// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. -// -set_commerce_t* ProductsCatalogsAPI_setCommerce(apiClient_t *apiClient, commerce_t * commerce); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**commerce** | **[commerce_t](commerce.md) \*** | | - -### Return type - -[set_commerce_t](set_commerce.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/c/docs/TemplatesAPI.md b/c/docs/TemplatesAPI.md deleted file mode 100644 index 1d91f37..0000000 --- a/c/docs/TemplatesAPI.md +++ /dev/null @@ -1,135 +0,0 @@ -# TemplatesAPI - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TemplatesAPI_addTemplate**](TemplatesAPI.md#TemplatesAPI_addTemplate) | **POST** /addTemplate | Create template -[**TemplatesAPI_removeTemplate**](TemplatesAPI.md#TemplatesAPI_removeTemplate) | **POST** /removeTemplate | Remove template -[**TemplatesAPI_sendTemplate**](TemplatesAPI.md#TemplatesAPI_sendTemplate) | **POST** /sendTemplate | Send Template Message -[**TemplatesAPI_templatesList**](TemplatesAPI.md#TemplatesAPI_templatesList) | **GET** /templates | Get templates list - - -# **TemplatesAPI_addTemplate** -```c -// Create template -// -// Create new template for sending. -// -object_t* TemplatesAPI_addTemplate(apiClient_t *apiClient, add_template_request_t * add_template_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**add_template_request** | **[add_template_request_t](add_template_request.md) \*** | | - -### Return type - -[object_t](object.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **TemplatesAPI_removeTemplate** -```c -// Remove template -// -// Deleted template can not be restored. -// -set_me_t* TemplatesAPI_removeTemplate(apiClient_t *apiClient, remove_template_request_t * remove_template_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**remove_template_request** | **[remove_template_request_t](remove_template_request.md) \*** | | - -### Return type - -[set_me_t](set_me.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **TemplatesAPI_sendTemplate** -```c -// Send Template Message -// -// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} -// -send_message_status_t* TemplatesAPI_sendTemplate(apiClient_t *apiClient, send_template_request_t * send_template_request); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**send_template_request** | **[send_template_request_t](send_template_request.md) \*** | | - -### Return type - -[send_message_status_t](send_message_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **TemplatesAPI_templatesList** -```c -// Get templates list -// -// -// -get_templates_t* TemplatesAPI_templatesList(apiClient_t *apiClient); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | - -### Return type - -[get_templates_t](get_templates.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/c/docs/WebhooksAPI.md b/c/docs/WebhooksAPI.md deleted file mode 100644 index 2bf8299..0000000 --- a/c/docs/WebhooksAPI.md +++ /dev/null @@ -1,72 +0,0 @@ -# WebhooksAPI - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**WebhooksAPI_ackHookInfo**](WebhooksAPI.md#WebhooksAPI_ackHookInfo) | **GET** /hookInfo | Check ACKs -[**WebhooksAPI_setWebhook**](WebhooksAPI.md#WebhooksAPI_setWebhook) | **POST** /webhook | Set webhook - - -# **WebhooksAPI_ackHookInfo** -```c -// Check ACKs -// -// -// -get_ack_info_t* WebhooksAPI_ackHookInfo(apiClient_t *apiClient, char * messageId); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**messageId** | **char \*** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | - -### Return type - -[get_ack_info_t](get_ack_info.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **WebhooksAPI_setWebhook** -```c -// Set webhook -// -// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** -// -set_webhook_status_t* WebhooksAPI_setWebhook(apiClient_t *apiClient, webhook_url_t * webhook_url); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**webhook_url** | **[webhook_url_t](webhook_url.md) \*** | | - -### Return type - -[set_webhook_status_t](set_webhook_status.md) * - - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/c/docs/ack.md b/c/docs/ack.md deleted file mode 100644 index 1133806..0000000 --- a/c/docs/ack.md +++ /dev/null @@ -1,12 +0,0 @@ -# ack_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **char \*** | unique id of message | [optional] -**chat_id** | **char \*** | chat ID | [optional] -**status** | **one_msg_waba_sdk_ack_STATUS_e** | type of the message status | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/add_template_request.md b/c/docs/add_template_request.md deleted file mode 100644 index e80dc65..0000000 --- a/c/docs/add_template_request.md +++ /dev/null @@ -1,13 +0,0 @@ -# add_template_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **char \*** | Name of template | [optional] -**category** | **template_category_prop_t \*** | | [optional] -**components** | **template_components_prop_t \*** | | [optional] -**language** | **template_language_prop_t \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/channel_extended_statistics.md b/c/docs/channel_extended_statistics.md deleted file mode 100644 index 47d974d..0000000 --- a/c/docs/channel_extended_statistics.md +++ /dev/null @@ -1,9 +0,0 @@ -# channel_extended_statistics_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/channel_extended_statistics_inner.md b/c/docs/channel_extended_statistics_inner.md deleted file mode 100644 index 6eb8956..0000000 --- a/c/docs/channel_extended_statistics_inner.md +++ /dev/null @@ -1,22 +0,0 @@ -# channel_extended_statistics_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**business_initiated_paid_quantity** | **int** | | [optional] -**business_initiated_price** | **double** | | [optional] -**business_initiated_quantity** | **int** | | [optional] -**free_entry_point** | **int** | | [optional] -**free_quantity** | **int** | | [optional] -**free_tier** | **int** | | [optional] -**paid_quantity** | **int** | | [optional] -**period_date** | **char \*** | | [optional] -**quantity** | **double** | | [optional] -**total_price** | **double** | | [optional] -**user_initiated_paid_quantity** | **int** | | [optional] -**user_initiated_price** | **double** | | [optional] -**user_initiated_quantity** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/channel_statistics.md b/c/docs/channel_statistics.md deleted file mode 100644 index 11bf079..0000000 --- a/c/docs/channel_statistics.md +++ /dev/null @@ -1,11 +0,0 @@ -# channel_statistics_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date** | **char \*** | | [optional] -**templates_cost** | **double** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/channel_status.md b/c/docs/channel_status.md deleted file mode 100644 index 017f294..0000000 --- a/c/docs/channel_status.md +++ /dev/null @@ -1,10 +0,0 @@ -# channel_status_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **one_msg_waba_sdk_channel_status_STATUS_e** | channel Status | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/chat_id_prop.md b/c/docs/chat_id_prop.md deleted file mode 100644 index b65b52e..0000000 --- a/c/docs/chat_id_prop.md +++ /dev/null @@ -1,10 +0,0 @@ -# chat_id_prop_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/commerce.md b/c/docs/commerce.md deleted file mode 100644 index 93c95ee..0000000 --- a/c/docs/commerce.md +++ /dev/null @@ -1,10 +0,0 @@ -# commerce_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**params** | [**commerce_params_t**](commerce_params.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/commerce_params.md b/c/docs/commerce_params.md deleted file mode 100644 index 8e9fb28..0000000 --- a/c/docs/commerce_params.md +++ /dev/null @@ -1,11 +0,0 @@ -# commerce_params_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**is_cart_enabled** | **int** | | -**is_catalog_visible** | **int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/contacts.md b/c/docs/contacts.md deleted file mode 100644 index ecae28d..0000000 --- a/c/docs/contacts.md +++ /dev/null @@ -1,10 +0,0 @@ -# contacts_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contacts** | [**list_t**](contacts_contacts_inner.md) \* | List of checked numbers | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/contacts_contacts_inner.md b/c/docs/contacts_contacts_inner.md deleted file mode 100644 index 828e65d..0000000 --- a/c/docs/contacts_contacts_inner.md +++ /dev/null @@ -1,12 +0,0 @@ -# contacts_contacts_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**input** | **char \*** | Sent value | [optional] -**status** | **char \*** | Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending | [optional] -**wa_id** | **char \*** | Formatted contact phone | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/contacts_request.md b/c/docs/contacts_request.md deleted file mode 100644 index ba10209..0000000 --- a/c/docs/contacts_request.md +++ /dev/null @@ -1,12 +0,0 @@ -# contacts_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**blocking** | **char \*** | Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) | [optional] -**force_check** | **int** | Using cache: *true* - ignore cache *false* - use cache (default) | [optional] -**contacts** | **list_t \*** | Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_ack_info.md b/c/docs/get_ack_info.md deleted file mode 100644 index 5ab4eba..0000000 --- a/c/docs/get_ack_info.md +++ /dev/null @@ -1,10 +0,0 @@ -# get_ack_info_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hooks** | [**list_t**](get_ack_info_hooks_inner.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_ack_info_hooks_inner.md b/c/docs/get_ack_info_hooks_inner.md deleted file mode 100644 index cbdef14..0000000 --- a/c/docs/get_ack_info_hooks_inner.md +++ /dev/null @@ -1,16 +0,0 @@ -# get_ack_info_hooks_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **char \*** | | [optional] -**type** | **char \*** | | [optional] -**status** | **char \*** | | [optional] -**pricing** | [**object_t**](.md) \* | | [optional] -**timestamp** | **char \*** | | [optional] -**conversation** | [**object_t**](.md) \* | | [optional] -**recipient_id** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_commerce.md b/c/docs/get_commerce.md deleted file mode 100644 index aece6bb..0000000 --- a/c/docs/get_commerce.md +++ /dev/null @@ -1,9 +0,0 @@ -# get_commerce_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_commerce_inner.md b/c/docs/get_commerce_inner.md deleted file mode 100644 index 1b28925..0000000 --- a/c/docs/get_commerce_inner.md +++ /dev/null @@ -1,12 +0,0 @@ -# get_commerce_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **char \*** | | [optional] -**is_cart_enabled** | **int** | | [optional] -**is_catalog_visible** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_ip.md b/c/docs/get_ip.md deleted file mode 100644 index 9c7c0f0..0000000 --- a/c/docs/get_ip.md +++ /dev/null @@ -1,10 +0,0 @@ -# get_ip_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_me.md b/c/docs/get_me.md deleted file mode 100644 index 7ce0e52..0000000 --- a/c/docs/get_me.md +++ /dev/null @@ -1,16 +0,0 @@ -# get_me_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **char \*** | Profile`s About section. | [optional] -**address** | **char \*** | Address of the business | [optional] -**description** | **char \*** | Description of the business. Max 256 characters | [optional] -**email** | **char \*** | Business email | [optional] -**phone** | **char \*** | Linked phone number | [optional] -**vertical** | **one_msg_waba_sdk_get_me_VERTICAL_e** | Industry of the business | [optional] -**photo** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_me_401_response.md b/c/docs/get_me_401_response.md deleted file mode 100644 index 98a735a..0000000 --- a/c/docs/get_me_401_response.md +++ /dev/null @@ -1,10 +0,0 @@ -# get_me_401_response_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_messages.md b/c/docs/get_messages.md deleted file mode 100644 index cc75199..0000000 --- a/c/docs/get_messages.md +++ /dev/null @@ -1,10 +0,0 @@ -# get_messages_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messages** | [**list_t**](get_messages_messages_inner.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_messages_messages_inner.md b/c/docs/get_messages_messages_inner.md deleted file mode 100644 index 1038409..0000000 --- a/c/docs/get_messages_messages_inner.md +++ /dev/null @@ -1,24 +0,0 @@ -# get_messages_messages_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message_number** | **int** | | [optional] -**id** | **char \*** | | [optional] -**body** | **char \*** | | [optional] -**from_me** | **int** | | [optional] -**self** | **int** | | [optional] -**is_forwarded** | **int** | | [optional] -**author** | **char \*** | | [optional] -**time** | **int** | | [optional] -**chat_id** | **char \*** | | [optional] -**type** | **char \*** | | [optional] -**sender_name** | **char \*** | | [optional] -**caption** | **char \*** | | [optional] -**quoted_msg_id** | **char \*** | | [optional] -**metadata** | [**object_t**](.md) \* | | [optional] -**chat_name** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_templates.md b/c/docs/get_templates.md deleted file mode 100644 index 674184b..0000000 --- a/c/docs/get_templates.md +++ /dev/null @@ -1,11 +0,0 @@ -# get_templates_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | | [optional] -**templates** | [**list_t**](get_templates_templates_inner.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/get_templates_templates_inner.md b/c/docs/get_templates_templates_inner.md deleted file mode 100644 index 20f8774..0000000 --- a/c/docs/get_templates_templates_inner.md +++ /dev/null @@ -1,16 +0,0 @@ -# get_templates_templates_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | **template_category_prop_t \*** | | [optional] -**components** | **template_components_prop_t \*** | | [optional] -**language** | **template_language_prop_t \*** | | [optional] -**name** | **char \*** | | [optional] -**_namespace** | **char \*** | Can be found by method /templates | [optional] -**rejected_reason** | **char \*** | | [optional] -**status** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/me_components.md b/c/docs/me_components.md deleted file mode 100644 index fc41e3a..0000000 --- a/c/docs/me_components.md +++ /dev/null @@ -1,16 +0,0 @@ -# me_components_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **char \*** | Profile`s About section. | [optional] -**address** | **char \*** | Address of the business | [optional] -**description** | **char \*** | Description of the business. Max 256 characters | [optional] -**email** | **char \*** | Business email | [optional] -**phone** | **char \*** | Linked phone number | [optional] -**vertical** | **one_msg_waba_sdk_me_components_VERTICAL_e** | Industry of the business | [optional] -**photo** | **char \*** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/media_id.md b/c/docs/media_id.md deleted file mode 100644 index 741ae2c..0000000 --- a/c/docs/media_id.md +++ /dev/null @@ -1,10 +0,0 @@ -# media_id_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**media_id** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/message.md b/c/docs/message.md deleted file mode 100644 index 33e29e9..0000000 --- a/c/docs/message.md +++ /dev/null @@ -1,21 +0,0 @@ -# message_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **char \*** | unique id | [optional] -**body** | **char \*** | text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" | [optional] -**from_me** | **int** | true - outgoing, false - incoming | [optional] -**self** | **int** | 1 - generated by api, 0 - generated by app | [optional] -**is_forwarded** | **int** | true - forwarded message, false - direct message | [optional] -**author** | **char \*** | Author ID of the message | [optional] -**time** | **int** | send time, unix timestamp | [optional] -**chat_id** | **char \*** | chat ID | [optional] -**type** | **one_msg_waba_sdk_message_TYPE_e** | type of the message | [optional] -**sender_name** | **char \*** | Sender name | [optional] -**caption** | **char \*** | File caption or filename | [optional] -**quoted_msg_id** | **char \*** | ID of quoted message | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/message_id_prop.md b/c/docs/message_id_prop.md deleted file mode 100644 index 8a03d24..0000000 --- a/c/docs/message_id_prop.md +++ /dev/null @@ -1,10 +0,0 @@ -# message_id_prop_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message_id** | **char \*** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/phone_prop.md b/c/docs/phone_prop.md deleted file mode 100644 index 9135c12..0000000 --- a/c/docs/phone_prop.md +++ /dev/null @@ -1,10 +0,0 @@ -# phone_prop_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/read_message_request.md b/c/docs/read_message_request.md deleted file mode 100644 index b574e34..0000000 --- a/c/docs/read_message_request.md +++ /dev/null @@ -1,10 +0,0 @@ -# read_message_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message_id** | **char \*** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/remove_template_request.md b/c/docs/remove_template_request.md deleted file mode 100644 index ad9284b..0000000 --- a/c/docs/remove_template_request.md +++ /dev/null @@ -1,10 +0,0 @@ -# remove_template_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **char \*** | Template name | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_contact_request.md b/c/docs/send_contact_request.md deleted file mode 100644 index ca26f2e..0000000 --- a/c/docs/send_contact_request.md +++ /dev/null @@ -1,12 +0,0 @@ -# send_contact_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**contacts** | [**list_t**](object.md) \* | Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_file_request.md b/c/docs/send_file_request.md deleted file mode 100644 index 0d80ef4..0000000 --- a/c/docs/send_file_request.md +++ /dev/null @@ -1,14 +0,0 @@ -# send_file_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **char \*** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | -**filename** | **char \*** | File name, for *example 1.jpg* or *hello.xlsx* | -**caption** | **char \*** | Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_list_request.md b/c/docs/send_list_request.md deleted file mode 100644 index 6f22da7..0000000 --- a/c/docs/send_list_request.md +++ /dev/null @@ -1,16 +0,0 @@ -# send_list_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **char \*** | Main message text | -**header** | **char \*** | Header will be located above message text | [optional] -**footer** | **char \*** | Footer will be placed under message text | [optional] -**action** | **char \*** | Action for open list | -**sections** | [**list_t**](send_list_request_all_of_sections.md) \* | Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_list_request_all_of_rows.md b/c/docs/send_list_request_all_of_rows.md deleted file mode 100644 index 69a27f1..0000000 --- a/c/docs/send_list_request_all_of_rows.md +++ /dev/null @@ -1,12 +0,0 @@ -# send_list_request_all_of_rows_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **char \*** | Unique id for option, up to 200 symbols | -**title** | **char \*** | Title of option, up to 24 symbols. | -**description** | **char \*** | Description of option, up to 72 symbols | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_list_request_all_of_sections.md b/c/docs/send_list_request_all_of_sections.md deleted file mode 100644 index b6700cc..0000000 --- a/c/docs/send_list_request_all_of_sections.md +++ /dev/null @@ -1,11 +0,0 @@ -# send_list_request_all_of_sections_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **char \*** | Title of section, up to 24 symbols. Required if there are more then 1 section | [optional] -**rows** | [**list_t**](send_list_request_all_of_rows.md) \* | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_location_request.md b/c/docs/send_location_request.md deleted file mode 100644 index 4b1fe2e..0000000 --- a/c/docs/send_location_request.md +++ /dev/null @@ -1,15 +0,0 @@ -# send_location_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**lat** | **char \*** | Latitude of the location. Example: 45.018337 | -**lng** | **char \*** | Longitude of the location. Example: -73.968285 | -**address** | **char \*** | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 | [optional] -**name** | **char \*** | Name of the location. Example: Facebook HQ | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_message_request.md b/c/docs/send_message_request.md deleted file mode 100644 index 71cc25b..0000000 --- a/c/docs/send_message_request.md +++ /dev/null @@ -1,12 +0,0 @@ -# send_message_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **char \*** | Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_message_status.md b/c/docs/send_message_status.md deleted file mode 100644 index 107a99c..0000000 --- a/c/docs/send_message_status.md +++ /dev/null @@ -1,13 +0,0 @@ -# send_message_status_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sent** | **int** | | [optional] -**id** | **char \*** | unique message id | [optional] -**message** | **char \*** | Posting status message | [optional] -**description** | **char \*** | Result description | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_product_request.md b/c/docs/send_product_request.md deleted file mode 100644 index 33097d0..0000000 --- a/c/docs/send_product_request.md +++ /dev/null @@ -1,15 +0,0 @@ -# send_product_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**action** | [**send_product_request_all_of_action_t**](send_product_request_all_of_action.md) \* | | -**body** | **char \*** | Text of message. Example: Some text. | [optional] -**footer** | **char \*** | Located under the message text. Example: Footer. | [optional] -**header** | **char \*** | Header of catalog. Example: Header. **Required when sending the catalog.** | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_product_request_all_of_action.md b/c/docs/send_product_request_all_of_action.md deleted file mode 100644 index b21a59d..0000000 --- a/c/docs/send_product_request_all_of_action.md +++ /dev/null @@ -1,12 +0,0 @@ -# send_product_request_all_of_action_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**catalog_id** | **char \*** | id of the catalog | [optional] -**product_retailer_id** | **char \*** | id of the product | [optional] -**sections** | [**list_t**](send_product_request_all_of_action_sections.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_product_request_all_of_action_product_items.md b/c/docs/send_product_request_all_of_action_product_items.md deleted file mode 100644 index d06d002..0000000 --- a/c/docs/send_product_request_all_of_action_product_items.md +++ /dev/null @@ -1,10 +0,0 @@ -# send_product_request_all_of_action_product_items_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product_retailer_id** | **char \*** | id of the product | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_product_request_all_of_action_sections.md b/c/docs/send_product_request_all_of_action_sections.md deleted file mode 100644 index f7c9cc0..0000000 --- a/c/docs/send_product_request_all_of_action_sections.md +++ /dev/null @@ -1,11 +0,0 @@ -# send_product_request_all_of_action_sections_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **char \*** | Title of the section. Example: the-section-title | [optional] -**product_items** | [**list_t**](send_product_request_all_of_action_product_items.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request.md b/c/docs/send_template_request.md deleted file mode 100644 index c6e83c2..0000000 --- a/c/docs/send_template_request.md +++ /dev/null @@ -1,15 +0,0 @@ -# send_template_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_namespace** | **char \*** | Can be found by method /templates | -**chat_id** | **char \*** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**_template** | **char \*** | Name of template | -**language** | [**send_template_request_all_of_language_t**](send_template_request_all_of_language.md) \* | | -**params** | [**list_t**](send_template_request_all_of_params.md) \* | Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request_all_of_currency.md b/c/docs/send_template_request_all_of_currency.md deleted file mode 100644 index 7fa16ea..0000000 --- a/c/docs/send_template_request_all_of_currency.md +++ /dev/null @@ -1,11 +0,0 @@ -# send_template_request_all_of_currency_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_code** | **char \*** | | [optional] -**amount_1000** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request_all_of_date_time.md b/c/docs/send_template_request_all_of_date_time.md deleted file mode 100644 index 4fe829a..0000000 --- a/c/docs/send_template_request_all_of_date_time.md +++ /dev/null @@ -1,11 +0,0 @@ -# send_template_request_all_of_date_time_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | [**send_template_request_all_of_date_time_component_t**](send_template_request_all_of_date_time_component.md) \* | | [optional] -**unix_epoch** | [**send_template_request_all_of_date_time_unix_epoch_t**](send_template_request_all_of_date_time_unix_epoch.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request_all_of_date_time_component.md b/c/docs/send_template_request_all_of_date_time_component.md deleted file mode 100644 index edfb6ce..0000000 --- a/c/docs/send_template_request_all_of_date_time_component.md +++ /dev/null @@ -1,16 +0,0 @@ -# send_template_request_all_of_date_time_component_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**day_of_week** | **one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e** | | [optional] -**year** | **int** | | [optional] -**month** | **int** | | [optional] -**day_of_month** | **int** | | [optional] -**hour** | **int** | | [optional] -**minute** | **int** | | [optional] -**calendar** | **one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request_all_of_date_time_unix_epoch.md b/c/docs/send_template_request_all_of_date_time_unix_epoch.md deleted file mode 100644 index 1269ef5..0000000 --- a/c/docs/send_template_request_all_of_date_time_unix_epoch.md +++ /dev/null @@ -1,10 +0,0 @@ -# send_template_request_all_of_date_time_unix_epoch_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request_all_of_language.md b/c/docs/send_template_request_all_of_language.md deleted file mode 100644 index f19c480..0000000 --- a/c/docs/send_template_request_all_of_language.md +++ /dev/null @@ -1,11 +0,0 @@ -# send_template_request_all_of_language_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**policy** | **one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e** | | [optional] -**code** | **template_language_prop_t \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/send_template_request_all_of_params.md b/c/docs/send_template_request_all_of_params.md deleted file mode 100644 index bd21308..0000000 --- a/c/docs/send_template_request_all_of_params.md +++ /dev/null @@ -1,12 +0,0 @@ -# send_template_request_all_of_params_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_default** | **char \*** | | [optional] -**currency** | [**send_template_request_all_of_currency_t**](send_template_request_all_of_currency.md) \* | | [optional] -**date_time** | [**send_template_request_all_of_date_time_t**](send_template_request_all_of_date_time.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/set_commerce.md b/c/docs/set_commerce.md deleted file mode 100644 index e35af77..0000000 --- a/c/docs/set_commerce.md +++ /dev/null @@ -1,10 +0,0 @@ -# set_commerce_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/set_me.md b/c/docs/set_me.md deleted file mode 100644 index 27ca8c4..0000000 --- a/c/docs/set_me.md +++ /dev/null @@ -1,10 +0,0 @@ -# set_me_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/set_me_request.md b/c/docs/set_me_request.md deleted file mode 100644 index 8e66758..0000000 --- a/c/docs/set_me_request.md +++ /dev/null @@ -1,16 +0,0 @@ -# set_me_request_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **char \*** | Profile`s About section. | [optional] -**address** | **char \*** | Address of the business | [optional] -**description** | **char \*** | Description of the business. Max 256 characters | [optional] -**email** | **char \*** | Business email | [optional] -**phone** | **char \*** | Linked phone number | [optional] -**vertical** | **one_msg_waba_sdk_set_me_request_VERTICAL_e** | Industry of the business | [optional] -**photo** | **char \*** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/set_settings_200_response.md b/c/docs/set_settings_200_response.md deleted file mode 100644 index d90650f..0000000 --- a/c/docs/set_settings_200_response.md +++ /dev/null @@ -1,11 +0,0 @@ -# set_settings_200_response_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **char \*** | | [optional] -**update** | [**set_settings_200_response_all_of_update_t**](set_settings_200_response_all_of_update.md) \* | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/set_settings_200_response_all_of_update.md b/c/docs/set_settings_200_response_all_of_update.md deleted file mode 100644 index 067b6ea..0000000 --- a/c/docs/set_settings_200_response_all_of_update.md +++ /dev/null @@ -1,10 +0,0 @@ -# set_settings_200_response_all_of_update_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/set_webhook_status.md b/c/docs/set_webhook_status.md deleted file mode 100644 index 2658b74..0000000 --- a/c/docs/set_webhook_status.md +++ /dev/null @@ -1,11 +0,0 @@ -# set_webhook_status_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**set** | **int** | Flag indicating that the current request has changed webhook | [optional] -**message** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/settings.md b/c/docs/settings.md deleted file mode 100644 index 14ce946..0000000 --- a/c/docs/settings.md +++ /dev/null @@ -1,10 +0,0 @@ -# settings_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/template_category_prop.md b/c/docs/template_category_prop.md deleted file mode 100644 index 8bb1a7b..0000000 --- a/c/docs/template_category_prop.md +++ /dev/null @@ -1,9 +0,0 @@ -# template_category_prop_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/template_components_prop.md b/c/docs/template_components_prop.md deleted file mode 100644 index 515c95f..0000000 --- a/c/docs/template_components_prop.md +++ /dev/null @@ -1,9 +0,0 @@ -# template_components_prop_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/template_components_prop_inner.md b/c/docs/template_components_prop_inner.md deleted file mode 100644 index 04d8857..0000000 --- a/c/docs/template_components_prop_inner.md +++ /dev/null @@ -1,14 +0,0 @@ -# template_components_prop_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **one_msg_waba_sdk_template_components_prop_inner_TYPE_e** | | [optional] -**format** | **one_msg_waba_sdk_template_components_prop_inner_FORMAT_e** | Only for HEADER type | [optional] -**text** | **char \*** | | [optional] -**example** | [**object_t**](.md) \* | | [optional] -**buttons** | [**list_t**](template_components_prop_inner_buttons_inner.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/template_components_prop_inner_buttons_inner.md b/c/docs/template_components_prop_inner_buttons_inner.md deleted file mode 100644 index d849333..0000000 --- a/c/docs/template_components_prop_inner_buttons_inner.md +++ /dev/null @@ -1,14 +0,0 @@ -# template_components_prop_inner_buttons_inner_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e** | | [optional] -**text** | **char \*** | | [optional] -**url** | **char \*** | | [optional] -**phone_number** | **char \*** | | [optional] -**example** | [**list_t**](any_type.md) \* | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/template_language_prop.md b/c/docs/template_language_prop.md deleted file mode 100644 index 1423ea8..0000000 --- a/c/docs/template_language_prop.md +++ /dev/null @@ -1,9 +0,0 @@ -# template_language_prop_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/template_namespace_field.md b/c/docs/template_namespace_field.md deleted file mode 100644 index c56784c..0000000 --- a/c/docs/template_namespace_field.md +++ /dev/null @@ -1,10 +0,0 @@ -# template_namespace_field_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_namespace** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/upload_media.md b/c/docs/upload_media.md deleted file mode 100644 index 890251e..0000000 --- a/c/docs/upload_media.md +++ /dev/null @@ -1,10 +0,0 @@ -# upload_media_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | **char \*** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/docs/webhook_url.md b/c/docs/webhook_url.md deleted file mode 100644 index fb3ed49..0000000 --- a/c/docs/webhook_url.md +++ /dev/null @@ -1,10 +0,0 @@ -# webhook_url_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **char \*** | Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/c/external/cJSON.c b/c/external/cJSON.c deleted file mode 100644 index afc9ff0..0000000 --- a/c/external/cJSON.c +++ /dev/null @@ -1,2932 +0,0 @@ -/* - Copyright (c) 2009-2017 Dave Gamble and cJSON contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -/* cJSON */ -/* JSON parser in C. */ - -/* disable warnings about old C89 functions in MSVC */ -#if !defined(_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) -#define _CRT_SECURE_NO_DEPRECATE -#endif - -#ifdef __GNUC__ -#pragma GCC visibility push(default) -#endif -#if defined(_MSC_VER) -#pragma warning (push) -/* disable warning about single line comments in system headers */ -#pragma warning (disable : 4001) -#endif - -#include -#include -#include -#include -#include -#include - -#ifdef ENABLE_LOCALES -#include -#endif - -#if defined(_MSC_VER) -#pragma warning (pop) -#endif -#ifdef __GNUC__ -#pragma GCC visibility pop -#endif - -#include "cJSON.h" - -/* define our own boolean type */ -#define true ((cJSON_bool)1) -#define false ((cJSON_bool)0) - -typedef struct { - const unsigned char *json; - size_t position; -} error; -static error global_error = { NULL, 0 }; - -CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void) -{ - return (const char*) (global_error.json + global_error.position); -} - -CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item) { - if (!cJSON_IsString(item)) { - return NULL; - } - - return item->valuestring; -} - -/* This is a safeguard to prevent copy-pasters from using incompatible C and header files */ -#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 7) - #error cJSON.h and cJSON.c have different versions. Make sure that both have the same. -#endif - -CJSON_PUBLIC(const char*) cJSON_Version(void) -{ - static char version[15]; - sprintf(version, "%i.%i.%i", CJSON_VERSION_MAJOR, CJSON_VERSION_MINOR, CJSON_VERSION_PATCH); - - return version; -} - -/* Case insensitive string comparison, doesn't consider two NULL pointers equal though */ -static int case_insensitive_strcmp(const unsigned char *string1, const unsigned char *string2) -{ - if ((string1 == NULL) || (string2 == NULL)) - { - return 1; - } - - if (string1 == string2) - { - return 0; - } - - for(; tolower(*string1) == tolower(*string2); (void)string1++, string2++) - { - if (*string1 == '\0') - { - return 0; - } - } - - return tolower(*string1) - tolower(*string2); -} - -typedef struct internal_hooks -{ - void *(*allocate)(size_t size); - void (*deallocate)(void *pointer); - void *(*reallocate)(void *pointer, size_t size); -} internal_hooks; - -#if defined(_MSC_VER) -/* work around MSVC error C2322: '...' address of dllimport '...' is not static */ -static void *internal_malloc(size_t size) -{ - return malloc(size); -} -static void internal_free(void *pointer) -{ - free(pointer); -} -static void *internal_realloc(void *pointer, size_t size) -{ - return realloc(pointer, size); -} -#else -#define internal_malloc malloc -#define internal_free free -#define internal_realloc realloc -#endif - -static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc }; - -static unsigned char* cJSON_strdup(const unsigned char* string, const internal_hooks * const hooks) -{ - size_t length = 0; - unsigned char *copy = NULL; - - if (string == NULL) - { - return NULL; - } - - length = strlen((const char*)string) + sizeof(""); - copy = (unsigned char*)hooks->allocate(length); - if (copy == NULL) - { - return NULL; - } - memcpy(copy, string, length); - - return copy; -} - -CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks) -{ - if (hooks == NULL) - { - /* Reset hooks */ - global_hooks.allocate = malloc; - global_hooks.deallocate = free; - global_hooks.reallocate = realloc; - return; - } - - global_hooks.allocate = malloc; - if (hooks->malloc_fn != NULL) - { - global_hooks.allocate = hooks->malloc_fn; - } - - global_hooks.deallocate = free; - if (hooks->free_fn != NULL) - { - global_hooks.deallocate = hooks->free_fn; - } - - /* use realloc only if both free and malloc are used */ - global_hooks.reallocate = NULL; - if ((global_hooks.allocate == malloc) && (global_hooks.deallocate == free)) - { - global_hooks.reallocate = realloc; - } -} - -/* Internal constructor. */ -static cJSON *cJSON_New_Item(const internal_hooks * const hooks) -{ - cJSON* node = (cJSON*)hooks->allocate(sizeof(cJSON)); - if (node) - { - memset(node, '\0', sizeof(cJSON)); - } - - return node; -} - -/* Delete a cJSON structure. */ -CJSON_PUBLIC(void) cJSON_Delete(cJSON *item) -{ - cJSON *next = NULL; - while (item != NULL) - { - next = item->next; - if (!(item->type & cJSON_IsReference) && (item->child != NULL)) - { - cJSON_Delete(item->child); - } - if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL)) - { - global_hooks.deallocate(item->valuestring); - } - if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) - { - global_hooks.deallocate(item->string); - } - global_hooks.deallocate(item); - item = next; - } -} - -/* get the decimal point character of the current locale */ -static unsigned char get_decimal_point(void) -{ -#ifdef ENABLE_LOCALES - struct lconv *lconv = localeconv(); - return (unsigned char) lconv->decimal_point[0]; -#else - return '.'; -#endif -} - -typedef struct -{ - const unsigned char *content; - size_t length; - size_t offset; - size_t depth; /* How deeply nested (in arrays/objects) is the input at the current offset. */ - internal_hooks hooks; -} parse_buffer; - -/* check if the given size is left to read in a given parse buffer (starting with 1) */ -#define can_read(buffer, size) ((buffer != NULL) && (((buffer)->offset + size) <= (buffer)->length)) -/* check if the buffer can be accessed at the given index (starting with 0) */ -#define can_access_at_index(buffer, index) ((buffer != NULL) && (((buffer)->offset + index) < (buffer)->length)) -#define cannot_access_at_index(buffer, index) (!can_access_at_index(buffer, index)) -/* get a pointer to the buffer at the position */ -#define buffer_at_offset(buffer) ((buffer)->content + (buffer)->offset) - -/* Parse the input text to generate a number, and populate the result into item. */ -static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_buffer) -{ - double number = 0; - unsigned char *after_end = NULL; - unsigned char number_c_string[64]; - unsigned char decimal_point = get_decimal_point(); - size_t i = 0; - - if ((input_buffer == NULL) || (input_buffer->content == NULL)) - { - return false; - } - - /* copy the number into a temporary buffer and replace '.' with the decimal point - * of the current locale (for strtod) - * This also takes care of '\0' not necessarily being available for marking the end of the input */ - for (i = 0; (i < (sizeof(number_c_string) - 1)) && can_access_at_index(input_buffer, i); i++) - { - switch (buffer_at_offset(input_buffer)[i]) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '+': - case '-': - case 'e': - case 'E': - number_c_string[i] = buffer_at_offset(input_buffer)[i]; - break; - - case '.': - number_c_string[i] = decimal_point; - break; - - default: - goto loop_end; - } - } -loop_end: - number_c_string[i] = '\0'; - - number = strtod((const char*)number_c_string, (char**)&after_end); - if (number_c_string == after_end) - { - return false; /* parse_error */ - } - - item->valuedouble = number; - - /* use saturation in case of overflow */ - if (number >= INT_MAX) - { - item->valueint = INT_MAX; - } - else if (number <= INT_MIN) - { - item->valueint = INT_MIN; - } - else - { - item->valueint = (int)number; - } - - item->type = cJSON_Number; - - input_buffer->offset += (size_t)(after_end - number_c_string); - return true; -} - -/* don't ask me, but the original cJSON_SetNumberValue returns an integer or double */ -CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number) -{ - if (number >= INT_MAX) - { - object->valueint = INT_MAX; - } - else if (number <= INT_MIN) - { - object->valueint = INT_MIN; - } - else - { - object->valueint = (int)number; - } - - return object->valuedouble = number; -} - -typedef struct -{ - unsigned char *buffer; - size_t length; - size_t offset; - size_t depth; /* current nesting depth (for formatted printing) */ - cJSON_bool noalloc; - cJSON_bool format; /* is this print a formatted print */ - internal_hooks hooks; -} printbuffer; - -/* realloc printbuffer if necessary to have at least "needed" bytes more */ -static unsigned char* ensure(printbuffer * const p, size_t needed) -{ - unsigned char *newbuffer = NULL; - size_t newsize = 0; - - if ((p == NULL) || (p->buffer == NULL)) - { - return NULL; - } - - if ((p->length > 0) && (p->offset >= p->length)) - { - /* make sure that offset is valid */ - return NULL; - } - - if (needed > INT_MAX) - { - /* sizes bigger than INT_MAX are currently not supported */ - return NULL; - } - - needed += p->offset + 1; - if (needed <= p->length) - { - return p->buffer + p->offset; - } - - if (p->noalloc) { - return NULL; - } - - /* calculate new buffer size */ - if (needed > (INT_MAX / 2)) - { - /* overflow of int, use INT_MAX if possible */ - if (needed <= INT_MAX) - { - newsize = INT_MAX; - } - else - { - return NULL; - } - } - else - { - newsize = needed * 2; - } - - if (p->hooks.reallocate != NULL) - { - /* reallocate with realloc if available */ - newbuffer = (unsigned char*)p->hooks.reallocate(p->buffer, newsize); - if (newbuffer == NULL) - { - p->hooks.deallocate(p->buffer); - p->length = 0; - p->buffer = NULL; - - return NULL; - } - } - else - { - /* otherwise reallocate manually */ - newbuffer = (unsigned char*)p->hooks.allocate(newsize); - if (!newbuffer) - { - p->hooks.deallocate(p->buffer); - p->length = 0; - p->buffer = NULL; - - return NULL; - } - if (newbuffer) - { - memcpy(newbuffer, p->buffer, p->offset + 1); - } - p->hooks.deallocate(p->buffer); - } - p->length = newsize; - p->buffer = newbuffer; - - return newbuffer + p->offset; -} - -/* calculate the new length of the string in a printbuffer and update the offset */ -static void update_offset(printbuffer * const buffer) -{ - const unsigned char *buffer_pointer = NULL; - if ((buffer == NULL) || (buffer->buffer == NULL)) - { - return; - } - buffer_pointer = buffer->buffer + buffer->offset; - - buffer->offset += strlen((const char*)buffer_pointer); -} - -/* Render the number nicely from the given item into a string. */ -static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output_pointer = NULL; - double d = item->valuedouble; - int length = 0; - size_t i = 0; - unsigned char number_buffer[26]; /* temporary buffer to print the number into */ - unsigned char decimal_point = get_decimal_point(); - double test; - - if (output_buffer == NULL) - { - return false; - } - - /* This checks for NaN and Infinity */ - if ((d * 0) != 0) - { - length = sprintf((char*)number_buffer, "null"); - } - else - { - /* Try 15 decimal places of precision to avoid insignificant nonzero digits */ - length = sprintf((char*)number_buffer, "%1.15g", d); - - /* Check whether the original double can be recovered */ - if ((sscanf((char*)number_buffer, "%lg", &test) != 1) || ((double)test != d)) - { - /* If not, print with 17 decimal places of precision */ - length = sprintf((char*)number_buffer, "%1.17g", d); - } - } - - /* sprintf failed or buffer overrun occurred */ - if ((length < 0) || (length > (int)(sizeof(number_buffer) - 1))) - { - return false; - } - - /* reserve appropriate space in the output */ - output_pointer = ensure(output_buffer, (size_t)length + sizeof("")); - if (output_pointer == NULL) - { - return false; - } - - /* copy the printed number to the output and replace locale - * dependent decimal point with '.' */ - for (i = 0; i < ((size_t)length); i++) - { - if (number_buffer[i] == decimal_point) - { - output_pointer[i] = '.'; - continue; - } - - output_pointer[i] = number_buffer[i]; - } - output_pointer[i] = '\0'; - - output_buffer->offset += (size_t)length; - - return true; -} - -/* parse 4 digit hexadecimal number */ -static unsigned parse_hex4(const unsigned char * const input) -{ - unsigned int h = 0; - size_t i = 0; - - for (i = 0; i < 4; i++) - { - /* parse digit */ - if ((input[i] >= '0') && (input[i] <= '9')) - { - h += (unsigned int) input[i] - '0'; - } - else if ((input[i] >= 'A') && (input[i] <= 'F')) - { - h += (unsigned int) 10 + input[i] - 'A'; - } - else if ((input[i] >= 'a') && (input[i] <= 'f')) - { - h += (unsigned int) 10 + input[i] - 'a'; - } - else /* invalid */ - { - return 0; - } - - if (i < 3) - { - /* shift left to make place for the next nibble */ - h = h << 4; - } - } - - return h; -} - -/* converts a UTF-16 literal to UTF-8 - * A literal can be one or two sequences of the form \uXXXX */ -static unsigned char utf16_literal_to_utf8(const unsigned char * const input_pointer, const unsigned char * const input_end, unsigned char **output_pointer) -{ - long unsigned int codepoint = 0; - unsigned int first_code = 0; - const unsigned char *first_sequence = input_pointer; - unsigned char utf8_length = 0; - unsigned char utf8_position = 0; - unsigned char sequence_length = 0; - unsigned char first_byte_mark = 0; - - if ((input_end - first_sequence) < 6) - { - /* input ends unexpectedly */ - goto fail; - } - - /* get the first utf16 sequence */ - first_code = parse_hex4(first_sequence + 2); - - /* check that the code is valid */ - if (((first_code >= 0xDC00) && (first_code <= 0xDFFF))) - { - goto fail; - } - - /* UTF16 surrogate pair */ - if ((first_code >= 0xD800) && (first_code <= 0xDBFF)) - { - const unsigned char *second_sequence = first_sequence + 6; - unsigned int second_code = 0; - sequence_length = 12; /* \uXXXX\uXXXX */ - - if ((input_end - second_sequence) < 6) - { - /* input ends unexpectedly */ - goto fail; - } - - if ((second_sequence[0] != '\\') || (second_sequence[1] != 'u')) - { - /* missing second half of the surrogate pair */ - goto fail; - } - - /* get the second utf16 sequence */ - second_code = parse_hex4(second_sequence + 2); - /* check that the code is valid */ - if ((second_code < 0xDC00) || (second_code > 0xDFFF)) - { - /* invalid second half of the surrogate pair */ - goto fail; - } - - - /* calculate the unicode codepoint from the surrogate pair */ - codepoint = 0x10000 + (((first_code & 0x3FF) << 10) | (second_code & 0x3FF)); - } - else - { - sequence_length = 6; /* \uXXXX */ - codepoint = first_code; - } - - /* encode as UTF-8 - * takes at maximum 4 bytes to encode: - * 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ - if (codepoint < 0x80) - { - /* normal ascii, encoding 0xxxxxxx */ - utf8_length = 1; - } - else if (codepoint < 0x800) - { - /* two bytes, encoding 110xxxxx 10xxxxxx */ - utf8_length = 2; - first_byte_mark = 0xC0; /* 11000000 */ - } - else if (codepoint < 0x10000) - { - /* three bytes, encoding 1110xxxx 10xxxxxx 10xxxxxx */ - utf8_length = 3; - first_byte_mark = 0xE0; /* 11100000 */ - } - else if (codepoint <= 0x10FFFF) - { - /* four bytes, encoding 1110xxxx 10xxxxxx 10xxxxxx 10xxxxxx */ - utf8_length = 4; - first_byte_mark = 0xF0; /* 11110000 */ - } - else - { - /* invalid unicode codepoint */ - goto fail; - } - - /* encode as utf8 */ - for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--) - { - /* 10xxxxxx */ - (*output_pointer)[utf8_position] = (unsigned char)((codepoint | 0x80) & 0xBF); - codepoint >>= 6; - } - /* encode first byte */ - if (utf8_length > 1) - { - (*output_pointer)[0] = (unsigned char)((codepoint | first_byte_mark) & 0xFF); - } - else - { - (*output_pointer)[0] = (unsigned char)(codepoint & 0x7F); - } - - *output_pointer += utf8_length; - - return sequence_length; - -fail: - return 0; -} - -/* Parse the input text into an unescaped cinput, and populate item. */ -static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_buffer) -{ - const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1; - const unsigned char *input_end = buffer_at_offset(input_buffer) + 1; - unsigned char *output_pointer = NULL; - unsigned char *output = NULL; - - /* not a string */ - if (buffer_at_offset(input_buffer)[0] != '\"') - { - goto fail; - } - - { - /* calculate approximate size of the output (overestimate) */ - size_t allocation_length = 0; - size_t skipped_bytes = 0; - while (((size_t)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"')) - { - /* is escape sequence */ - if (input_end[0] == '\\') - { - if ((size_t)(input_end + 1 - input_buffer->content) >= input_buffer->length) - { - /* prevent buffer overflow when last input character is a backslash */ - goto fail; - } - skipped_bytes++; - input_end++; - } - input_end++; - } - if (((size_t)(input_end - input_buffer->content) >= input_buffer->length) || (*input_end != '\"')) - { - goto fail; /* string ended unexpectedly */ - } - - /* This is at most how much we need for the output */ - allocation_length = (size_t) (input_end - buffer_at_offset(input_buffer)) - skipped_bytes; - output = (unsigned char*)input_buffer->hooks.allocate(allocation_length + sizeof("")); - if (output == NULL) - { - goto fail; /* allocation failure */ - } - } - - output_pointer = output; - /* loop through the string literal */ - while (input_pointer < input_end) - { - if (*input_pointer != '\\') - { - *output_pointer++ = *input_pointer++; - } - /* escape sequence */ - else - { - unsigned char sequence_length = 2; - if ((input_end - input_pointer) < 1) - { - goto fail; - } - - switch (input_pointer[1]) - { - case 'b': - *output_pointer++ = '\b'; - break; - case 'f': - *output_pointer++ = '\f'; - break; - case 'n': - *output_pointer++ = '\n'; - break; - case 'r': - *output_pointer++ = '\r'; - break; - case 't': - *output_pointer++ = '\t'; - break; - case '\"': - case '\\': - case '/': - *output_pointer++ = input_pointer[1]; - break; - - /* UTF-16 literal */ - case 'u': - sequence_length = utf16_literal_to_utf8(input_pointer, input_end, &output_pointer); - if (sequence_length == 0) - { - /* failed to convert UTF16-literal to UTF-8 */ - goto fail; - } - break; - - default: - goto fail; - } - input_pointer += sequence_length; - } - } - - /* zero terminate the output */ - *output_pointer = '\0'; - - item->type = cJSON_String; - item->valuestring = (char*)output; - - input_buffer->offset = (size_t) (input_end - input_buffer->content); - input_buffer->offset++; - - return true; - -fail: - if (output != NULL) - { - input_buffer->hooks.deallocate(output); - } - - if (input_pointer != NULL) - { - input_buffer->offset = (size_t)(input_pointer - input_buffer->content); - } - - return false; -} - -/* Render the cstring provided to an escaped version that can be printed. */ -static cJSON_bool print_string_ptr(const unsigned char * const input, printbuffer * const output_buffer) -{ - const unsigned char *input_pointer = NULL; - unsigned char *output = NULL; - unsigned char *output_pointer = NULL; - size_t output_length = 0; - /* numbers of additional characters needed for escaping */ - size_t escape_characters = 0; - - if (output_buffer == NULL) - { - return false; - } - - /* empty string */ - if (input == NULL) - { - output = ensure(output_buffer, sizeof("\"\"")); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "\"\""); - - return true; - } - - /* set "flag" to 1 if something needs to be escaped */ - for (input_pointer = input; *input_pointer; input_pointer++) - { - switch (*input_pointer) - { - case '\"': - case '\\': - case '\b': - case '\f': - case '\n': - case '\r': - case '\t': - /* one character escape sequence */ - escape_characters++; - break; - default: - if (*input_pointer < 32) - { - /* UTF-16 escape sequence uXXXX */ - escape_characters += 5; - } - break; - } - } - output_length = (size_t)(input_pointer - input) + escape_characters; - - output = ensure(output_buffer, output_length + sizeof("\"\"")); - if (output == NULL) - { - return false; - } - - /* no characters have to be escaped */ - if (escape_characters == 0) - { - output[0] = '\"'; - memcpy(output + 1, input, output_length); - output[output_length + 1] = '\"'; - output[output_length + 2] = '\0'; - - return true; - } - - output[0] = '\"'; - output_pointer = output + 1; - /* copy the string */ - for (input_pointer = input; *input_pointer != '\0'; (void)input_pointer++, output_pointer++) - { - if ((*input_pointer > 31) && (*input_pointer != '\"') && (*input_pointer != '\\')) - { - /* normal character, copy */ - *output_pointer = *input_pointer; - } - else - { - /* character needs to be escaped */ - *output_pointer++ = '\\'; - switch (*input_pointer) - { - case '\\': - *output_pointer = '\\'; - break; - case '\"': - *output_pointer = '\"'; - break; - case '\b': - *output_pointer = 'b'; - break; - case '\f': - *output_pointer = 'f'; - break; - case '\n': - *output_pointer = 'n'; - break; - case '\r': - *output_pointer = 'r'; - break; - case '\t': - *output_pointer = 't'; - break; - default: - /* escape and print as unicode codepoint */ - sprintf((char*)output_pointer, "u%04x", *input_pointer); - output_pointer += 4; - break; - } - } - } - output[output_length + 1] = '\"'; - output[output_length + 2] = '\0'; - - return true; -} - -/* Invoke print_string_ptr (which is useful) on an item. */ -static cJSON_bool print_string(const cJSON * const item, printbuffer * const p) -{ - return print_string_ptr((unsigned char*)item->valuestring, p); -} - -/* Predeclare these prototypes. */ -static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer); -static cJSON_bool print_value(const cJSON * const item, printbuffer * const output_buffer); -static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer); -static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer); -static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer); -static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer); - -/* Utility to jump whitespace and cr/lf */ -static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer) -{ - if ((buffer == NULL) || (buffer->content == NULL)) - { - return NULL; - } - - while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32)) - { - buffer->offset++; - } - - if (buffer->offset == buffer->length) - { - buffer->offset--; - } - - return buffer; -} - -/* skip the UTF-8 BOM (byte order mark) if it is at the beginning of a buffer */ -static parse_buffer *skip_utf8_bom(parse_buffer * const buffer) -{ - if ((buffer == NULL) || (buffer->content == NULL) || (buffer->offset != 0)) - { - return NULL; - } - - if (can_access_at_index(buffer, 4) && (strncmp((const char*)buffer_at_offset(buffer), "\xEF\xBB\xBF", 3) == 0)) - { - buffer->offset += 3; - } - - return buffer; -} - -/* Parse an object - create a new root, and populate. */ -CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated) -{ - parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0 } }; - cJSON *item = NULL; - - /* reset error position */ - global_error.json = NULL; - global_error.position = 0; - - if (value == NULL) - { - goto fail; - } - - buffer.content = (const unsigned char*)value; - buffer.length = strlen((const char*)value) + sizeof(""); - buffer.offset = 0; - buffer.hooks = global_hooks; - - item = cJSON_New_Item(&global_hooks); - if (item == NULL) /* memory fail */ - { - goto fail; - } - - if (!parse_value(item, buffer_skip_whitespace(skip_utf8_bom(&buffer)))) - { - /* parse failure. ep is set. */ - goto fail; - } - - /* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */ - if (require_null_terminated) - { - buffer_skip_whitespace(&buffer); - if ((buffer.offset >= buffer.length) || buffer_at_offset(&buffer)[0] != '\0') - { - goto fail; - } - } - if (return_parse_end) - { - *return_parse_end = (const char*)buffer_at_offset(&buffer); - } - - return item; - -fail: - if (item != NULL) - { - cJSON_Delete(item); - } - - if (value != NULL) - { - error local_error; - local_error.json = (const unsigned char*)value; - local_error.position = 0; - - if (buffer.offset < buffer.length) - { - local_error.position = buffer.offset; - } - else if (buffer.length > 0) - { - local_error.position = buffer.length - 1; - } - - if (return_parse_end != NULL) - { - *return_parse_end = (const char*)local_error.json + local_error.position; - } - - global_error = local_error; - } - - return NULL; -} - -/* Default options for cJSON_Parse */ -CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value) -{ - return cJSON_ParseWithOpts(value, 0, 0); -} - -#define cjson_min(a, b) ((a < b) ? a : b) - -static unsigned char *print(const cJSON * const item, cJSON_bool format, const internal_hooks * const hooks) -{ - static const size_t default_buffer_size = 256; - printbuffer buffer[1]; - unsigned char *printed = NULL; - - memset(buffer, 0, sizeof(buffer)); - - /* create buffer */ - buffer->buffer = (unsigned char*) hooks->allocate(default_buffer_size); - buffer->length = default_buffer_size; - buffer->format = format; - buffer->hooks = *hooks; - if (buffer->buffer == NULL) - { - goto fail; - } - - /* print the value */ - if (!print_value(item, buffer)) - { - goto fail; - } - update_offset(buffer); - - /* check if reallocate is available */ - if (hooks->reallocate != NULL) - { - printed = (unsigned char*) hooks->reallocate(buffer->buffer, buffer->offset + 1); - if (printed == NULL) { - goto fail; - } - buffer->buffer = NULL; - } - else /* otherwise copy the JSON over to a new buffer */ - { - printed = (unsigned char*) hooks->allocate(buffer->offset + 1); - if (printed == NULL) - { - goto fail; - } - memcpy(printed, buffer->buffer, cjson_min(buffer->length, buffer->offset + 1)); - printed[buffer->offset] = '\0'; /* just to be sure */ - - /* free the buffer */ - hooks->deallocate(buffer->buffer); - } - - return printed; - -fail: - if (buffer->buffer != NULL) - { - hooks->deallocate(buffer->buffer); - } - - if (printed != NULL) - { - hooks->deallocate(printed); - } - - return NULL; -} - -/* Render a cJSON item/entity/structure to text. */ -CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item) -{ - return (char*)print(item, true, &global_hooks); -} - -CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item) -{ - return (char*)print(item, false, &global_hooks); -} - -CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt) -{ - printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; - - if (prebuffer < 0) - { - return NULL; - } - - p.buffer = (unsigned char*)global_hooks.allocate((size_t)prebuffer); - if (!p.buffer) - { - return NULL; - } - - p.length = (size_t)prebuffer; - p.offset = 0; - p.noalloc = false; - p.format = fmt; - p.hooks = global_hooks; - - if (!print_value(item, &p)) - { - global_hooks.deallocate(p.buffer); - return NULL; - } - - return (char*)p.buffer; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buf, const int len, const cJSON_bool fmt) -{ - printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; - - if ((len < 0) || (buf == NULL)) - { - return false; - } - - p.buffer = (unsigned char*)buf; - p.length = (size_t)len; - p.offset = 0; - p.noalloc = true; - p.format = fmt; - p.hooks = global_hooks; - - return print_value(item, &p); -} - -/* Parser core - when encountering text, process appropriately. */ -static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) -{ - if ((input_buffer == NULL) || (input_buffer->content == NULL)) - { - return false; /* no input */ - } - - /* parse the different types of values */ - /* null */ - if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) == 0)) - { - item->type = cJSON_NULL; - input_buffer->offset += 4; - return true; - } - /* false */ - if (can_read(input_buffer, 5) && (strncmp((const char*)buffer_at_offset(input_buffer), "false", 5) == 0)) - { - item->type = cJSON_False; - input_buffer->offset += 5; - return true; - } - /* true */ - if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "true", 4) == 0)) - { - item->type = cJSON_True; - item->valueint = 1; - input_buffer->offset += 4; - return true; - } - /* string */ - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '\"')) - { - return parse_string(item, input_buffer); - } - /* number */ - if (can_access_at_index(input_buffer, 0) && ((buffer_at_offset(input_buffer)[0] == '-') || ((buffer_at_offset(input_buffer)[0] >= '0') && (buffer_at_offset(input_buffer)[0] <= '9')))) - { - return parse_number(item, input_buffer); - } - /* array */ - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '[')) - { - return parse_array(item, input_buffer); - } - /* object */ - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '{')) - { - return parse_object(item, input_buffer); - } - - return false; -} - -/* Render a value to text. */ -static cJSON_bool print_value(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output = NULL; - - if ((item == NULL) || (output_buffer == NULL)) - { - return false; - } - - switch ((item->type) & 0xFF) - { - case cJSON_NULL: - output = ensure(output_buffer, 5); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "null"); - return true; - - case cJSON_False: - output = ensure(output_buffer, 6); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "false"); - return true; - - case cJSON_True: - output = ensure(output_buffer, 5); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "true"); - return true; - - case cJSON_Number: - return print_number(item, output_buffer); - - case cJSON_Raw: - { - size_t raw_length = 0; - if (item->valuestring == NULL) - { - return false; - } - - raw_length = strlen(item->valuestring) + sizeof(""); - output = ensure(output_buffer, raw_length); - if (output == NULL) - { - return false; - } - memcpy(output, item->valuestring, raw_length); - return true; - } - - case cJSON_String: - return print_string(item, output_buffer); - - case cJSON_Array: - return print_array(item, output_buffer); - - case cJSON_Object: - return print_object(item, output_buffer); - - default: - return false; - } -} - -/* Build an array from input text. */ -static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer) -{ - cJSON *head = NULL; /* head of the linked list */ - cJSON *current_item = NULL; - - if (input_buffer->depth >= CJSON_NESTING_LIMIT) - { - return false; /* to deeply nested */ - } - input_buffer->depth++; - - if (buffer_at_offset(input_buffer)[0] != '[') - { - /* not an array */ - goto fail; - } - - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ']')) - { - /* empty array */ - goto success; - } - - /* check if we skipped to the end of the buffer */ - if (cannot_access_at_index(input_buffer, 0)) - { - input_buffer->offset--; - goto fail; - } - - /* step back to character in front of the first element */ - input_buffer->offset--; - /* loop through the comma separated array elements */ - do - { - /* allocate next item */ - cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); - if (new_item == NULL) - { - goto fail; /* allocation failure */ - } - - /* attach next item to list */ - if (head == NULL) - { - /* start the linked list */ - current_item = head = new_item; - } - else - { - /* add to the end and advance */ - current_item->next = new_item; - new_item->prev = current_item; - current_item = new_item; - } - - /* parse next value */ - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (!parse_value(current_item, input_buffer)) - { - goto fail; /* failed to parse value */ - } - buffer_skip_whitespace(input_buffer); - } - while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); - - if (cannot_access_at_index(input_buffer, 0) || buffer_at_offset(input_buffer)[0] != ']') - { - goto fail; /* expected end of array */ - } - -success: - input_buffer->depth--; - - item->type = cJSON_Array; - item->child = head; - - input_buffer->offset++; - - return true; - -fail: - if (head != NULL) - { - cJSON_Delete(head); - } - - return false; -} - -/* Render an array to text */ -static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output_pointer = NULL; - size_t length = 0; - cJSON *current_element = item->child; - - if (output_buffer == NULL) - { - return false; - } - - /* Compose the output array. */ - /* opening square bracket */ - output_pointer = ensure(output_buffer, 1); - if (output_pointer == NULL) - { - return false; - } - - *output_pointer = '['; - output_buffer->offset++; - output_buffer->depth++; - - while (current_element != NULL) - { - if (!print_value(current_element, output_buffer)) - { - return false; - } - update_offset(output_buffer); - if (current_element->next) - { - length = (size_t) (output_buffer->format ? 2 : 1); - output_pointer = ensure(output_buffer, length + 1); - if (output_pointer == NULL) - { - return false; - } - *output_pointer++ = ','; - if(output_buffer->format) - { - *output_pointer++ = ' '; - } - *output_pointer = '\0'; - output_buffer->offset += length; - } - current_element = current_element->next; - } - - output_pointer = ensure(output_buffer, 2); - if (output_pointer == NULL) - { - return false; - } - *output_pointer++ = ']'; - *output_pointer = '\0'; - output_buffer->depth--; - - return true; -} - -/* Build an object from the text. */ -static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer) -{ - cJSON *head = NULL; /* linked list head */ - cJSON *current_item = NULL; - - if (input_buffer->depth >= CJSON_NESTING_LIMIT) - { - return false; /* to deeply nested */ - } - input_buffer->depth++; - - if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '{')) - { - goto fail; /* not an object */ - } - - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '}')) - { - goto success; /* empty object */ - } - - /* check if we skipped to the end of the buffer */ - if (cannot_access_at_index(input_buffer, 0)) - { - input_buffer->offset--; - goto fail; - } - - /* step back to character in front of the first element */ - input_buffer->offset--; - /* loop through the comma separated array elements */ - do - { - /* allocate next item */ - cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); - if (new_item == NULL) - { - goto fail; /* allocation failure */ - } - - /* attach next item to list */ - if (head == NULL) - { - /* start the linked list */ - current_item = head = new_item; - } - else - { - /* add to the end and advance */ - current_item->next = new_item; - new_item->prev = current_item; - current_item = new_item; - } - - /* parse the name of the child */ - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (!parse_string(current_item, input_buffer)) - { - goto fail; /* fail to parse name */ - } - buffer_skip_whitespace(input_buffer); - - /* swap valuestring and string, because we parsed the name */ - current_item->string = current_item->valuestring; - current_item->valuestring = NULL; - - if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != ':')) - { - goto fail; /* invalid object */ - } - - /* parse the value */ - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (!parse_value(current_item, input_buffer)) - { - goto fail; /* failed to parse value */ - } - buffer_skip_whitespace(input_buffer); - } - while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); - - if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '}')) - { - goto fail; /* expected end of object */ - } - -success: - input_buffer->depth--; - - item->type = cJSON_Object; - item->child = head; - - input_buffer->offset++; - return true; - -fail: - if (head != NULL) - { - cJSON_Delete(head); - } - - return false; -} - -/* Render an object to text. */ -static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output_pointer = NULL; - size_t length = 0; - cJSON *current_item = item->child; - - if (output_buffer == NULL) - { - return false; - } - - /* Compose the output: */ - length = (size_t) (output_buffer->format ? 2 : 1); /* fmt: {\n */ - output_pointer = ensure(output_buffer, length + 1); - if (output_pointer == NULL) - { - return false; - } - - *output_pointer++ = '{'; - output_buffer->depth++; - if (output_buffer->format) - { - *output_pointer++ = '\n'; - } - output_buffer->offset += length; - - while (current_item) - { - if (output_buffer->format) - { - size_t i; - output_pointer = ensure(output_buffer, output_buffer->depth); - if (output_pointer == NULL) - { - return false; - } - for (i = 0; i < output_buffer->depth; i++) - { - *output_pointer++ = '\t'; - } - output_buffer->offset += output_buffer->depth; - } - - /* print key */ - if (!print_string_ptr((unsigned char*)current_item->string, output_buffer)) - { - return false; - } - update_offset(output_buffer); - - length = (size_t) (output_buffer->format ? 2 : 1); - output_pointer = ensure(output_buffer, length); - if (output_pointer == NULL) - { - return false; - } - *output_pointer++ = ':'; - if (output_buffer->format) - { - *output_pointer++ = '\t'; - } - output_buffer->offset += length; - - /* print value */ - if (!print_value(current_item, output_buffer)) - { - return false; - } - update_offset(output_buffer); - - /* print comma if not last */ - length = (size_t) ((output_buffer->format ? 1 : 0) + (current_item->next ? 1 : 0)); - output_pointer = ensure(output_buffer, length + 1); - if (output_pointer == NULL) - { - return false; - } - if (current_item->next) - { - *output_pointer++ = ','; - } - - if (output_buffer->format) - { - *output_pointer++ = '\n'; - } - *output_pointer = '\0'; - output_buffer->offset += length; - - current_item = current_item->next; - } - - output_pointer = ensure(output_buffer, output_buffer->format ? (output_buffer->depth + 1) : 2); - if (output_pointer == NULL) - { - return false; - } - if (output_buffer->format) - { - size_t i; - for (i = 0; i < (output_buffer->depth - 1); i++) - { - *output_pointer++ = '\t'; - } - } - *output_pointer++ = '}'; - *output_pointer = '\0'; - output_buffer->depth--; - - return true; -} - -/* Get Array size/item / object item. */ -CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array) -{ - cJSON *child = NULL; - size_t size = 0; - - if (array == NULL) - { - return 0; - } - - child = array->child; - - while(child != NULL) - { - size++; - child = child->next; - } - - /* FIXME: Can overflow here. Cannot be fixed without breaking the API */ - - return (int)size; -} - -static cJSON* get_array_item(const cJSON *array, size_t index) -{ - cJSON *current_child = NULL; - - if (array == NULL) - { - return NULL; - } - - current_child = array->child; - while ((current_child != NULL) && (index > 0)) - { - index--; - current_child = current_child->next; - } - - return current_child; -} - -CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) -{ - if (index < 0) - { - return NULL; - } - - return get_array_item(array, (size_t)index); -} - -static cJSON *get_object_item(const cJSON * const object, const char * const name, const cJSON_bool case_sensitive) -{ - cJSON *current_element = NULL; - - if ((object == NULL) || (name == NULL)) - { - return NULL; - } - - current_element = object->child; - if (case_sensitive) - { - while ((current_element != NULL) && (strcmp(name, current_element->string) != 0)) - { - current_element = current_element->next; - } - } - else - { - while ((current_element != NULL) && (case_insensitive_strcmp((const unsigned char*)name, (const unsigned char*)(current_element->string)) != 0)) - { - current_element = current_element->next; - } - } - - return current_element; -} - -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string) -{ - return get_object_item(object, string, false); -} - -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string) -{ - return get_object_item(object, string, true); -} - -CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string) -{ - return cJSON_GetObjectItem(object, string) ? 1 : 0; -} - -/* Utility for array list handling. */ -static void suffix_object(cJSON *prev, cJSON *item) -{ - prev->next = item; - item->prev = prev; -} - -/* Utility for handling references. */ -static cJSON *create_reference(const cJSON *item, const internal_hooks * const hooks) -{ - cJSON *reference = NULL; - if (item == NULL) - { - return NULL; - } - - reference = cJSON_New_Item(hooks); - if (reference == NULL) - { - return NULL; - } - - memcpy(reference, item, sizeof(cJSON)); - reference->string = NULL; - reference->type |= cJSON_IsReference; - reference->next = reference->prev = NULL; - return reference; -} - -static cJSON_bool add_item_to_array(cJSON *array, cJSON *item) -{ - cJSON *child = NULL; - - if ((item == NULL) || (array == NULL)) - { - return false; - } - - child = array->child; - - if (child == NULL) - { - /* list is empty, start new one */ - array->child = item; - } - else - { - /* append to the end */ - while (child->next) - { - child = child->next; - } - suffix_object(child, item); - } - - return true; -} - -/* Add item to array/object. */ -CJSON_PUBLIC(void) cJSON_AddItemToArray(cJSON *array, cJSON *item) -{ - add_item_to_array(array, item); -} - -#if defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) - #pragma GCC diagnostic push -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wcast-qual" -#endif -/* helper function to cast away const */ -static void* cast_away_const(const void* string) -{ - return (void*)string; -} -#if defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) - #pragma GCC diagnostic pop -#endif - - -static cJSON_bool add_item_to_object(cJSON * const object, const char * const string, cJSON * const item, const internal_hooks * const hooks, const cJSON_bool constant_key) -{ - char *new_key = NULL; - int new_type = cJSON_Invalid; - - if ((object == NULL) || (string == NULL) || (item == NULL)) - { - return false; - } - - if (constant_key) - { - new_key = (char*)cast_away_const(string); - new_type = item->type | cJSON_StringIsConst; - } - else - { - new_key = (char*)cJSON_strdup((const unsigned char*)string, hooks); - if (new_key == NULL) - { - return false; - } - - new_type = item->type & ~cJSON_StringIsConst; - } - - if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) - { - hooks->deallocate(item->string); - } - - item->string = new_key; - item->type = new_type; - - return add_item_to_array(object, item); -} - -CJSON_PUBLIC(void) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) -{ - add_item_to_object(object, string, item, &global_hooks, false); -} - -/* Add an item to an object with constant string as key */ -CJSON_PUBLIC(void) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item) -{ - add_item_to_object(object, string, item, &global_hooks, true); -} - -CJSON_PUBLIC(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) -{ - if (array == NULL) - { - return; - } - - add_item_to_array(array, create_reference(item, &global_hooks)); -} - -CJSON_PUBLIC(void) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item) -{ - if ((object == NULL) || (string == NULL)) - { - return; - } - - add_item_to_object(object, string, create_reference(item, &global_hooks), &global_hooks, false); -} - -CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name) -{ - cJSON *null = cJSON_CreateNull(); - if (add_item_to_object(object, name, null, &global_hooks, false)) - { - return null; - } - - cJSON_Delete(null); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name) -{ - cJSON *true_item = cJSON_CreateTrue(); - if (add_item_to_object(object, name, true_item, &global_hooks, false)) - { - return true_item; - } - - cJSON_Delete(true_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name) -{ - cJSON *false_item = cJSON_CreateFalse(); - if (add_item_to_object(object, name, false_item, &global_hooks, false)) - { - return false_item; - } - - cJSON_Delete(false_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean) -{ - cJSON *bool_item = cJSON_CreateBool(boolean); - if (add_item_to_object(object, name, bool_item, &global_hooks, false)) - { - return bool_item; - } - - cJSON_Delete(bool_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) -{ - cJSON *number_item = cJSON_CreateNumber(number); - if (add_item_to_object(object, name, number_item, &global_hooks, false)) - { - return number_item; - } - - cJSON_Delete(number_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) -{ - cJSON *string_item = cJSON_CreateString(string); - if (add_item_to_object(object, name, string_item, &global_hooks, false)) - { - return string_item; - } - - cJSON_Delete(string_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) -{ - cJSON *raw_item = cJSON_CreateRaw(raw); - if (add_item_to_object(object, name, raw_item, &global_hooks, false)) - { - return raw_item; - } - - cJSON_Delete(raw_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name) -{ - cJSON *object_item = cJSON_CreateObject(); - if (add_item_to_object(object, name, object_item, &global_hooks, false)) - { - return object_item; - } - - cJSON_Delete(object_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name) -{ - cJSON *array = cJSON_CreateArray(); - if (add_item_to_object(object, name, array, &global_hooks, false)) - { - return array; - } - - cJSON_Delete(array); - return NULL; -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item) -{ - if ((parent == NULL) || (item == NULL)) - { - return NULL; - } - - if (item->prev != NULL) - { - /* not the first element */ - item->prev->next = item->next; - } - if (item->next != NULL) - { - /* not the last element */ - item->next->prev = item->prev; - } - - if (item == parent->child) - { - /* first element */ - parent->child = item->next; - } - /* make sure the detached item doesn't point anywhere anymore */ - item->prev = NULL; - item->next = NULL; - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which) -{ - if (which < 0) - { - return NULL; - } - - return cJSON_DetachItemViaPointer(array, get_array_item(array, (size_t)which)); -} - -CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which) -{ - cJSON_Delete(cJSON_DetachItemFromArray(array, which)); -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string) -{ - cJSON *to_detach = cJSON_GetObjectItem(object, string); - - return cJSON_DetachItemViaPointer(object, to_detach); -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string) -{ - cJSON *to_detach = cJSON_GetObjectItemCaseSensitive(object, string); - - return cJSON_DetachItemViaPointer(object, to_detach); -} - -CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string) -{ - cJSON_Delete(cJSON_DetachItemFromObject(object, string)); -} - -CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string) -{ - cJSON_Delete(cJSON_DetachItemFromObjectCaseSensitive(object, string)); -} - -/* Replace array/object items with new ones. */ -CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem) -{ - cJSON *after_inserted = NULL; - - if (which < 0) - { - return; - } - - after_inserted = get_array_item(array, (size_t)which); - if (after_inserted == NULL) - { - add_item_to_array(array, newitem); - return; - } - - newitem->next = after_inserted; - newitem->prev = after_inserted->prev; - after_inserted->prev = newitem; - if (after_inserted == array->child) - { - array->child = newitem; - } - else - { - newitem->prev->next = newitem; - } -} - -CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement) -{ - if ((parent == NULL) || (replacement == NULL) || (item == NULL)) - { - return false; - } - - if (replacement == item) - { - return true; - } - - replacement->next = item->next; - replacement->prev = item->prev; - - if (replacement->next != NULL) - { - replacement->next->prev = replacement; - } - if (replacement->prev != NULL) - { - replacement->prev->next = replacement; - } - if (parent->child == item) - { - parent->child = replacement; - } - - item->next = NULL; - item->prev = NULL; - cJSON_Delete(item); - - return true; -} - -CJSON_PUBLIC(void) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem) -{ - if (which < 0) - { - return; - } - - cJSON_ReplaceItemViaPointer(array, get_array_item(array, (size_t)which), newitem); -} - -static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJSON_bool case_sensitive) -{ - if ((replacement == NULL) || (string == NULL)) - { - return false; - } - - /* replace the name in the replacement */ - if (!(replacement->type & cJSON_StringIsConst) && (replacement->string != NULL)) - { - cJSON_free(replacement->string); - } - replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); - replacement->type &= ~cJSON_StringIsConst; - - cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement); - - return true; -} - -CJSON_PUBLIC(void) cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem) -{ - replace_item_in_object(object, string, newitem, false); -} - -CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object, const char *string, cJSON *newitem) -{ - replace_item_in_object(object, string, newitem, true); -} - -/* Create basic types: */ -CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_NULL; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_True; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_False; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool b) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = b ? cJSON_True : cJSON_False; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_Number; - item->valuedouble = num; - - /* use saturation in case of overflow */ - if (num >= INT_MAX) - { - item->valueint = INT_MAX; - } - else if (num <= INT_MIN) - { - item->valueint = INT_MIN; - } - else - { - item->valueint = (int)num; - } - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_String; - item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); - if(!item->valuestring) - { - cJSON_Delete(item); - return NULL; - } - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if (item != NULL) - { - item->type = cJSON_String | cJSON_IsReference; - item->valuestring = (char*)cast_away_const(string); - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if (item != NULL) { - item->type = cJSON_Object | cJSON_IsReference; - item->child = (cJSON*)cast_away_const(child); - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child) { - cJSON *item = cJSON_New_Item(&global_hooks); - if (item != NULL) { - item->type = cJSON_Array | cJSON_IsReference; - item->child = (cJSON*)cast_away_const(child); - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_Raw; - item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); - if(!item->valuestring) - { - cJSON_Delete(item); - return NULL; - } - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type=cJSON_Array; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if (item) - { - item->type = cJSON_Object; - } - - return item; -} - -/* Create Arrays: */ -CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (numbers == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - for(i = 0; a && (i < (size_t)count); i++) - { - n = cJSON_CreateNumber(numbers[i]); - if (!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p, n); - } - p = n; - } - - return a; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (numbers == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - - for(i = 0; a && (i < (size_t)count); i++) - { - n = cJSON_CreateNumber((double)numbers[i]); - if(!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p, n); - } - p = n; - } - - return a; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (numbers == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - - for(i = 0;a && (i < (size_t)count); i++) - { - n = cJSON_CreateNumber(numbers[i]); - if(!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p, n); - } - p = n; - } - - return a; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char **strings, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (strings == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - - for (i = 0; a && (i < (size_t)count); i++) - { - n = cJSON_CreateString(strings[i]); - if(!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p,n); - } - p = n; - } - - return a; -} - -/* Duplication */ -CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse) -{ - cJSON *newitem = NULL; - cJSON *child = NULL; - cJSON *next = NULL; - cJSON *newchild = NULL; - - /* Bail on bad ptr */ - if (!item) - { - goto fail; - } - /* Create new item */ - newitem = cJSON_New_Item(&global_hooks); - if (!newitem) - { - goto fail; - } - /* Copy over all vars */ - newitem->type = item->type & (~cJSON_IsReference); - newitem->valueint = item->valueint; - newitem->valuedouble = item->valuedouble; - if (item->valuestring) - { - newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring, &global_hooks); - if (!newitem->valuestring) - { - goto fail; - } - } - if (item->string) - { - newitem->string = (item->type&cJSON_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string, &global_hooks); - if (!newitem->string) - { - goto fail; - } - } - /* If non-recursive, then we're done! */ - if (!recurse) - { - return newitem; - } - /* Walk the ->next chain for the child. */ - child = item->child; - while (child != NULL) - { - newchild = cJSON_Duplicate(child, true); /* Duplicate (with recurse) each item in the ->next chain */ - if (!newchild) - { - goto fail; - } - if (next != NULL) - { - /* If newitem->child already set, then crosswire ->prev and ->next and move on */ - next->next = newchild; - newchild->prev = next; - next = newchild; - } - else - { - /* Set newitem->child and move to it */ - newitem->child = newchild; - next = newchild; - } - child = child->next; - } - - return newitem; - -fail: - if (newitem != NULL) - { - cJSON_Delete(newitem); - } - - return NULL; -} - -CJSON_PUBLIC(void) cJSON_Minify(char *json) -{ - unsigned char *into = (unsigned char*)json; - - if (json == NULL) - { - return; - } - - while (*json) - { - if (*json == ' ') - { - json++; - } - else if (*json == '\t') - { - /* Whitespace characters. */ - json++; - } - else if (*json == '\r') - { - json++; - } - else if (*json=='\n') - { - json++; - } - else if ((*json == '/') && (json[1] == '/')) - { - /* double-slash comments, to end of line. */ - while (*json && (*json != '\n')) - { - json++; - } - } - else if ((*json == '/') && (json[1] == '*')) - { - /* multiline comments. */ - while (*json && !((*json == '*') && (json[1] == '/'))) - { - json++; - } - json += 2; - } - else if (*json == '\"') - { - /* string literals, which are \" sensitive. */ - *into++ = (unsigned char)*json++; - while (*json && (*json != '\"')) - { - if (*json == '\\') - { - *into++ = (unsigned char)*json++; - } - *into++ = (unsigned char)*json++; - } - *into++ = (unsigned char)*json++; - } - else - { - /* All other characters. */ - *into++ = (unsigned char)*json++; - } - } - - /* and null-terminate. */ - *into = '\0'; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Invalid; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsFalse(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_False; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xff) == cJSON_True; -} - - -CJSON_PUBLIC(cJSON_bool) cJSON_IsBool(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & (cJSON_True | cJSON_False)) != 0; -} -CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_NULL; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Number; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsString(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_String; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Array; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsObject(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Object; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Raw; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive) -{ - if ((a == NULL) || (b == NULL) || ((a->type & 0xFF) != (b->type & 0xFF)) || cJSON_IsInvalid(a)) - { - return false; - } - - /* check if type is valid */ - switch (a->type & 0xFF) - { - case cJSON_False: - case cJSON_True: - case cJSON_NULL: - case cJSON_Number: - case cJSON_String: - case cJSON_Raw: - case cJSON_Array: - case cJSON_Object: - break; - - default: - return false; - } - - /* identical objects are equal */ - if (a == b) - { - return true; - } - - switch (a->type & 0xFF) - { - /* in these cases and equal type is enough */ - case cJSON_False: - case cJSON_True: - case cJSON_NULL: - return true; - - case cJSON_Number: - if (a->valuedouble == b->valuedouble) - { - return true; - } - return false; - - case cJSON_String: - case cJSON_Raw: - if ((a->valuestring == NULL) || (b->valuestring == NULL)) - { - return false; - } - if (strcmp(a->valuestring, b->valuestring) == 0) - { - return true; - } - - return false; - - case cJSON_Array: - { - cJSON *a_element = a->child; - cJSON *b_element = b->child; - - for (; (a_element != NULL) && (b_element != NULL);) - { - if (!cJSON_Compare(a_element, b_element, case_sensitive)) - { - return false; - } - - a_element = a_element->next; - b_element = b_element->next; - } - - /* one of the arrays is longer than the other */ - if (a_element != b_element) { - return false; - } - - return true; - } - - case cJSON_Object: - { - cJSON *a_element = NULL; - cJSON *b_element = NULL; - cJSON_ArrayForEach(a_element, a) - { - /* TODO This has O(n^2) runtime, which is horrible! */ - b_element = get_object_item(b, a_element->string, case_sensitive); - if (b_element == NULL) - { - return false; - } - - if (!cJSON_Compare(a_element, b_element, case_sensitive)) - { - return false; - } - } - - /* doing this twice, once on a and b to prevent true comparison if a subset of b - * TODO: Do this the proper way, this is just a fix for now */ - cJSON_ArrayForEach(b_element, b) - { - a_element = get_object_item(a, b_element->string, case_sensitive); - if (a_element == NULL) - { - return false; - } - - if (!cJSON_Compare(b_element, a_element, case_sensitive)) - { - return false; - } - } - - return true; - } - - default: - return false; - } -} - -CJSON_PUBLIC(void *) cJSON_malloc(size_t size) -{ - return global_hooks.allocate(size); -} - -CJSON_PUBLIC(void) cJSON_free(void *object) -{ - global_hooks.deallocate(object); -} diff --git a/c/external/cJSON.h b/c/external/cJSON.h deleted file mode 100644 index ab0d0fb..0000000 --- a/c/external/cJSON.h +++ /dev/null @@ -1,277 +0,0 @@ -/* - Copyright (c) 2009-2017 Dave Gamble and cJSON contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -#ifndef cJSON__h -#define cJSON__h - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* project version */ -#define CJSON_VERSION_MAJOR 1 -#define CJSON_VERSION_MINOR 7 -#define CJSON_VERSION_PATCH 7 - -#include - -/* cJSON Types: */ -#define cJSON_Invalid (0) -#define cJSON_False (1 << 0) -#define cJSON_True (1 << 1) -#define cJSON_NULL (1 << 2) -#define cJSON_Number (1 << 3) -#define cJSON_String (1 << 4) -#define cJSON_Array (1 << 5) -#define cJSON_Object (1 << 6) -#define cJSON_Raw (1 << 7) /* raw json */ - -#define cJSON_IsReference 256 -#define cJSON_StringIsConst 512 - -/* The cJSON structure: */ -typedef struct cJSON -{ - /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */ - struct cJSON *next; - struct cJSON *prev; - /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ - struct cJSON *child; - - /* The type of the item, as above. */ - int type; - - /* The item's string, if type==cJSON_String and type == cJSON_Raw */ - char *valuestring; - /* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */ - int valueint; - /* The item's number, if type==cJSON_Number */ - double valuedouble; - - /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ - char *string; -} cJSON; - -typedef struct cJSON_Hooks -{ - void *(*malloc_fn)(size_t sz); - void (*free_fn)(void *ptr); -} cJSON_Hooks; - -typedef int cJSON_bool; - -#if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)) -#define __WINDOWS__ -#endif -#ifdef __WINDOWS__ - -/* When compiling for windows, we specify a specific calling convention to avoid issues where we are being called from a project with a different default calling convention. For windows you have 2 define options: - -CJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbols -CJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default) -CJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbol - -For *nix builds that support visibility attribute, you can define similar behavior by - -setting default visibility to hidden by adding --fvisibility=hidden (for gcc) -or --xldscope=hidden (for sun cc) -to CFLAGS - -then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does - -*/ - -/* export symbols by default, this is necessary for copy pasting the C and header file */ -#if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS) -#define CJSON_EXPORT_SYMBOLS -#endif - -#if defined(CJSON_HIDE_SYMBOLS) -#define CJSON_PUBLIC(type) type __stdcall -#elif defined(CJSON_EXPORT_SYMBOLS) -#define CJSON_PUBLIC(type) __declspec(dllexport) type __stdcall -#elif defined(CJSON_IMPORT_SYMBOLS) -#define CJSON_PUBLIC(type) __declspec(dllimport) type __stdcall -#endif -#else /* !WIN32 */ -#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY) -#define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type -#else -#define CJSON_PUBLIC(type) type -#endif -#endif - -/* Limits how deeply nested arrays/objects can be before cJSON rejects to parse them. - * This is to prevent stack overflows. */ -#ifndef CJSON_NESTING_LIMIT -#define CJSON_NESTING_LIMIT 1000 -#endif - -/* returns the version of cJSON as a string */ -CJSON_PUBLIC(const char*) cJSON_Version(void); - -/* Supply malloc, realloc and free functions to cJSON */ -CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks); - -/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */ -/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */ -CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value); -/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */ -/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error so will match cJSON_GetErrorPtr(). */ -CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated); - -/* Render a cJSON entity to text for transfer/storage. */ -CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item); -/* Render a cJSON entity to text for transfer/storage without any formatting. */ -CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item); -/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */ -CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt); -/* Render a cJSON entity to text using a buffer already allocated in memory with given length. Returns 1 on success and 0 on failure. */ -/* NOTE: cJSON is not always 100% accurate in estimating how much memory it will use, so to be safe allocate 5 bytes more than you actually need */ -CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format); -/* Delete a cJSON entity and all subentities. */ -CJSON_PUBLIC(void) cJSON_Delete(cJSON *c); - -/* Returns the number of items in an array (or object). */ -CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array); -/* Retrieve item number "index" from array "array". Returns NULL if unsuccessful. */ -CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index); -/* Get item "string" from object. Case insensitive. */ -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string); -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string); -CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string); -/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */ -CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void); - -/* Check if the item is a string and return its valuestring */ -CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item); - -/* These functions check the type of an item */ -CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsFalse(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsBool(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsString(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsObject(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item); - -/* These calls create a cJSON item of the appropriate type. */ -CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool boolean); -CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num); -CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string); -/* raw json */ -CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw); -CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); - -/* Create a string where valuestring references a string so - * it will not be freed by cJSON_Delete */ -CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -/* Create an object/array that only references it's elements so - * they will not be freed by cJSON_Delete */ -CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); -CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); - -/* These utilities create an Array of count items. */ -CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count); -CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count); -CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count); -CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char **strings, int count); - -/* Append item to the specified array/object. */ -CJSON_PUBLIC(void) cJSON_AddItemToArray(cJSON *array, cJSON *item); -CJSON_PUBLIC(void) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item); -/* Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object. - * WARNING: When this function was used, make sure to always check that (item->type & cJSON_StringIsConst) is zero before - * writing to `item->string` */ -CJSON_PUBLIC(void) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item); -/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */ -CJSON_PUBLIC(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item); -CJSON_PUBLIC(void) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item); - -/* Remove/Detach items from Arrays/Objects. */ -CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item); -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which); -CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which); -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string); -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string); -CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string); -CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string); - -/* Update array items. */ -CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */ -CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement); -CJSON_PUBLIC(void) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem); -CJSON_PUBLIC(void) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem); -CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const char *string,cJSON *newitem); - -/* Duplicate a cJSON item */ -CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse); -/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will -need to be released. With recurse!=0, it will duplicate any children connected to the item. -The item->next and ->prev pointers are always zero on return from Duplicate. */ -/* Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, they will be considered unequal. - * case_sensitive determines if object keys are treated case sensitive (1) or case insensitive (0) */ -CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive); - - -CJSON_PUBLIC(void) cJSON_Minify(char *json); - -/* Helper functions for creating and adding items to an object at the same time. - * They return the added item or NULL on failure. */ -CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean); -CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number); -CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string); -CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw); -CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name); - -/* When assigning an integer value, it needs to be propagated to valuedouble too. */ -#define cJSON_SetIntValue(object, number) ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number)) -/* helper for the cJSON_SetNumberValue macro */ -CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number); -#define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number)) - -/* Macro for iterating over an array or object */ -#define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next) - -/* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */ -CJSON_PUBLIC(void *) cJSON_malloc(size_t size); -CJSON_PUBLIC(void) cJSON_free(void *object); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/include/apiClient.h b/c/include/apiClient.h deleted file mode 100644 index 0ec759e..0000000 --- a/c/include/apiClient.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef INCLUDE_API_CLIENT_H -#define INCLUDE_API_CLIENT_H - -#include -#include -#include -#include -#include -#include -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct sslConfig_t { - char *clientCertFile; /* client certificate */ - char *clientKeyFile; /* client private key */ - char *CACertFile; /* CA certificate */ - int insecureSkipTlsVerify ; /* 0 -- verify server certificate */ - /* 1 -- skip ssl verify for server certificate */ -} sslConfig_t; - -typedef struct apiClient_t { - char *basePath; - sslConfig_t *sslConfig; - void *dataReceived; - long dataReceivedLen; - void (*data_callback_func)(void **, long *); - int (*progress_func)(void *, curl_off_t, curl_off_t, curl_off_t, curl_off_t); - void *progress_data; - long response_code; - list_t *apiKeys_token; -} apiClient_t; - -apiClient_t* apiClient_create(); - -apiClient_t* apiClient_create_with_base_path(const char *basePath -, sslConfig_t *sslConfig -, list_t *apiKeys_token -); - -void apiClient_free(apiClient_t *apiClient); - -void apiClient_invoke(apiClient_t *apiClient,const char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, const char *bodyParameters, const char *requestType); - -sslConfig_t *sslConfig_create(const char *clientCertFile, const char *clientKeyFile, const char *CACertFile, int insecureSkipTlsVerify); - -void sslConfig_free(sslConfig_t *sslConfig); - -char *strReplace(char *orig, char *rep, char *with); - -/* - * In single thread program, the function apiClient_setupGlobalEnv is not needed. - * But in multi-thread program, apiClient_setupGlobalEnv must be called before any worker thread is created - */ -void apiClient_setupGlobalEnv(); - -/* - * This function apiClient_unsetupGlobalEnv must be called whether single or multiple program. - * In multi-thread program, it is must be called after all worker threads end. - */ -void apiClient_unsetupGlobalEnv(); - -#endif // INCLUDE_API_CLIENT_H diff --git a/c/include/binary.h b/c/include/binary.h deleted file mode 100644 index 571df5b..0000000 --- a/c/include/binary.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef INCLUDE_BINARY_H -#define INCLUDE_BINARY_H - -#include - -typedef struct binary_t -{ - uint8_t* data; - unsigned int len; -} binary_t; - -binary_t* instantiate_binary_t(char* data, int len); - -char *base64encode(const void *b64_encode_this, int encode_this_many_bytes); - -char *base64decode(const void *b64_decode_this, int decode_this_many_bytes, int *decoded_bytes); - -#endif // INCLUDE_BINARY_H diff --git a/c/include/keyValuePair.h b/c/include/keyValuePair.h deleted file mode 100644 index cb839f2..0000000 --- a/c/include/keyValuePair.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _keyValuePair_H_ -#define _keyValuePair_H_ - -#include - -typedef struct keyValuePair_t { - char* key; - void* value; -} keyValuePair_t; - -keyValuePair_t *keyValuePair_create(char *key, void *value); - -keyValuePair_t* keyValuePair_create_allocate(char* key, double value); - -void keyValuePair_free(keyValuePair_t *keyValuePair); - -#endif /* _keyValuePair_H_ */ \ No newline at end of file diff --git a/c/include/list.h b/c/include/list.h deleted file mode 100644 index 96384d0..0000000 --- a/c/include/list.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef INCLUDE_LIST_H -#define INCLUDE_LIST_H - -#include "../external/cJSON.h" -#include "../include/list.h" - -typedef struct list_t list_t; - -typedef struct listEntry_t listEntry_t; - -struct listEntry_t { - listEntry_t* nextListEntry; - listEntry_t* prevListEntry; - void* data; -}; - -typedef struct list_t { - listEntry_t *firstEntry; - listEntry_t *lastEntry; - - long count; -} list_t; - -#define list_ForEach(element, list) for(element = (list != NULL) ? (list)->firstEntry : NULL; element != NULL; element = element->nextListEntry) - -list_t* list_createList(); -void list_freeList(list_t* listToFree); - -void list_addElement(list_t* list, void* dataToAddInList); -listEntry_t* list_getElementAt(list_t *list, long indexOfElement); -listEntry_t* list_getWithIndex(list_t* list, int index); -void list_removeElement(list_t* list, listEntry_t* elementToRemove); - -void list_iterateThroughListForward(list_t* list, void (*operationToPerform)(listEntry_t*, void*), void *additionalDataNeededForCallbackFunction); -void list_iterateThroughListBackward(list_t* list, void (*operationToPerform)(listEntry_t*, void*), void *additionalDataNeededForCallbackFunction); - -void listEntry_printAsInt(listEntry_t* listEntry, void *additionalData); -void listEntry_free(listEntry_t *listEntry, void *additionalData); - -char* findStrInStrList(list_t* strList, const char* str); -void clear_and_free_string_list(list_t * list); -#endif // INCLUDE_LIST_H diff --git a/c/libcurl.licence b/c/libcurl.licence deleted file mode 100644 index b5f47ac..0000000 --- a/c/libcurl.licence +++ /dev/null @@ -1,11 +0,0 @@ -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1996 - 2018, Daniel Stenberg, daniel@haxx.se, and many contributors, see the THANKS file. - -All rights reserved. - -Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. diff --git a/c/model/ack.c b/c/model/ack.c deleted file mode 100644 index 78db950..0000000 --- a/c/model/ack.c +++ /dev/null @@ -1,137 +0,0 @@ -#include -#include -#include -#include "ack.h" - - -char* statusack_ToString(one_msg_waba_sdk_ack_STATUS_e status) { - char* statusArray[] = { "NULL", "delivered", "viewed", "sent" }; - return statusArray[status]; -} - -one_msg_waba_sdk_ack_STATUS_e statusack_FromString(char* status){ - int stringToReturn = 0; - char *statusArray[] = { "NULL", "delivered", "viewed", "sent" }; - size_t sizeofArray = sizeof(statusArray) / sizeof(statusArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(status, statusArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -ack_t *ack_create( - char *id, - char *chat_id, - one_msg_waba_sdk_ack_STATUS_e status - ) { - ack_t *ack_local_var = malloc(sizeof(ack_t)); - if (!ack_local_var) { - return NULL; - } - ack_local_var->id = id; - ack_local_var->chat_id = chat_id; - ack_local_var->status = status; - - return ack_local_var; -} - - -void ack_free(ack_t *ack) { - if(NULL == ack){ - return ; - } - listEntry_t *listEntry; - if (ack->id) { - free(ack->id); - ack->id = NULL; - } - if (ack->chat_id) { - free(ack->chat_id); - ack->chat_id = NULL; - } - free(ack); -} - -cJSON *ack_convertToJSON(ack_t *ack) { - cJSON *item = cJSON_CreateObject(); - - // ack->id - if(ack->id) { - if(cJSON_AddStringToObject(item, "id", ack->id) == NULL) { - goto fail; //String - } - } - - - // ack->chat_id - if(ack->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", ack->chat_id) == NULL) { - goto fail; //String - } - } - - - // ack->status - if(ack->status != one_msg_waba_sdk_ack_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", statusack_ToString(ack->status)) == NULL) - { - goto fail; //Enum - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -ack_t *ack_parseFromJSON(cJSON *ackJSON){ - - ack_t *ack_local_var = NULL; - - // ack->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(ackJSON, "id"); - if (id) { - if(!cJSON_IsString(id) && !cJSON_IsNull(id)) - { - goto end; //String - } - } - - // ack->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(ackJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // ack->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(ackJSON, "status"); - one_msg_waba_sdk_ack_STATUS_e statusVariable; - if (status) { - if(!cJSON_IsString(status)) - { - goto end; //Enum - } - statusVariable = statusack_FromString(status->valuestring); - } - - - ack_local_var = ack_create ( - id && !cJSON_IsNull(id) ? strdup(id->valuestring) : NULL, - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - status ? statusVariable : -1 - ); - - return ack_local_var; -end: - return NULL; - -} diff --git a/c/model/ack.h b/c/model/ack.h deleted file mode 100644 index a7d65e5..0000000 --- a/c/model/ack.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * ack.h - * - * - */ - -#ifndef _ack_H_ -#define _ack_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct ack_t ack_t; - - -// Enum STATUS for ack - -typedef enum { one_msg_waba_sdk_ack_STATUS_NULL = 0, one_msg_waba_sdk_ack_STATUS_delivered, one_msg_waba_sdk_ack_STATUS_viewed, one_msg_waba_sdk_ack_STATUS_sent } one_msg_waba_sdk_ack_STATUS_e; - -char* ack_status_ToString(one_msg_waba_sdk_ack_STATUS_e status); - -one_msg_waba_sdk_ack_STATUS_e ack_status_FromString(char* status); - - - -typedef struct ack_t { - char *id; // string - char *chat_id; // string - one_msg_waba_sdk_ack_STATUS_e status; //enum - -} ack_t; - -ack_t *ack_create( - char *id, - char *chat_id, - one_msg_waba_sdk_ack_STATUS_e status -); - -void ack_free(ack_t *ack); - -ack_t *ack_parseFromJSON(cJSON *ackJSON); - -cJSON *ack_convertToJSON(ack_t *ack); - -#endif /* _ack_H_ */ - diff --git a/c/model/add_template_request.c b/c/model/add_template_request.c deleted file mode 100644 index d2593ce..0000000 --- a/c/model/add_template_request.c +++ /dev/null @@ -1,206 +0,0 @@ -#include -#include -#include -#include "add_template_request.h" - - -char* categoryadd_template_request_ToString(one_msg_waba_sdk_add_template_request__e category) { - char* categoryArray[] = { "NULL", "MARKETING", "TRANSACTIONAL", "OTP" }; - return categoryArray[category]; -} - -one_msg_waba_sdk_add_template_request__e categoryadd_template_request_FromString(char* category){ - int stringToReturn = 0; - char *categoryArray[] = { "NULL", "MARKETING", "TRANSACTIONAL", "OTP" }; - size_t sizeofArray = sizeof(categoryArray) / sizeof(categoryArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(category, categoryArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} -char* languageadd_template_request_ToString(one_msg_waba_sdk_add_template_request__e language) { - char* languageArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - return languageArray[language]; -} - -one_msg_waba_sdk_add_template_request__e languageadd_template_request_FromString(char* language){ - int stringToReturn = 0; - char *languageArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - size_t sizeofArray = sizeof(languageArray) / sizeof(languageArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(language, languageArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -add_template_request_t *add_template_request_create( - char *name, - template_category_prop_t *category, - template_components_prop_t *components, - template_language_prop_t *language - ) { - add_template_request_t *add_template_request_local_var = malloc(sizeof(add_template_request_t)); - if (!add_template_request_local_var) { - return NULL; - } - add_template_request_local_var->name = name; - add_template_request_local_var->category = category; - add_template_request_local_var->components = components; - add_template_request_local_var->language = language; - - return add_template_request_local_var; -} - - -void add_template_request_free(add_template_request_t *add_template_request) { - if(NULL == add_template_request){ - return ; - } - listEntry_t *listEntry; - if (add_template_request->name) { - free(add_template_request->name); - add_template_request->name = NULL; - } - if (add_template_request->category) { - template_category_prop_free(add_template_request->category); - add_template_request->category = NULL; - } - if (add_template_request->components) { - template_components_prop_free(add_template_request->components); - add_template_request->components = NULL; - } - if (add_template_request->language) { - template_language_prop_free(add_template_request->language); - add_template_request->language = NULL; - } - free(add_template_request); -} - -cJSON *add_template_request_convertToJSON(add_template_request_t *add_template_request) { - cJSON *item = cJSON_CreateObject(); - - // add_template_request->name - if(add_template_request->name) { - if(cJSON_AddStringToObject(item, "name", add_template_request->name) == NULL) { - goto fail; //String - } - } - - - // add_template_request->category - if(add_template_request->category != one_msg_waba_sdk_add_template_request__NULL) { - cJSON *category_local_JSON = template_category_prop_convertToJSON(add_template_request->category); - if(category_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "category", category_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // add_template_request->components - if(add_template_request->components) { - cJSON *components_local_JSON = template_components_prop_convertToJSON(add_template_request->components); - if(components_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "components", components_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // add_template_request->language - if(add_template_request->language != one_msg_waba_sdk_add_template_request__NULL) { - cJSON *language_local_JSON = template_language_prop_convertToJSON(add_template_request->language); - if(language_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "language", language_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -add_template_request_t *add_template_request_parseFromJSON(cJSON *add_template_requestJSON){ - - add_template_request_t *add_template_request_local_var = NULL; - - // define the local variable for add_template_request->category - template_category_prop_t *category_local_nonprim = NULL; - - // define the local variable for add_template_request->components - template_components_prop_t *components_local_nonprim = NULL; - - // define the local variable for add_template_request->language - template_language_prop_t *language_local_nonprim = NULL; - - // add_template_request->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(add_template_requestJSON, "name"); - if (name) { - if(!cJSON_IsString(name) && !cJSON_IsNull(name)) - { - goto end; //String - } - } - - // add_template_request->category - cJSON *category = cJSON_GetObjectItemCaseSensitive(add_template_requestJSON, "category"); - if (category) { - category_local_nonprim = template_category_prop_parseFromJSON(category); //custom - } - - // add_template_request->components - cJSON *components = cJSON_GetObjectItemCaseSensitive(add_template_requestJSON, "components"); - if (components) { - components_local_nonprim = template_components_prop_parseFromJSON(components); //custom - } - - // add_template_request->language - cJSON *language = cJSON_GetObjectItemCaseSensitive(add_template_requestJSON, "language"); - if (language) { - language_local_nonprim = template_language_prop_parseFromJSON(language); //custom - } - - - add_template_request_local_var = add_template_request_create ( - name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, - category ? category_local_nonprim : NULL, - components ? components_local_nonprim : NULL, - language ? language_local_nonprim : NULL - ); - - return add_template_request_local_var; -end: - if (category_local_nonprim) { - template_category_prop_free(category_local_nonprim); - category_local_nonprim = NULL; - } - if (components_local_nonprim) { - template_components_prop_free(components_local_nonprim); - components_local_nonprim = NULL; - } - if (language_local_nonprim) { - template_language_prop_free(language_local_nonprim); - language_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/add_template_request.h b/c/model/add_template_request.h deleted file mode 100644 index b4e758c..0000000 --- a/c/model/add_template_request.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * add_template_request.h - * - * - */ - -#ifndef _add_template_request_H_ -#define _add_template_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct add_template_request_t add_template_request_t; - -#include "template_category_prop.h" -#include "template_components_prop.h" -#include "template_language_prop.h" - -// Enum for add_template_request - -typedef enum { one_msg_waba_sdk_add_template_request__NULL = 0, one_msg_waba_sdk_add_template_request__MARKETING, one_msg_waba_sdk_add_template_request__TRANSACTIONAL, one_msg_waba_sdk_add_template_request__OTP } one_msg_waba_sdk_add_template_request__e; - -char* add_template_request_category_ToString(one_msg_waba_sdk_add_template_request__e category); - -one_msg_waba_sdk_add_template_request__e add_template_request_category_FromString(char* category); - -// Enum for add_template_request - -typedef enum { one_msg_waba_sdk_add_template_request__NULL = 0, one_msg_waba_sdk_add_template_request__af, one_msg_waba_sdk_add_template_request__sq, one_msg_waba_sdk_add_template_request__ar, one_msg_waba_sdk_add_template_request__az, one_msg_waba_sdk_add_template_request__bn, one_msg_waba_sdk_add_template_request__bg, one_msg_waba_sdk_add_template_request__ca, one_msg_waba_sdk_add_template_request__zh_CN, one_msg_waba_sdk_add_template_request__zh_HK, one_msg_waba_sdk_add_template_request__zh_TW, one_msg_waba_sdk_add_template_request__hr, one_msg_waba_sdk_add_template_request__cs, one_msg_waba_sdk_add_template_request__da, one_msg_waba_sdk_add_template_request__nl, one_msg_waba_sdk_add_template_request__en, one_msg_waba_sdk_add_template_request__en_GB, one_msg_waba_sdk_add_template_request__en_US, one_msg_waba_sdk_add_template_request__et, one_msg_waba_sdk_add_template_request__fil, one_msg_waba_sdk_add_template_request__fi, one_msg_waba_sdk_add_template_request__fr, one_msg_waba_sdk_add_template_request__de, one_msg_waba_sdk_add_template_request__el, one_msg_waba_sdk_add_template_request__gu, one_msg_waba_sdk_add_template_request__he, one_msg_waba_sdk_add_template_request__hi, one_msg_waba_sdk_add_template_request__hu, one_msg_waba_sdk_add_template_request__id, one_msg_waba_sdk_add_template_request__ga, one_msg_waba_sdk_add_template_request__it, one_msg_waba_sdk_add_template_request__ja, one_msg_waba_sdk_add_template_request__kn, one_msg_waba_sdk_add_template_request__kk, one_msg_waba_sdk_add_template_request__ko, one_msg_waba_sdk_add_template_request__lo, one_msg_waba_sdk_add_template_request__lv, one_msg_waba_sdk_add_template_request__lt, one_msg_waba_sdk_add_template_request__mk, one_msg_waba_sdk_add_template_request__ms, one_msg_waba_sdk_add_template_request__mr, one_msg_waba_sdk_add_template_request__nb, one_msg_waba_sdk_add_template_request__fa, one_msg_waba_sdk_add_template_request__pl, one_msg_waba_sdk_add_template_request__pt_BR, one_msg_waba_sdk_add_template_request__pt_PT, one_msg_waba_sdk_add_template_request__pa, one_msg_waba_sdk_add_template_request__ro, one_msg_waba_sdk_add_template_request__ru, one_msg_waba_sdk_add_template_request__sr, one_msg_waba_sdk_add_template_request__sk, one_msg_waba_sdk_add_template_request__sl, one_msg_waba_sdk_add_template_request__es, one_msg_waba_sdk_add_template_request__es_AR, one_msg_waba_sdk_add_template_request__es_ES, one_msg_waba_sdk_add_template_request__es_MX, one_msg_waba_sdk_add_template_request__sw, one_msg_waba_sdk_add_template_request__sv, one_msg_waba_sdk_add_template_request__ta, one_msg_waba_sdk_add_template_request__te, one_msg_waba_sdk_add_template_request__th, one_msg_waba_sdk_add_template_request__tr, one_msg_waba_sdk_add_template_request__uk, one_msg_waba_sdk_add_template_request__ur, one_msg_waba_sdk_add_template_request__uz, one_msg_waba_sdk_add_template_request__vi } one_msg_waba_sdk_add_template_request__e; - -char* add_template_request_language_ToString(one_msg_waba_sdk_add_template_request__e language); - -one_msg_waba_sdk_add_template_request__e add_template_request_language_FromString(char* language); - - - -typedef struct add_template_request_t { - char *name; // string - template_category_prop_t *category; // custom - template_components_prop_t *components; // custom - template_language_prop_t *language; // custom - -} add_template_request_t; - -add_template_request_t *add_template_request_create( - char *name, - template_category_prop_t *category, - template_components_prop_t *components, - template_language_prop_t *language -); - -void add_template_request_free(add_template_request_t *add_template_request); - -add_template_request_t *add_template_request_parseFromJSON(cJSON *add_template_requestJSON); - -cJSON *add_template_request_convertToJSON(add_template_request_t *add_template_request); - -#endif /* _add_template_request_H_ */ - diff --git a/c/model/channel_extended_statistics.c b/c/model/channel_extended_statistics.c deleted file mode 100644 index 5fe75c4..0000000 --- a/c/model/channel_extended_statistics.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include -#include "channel_extended_statistics.h" - - - -channel_extended_statistics_t *channel_extended_statistics_create( - ) { - channel_extended_statistics_t *channel_extended_statistics_local_var = malloc(sizeof(channel_extended_statistics_t)); - if (!channel_extended_statistics_local_var) { - return NULL; - } - - return channel_extended_statistics_local_var; -} - - -void channel_extended_statistics_free(channel_extended_statistics_t *channel_extended_statistics) { - if(NULL == channel_extended_statistics){ - return ; - } - listEntry_t *listEntry; - free(channel_extended_statistics); -} - -cJSON *channel_extended_statistics_convertToJSON(channel_extended_statistics_t *channel_extended_statistics) { - cJSON *item = cJSON_CreateObject(); - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -channel_extended_statistics_t *channel_extended_statistics_parseFromJSON(cJSON *channel_extended_statisticsJSON){ - - channel_extended_statistics_t *channel_extended_statistics_local_var = NULL; - - - channel_extended_statistics_local_var = channel_extended_statistics_create ( - ); - - return channel_extended_statistics_local_var; -end: - return NULL; - -} diff --git a/c/model/channel_extended_statistics.h b/c/model/channel_extended_statistics.h deleted file mode 100644 index 1892a65..0000000 --- a/c/model/channel_extended_statistics.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * channel_extended_statistics.h - * - * - */ - -#ifndef _channel_extended_statistics_H_ -#define _channel_extended_statistics_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct channel_extended_statistics_t channel_extended_statistics_t; - -#include "channel_extended_statistics_inner.h" - - - -typedef struct channel_extended_statistics_t { - -} channel_extended_statistics_t; - -channel_extended_statistics_t *channel_extended_statistics_create( -); - -void channel_extended_statistics_free(channel_extended_statistics_t *channel_extended_statistics); - -channel_extended_statistics_t *channel_extended_statistics_parseFromJSON(cJSON *channel_extended_statisticsJSON); - -cJSON *channel_extended_statistics_convertToJSON(channel_extended_statistics_t *channel_extended_statistics); - -#endif /* _channel_extended_statistics_H_ */ - diff --git a/c/model/channel_extended_statistics_inner.c b/c/model/channel_extended_statistics_inner.c deleted file mode 100644 index 0fcbb50..0000000 --- a/c/model/channel_extended_statistics_inner.c +++ /dev/null @@ -1,313 +0,0 @@ -#include -#include -#include -#include "channel_extended_statistics_inner.h" - - - -channel_extended_statistics_inner_t *channel_extended_statistics_inner_create( - int business_initiated_paid_quantity, - double business_initiated_price, - int business_initiated_quantity, - int free_entry_point, - int free_quantity, - int free_tier, - int paid_quantity, - char *period_date, - double quantity, - double total_price, - int user_initiated_paid_quantity, - double user_initiated_price, - int user_initiated_quantity - ) { - channel_extended_statistics_inner_t *channel_extended_statistics_inner_local_var = malloc(sizeof(channel_extended_statistics_inner_t)); - if (!channel_extended_statistics_inner_local_var) { - return NULL; - } - channel_extended_statistics_inner_local_var->business_initiated_paid_quantity = business_initiated_paid_quantity; - channel_extended_statistics_inner_local_var->business_initiated_price = business_initiated_price; - channel_extended_statistics_inner_local_var->business_initiated_quantity = business_initiated_quantity; - channel_extended_statistics_inner_local_var->free_entry_point = free_entry_point; - channel_extended_statistics_inner_local_var->free_quantity = free_quantity; - channel_extended_statistics_inner_local_var->free_tier = free_tier; - channel_extended_statistics_inner_local_var->paid_quantity = paid_quantity; - channel_extended_statistics_inner_local_var->period_date = period_date; - channel_extended_statistics_inner_local_var->quantity = quantity; - channel_extended_statistics_inner_local_var->total_price = total_price; - channel_extended_statistics_inner_local_var->user_initiated_paid_quantity = user_initiated_paid_quantity; - channel_extended_statistics_inner_local_var->user_initiated_price = user_initiated_price; - channel_extended_statistics_inner_local_var->user_initiated_quantity = user_initiated_quantity; - - return channel_extended_statistics_inner_local_var; -} - - -void channel_extended_statistics_inner_free(channel_extended_statistics_inner_t *channel_extended_statistics_inner) { - if(NULL == channel_extended_statistics_inner){ - return ; - } - listEntry_t *listEntry; - if (channel_extended_statistics_inner->period_date) { - free(channel_extended_statistics_inner->period_date); - channel_extended_statistics_inner->period_date = NULL; - } - free(channel_extended_statistics_inner); -} - -cJSON *channel_extended_statistics_inner_convertToJSON(channel_extended_statistics_inner_t *channel_extended_statistics_inner) { - cJSON *item = cJSON_CreateObject(); - - // channel_extended_statistics_inner->business_initiated_paid_quantity - if(channel_extended_statistics_inner->business_initiated_paid_quantity) { - if(cJSON_AddNumberToObject(item, "business_initiated_paid_quantity", channel_extended_statistics_inner->business_initiated_paid_quantity) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->business_initiated_price - if(channel_extended_statistics_inner->business_initiated_price) { - if(cJSON_AddNumberToObject(item, "business_initiated_price", channel_extended_statistics_inner->business_initiated_price) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->business_initiated_quantity - if(channel_extended_statistics_inner->business_initiated_quantity) { - if(cJSON_AddNumberToObject(item, "business_initiated_quantity", channel_extended_statistics_inner->business_initiated_quantity) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->free_entry_point - if(channel_extended_statistics_inner->free_entry_point) { - if(cJSON_AddNumberToObject(item, "free_entry_point", channel_extended_statistics_inner->free_entry_point) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->free_quantity - if(channel_extended_statistics_inner->free_quantity) { - if(cJSON_AddNumberToObject(item, "free_quantity", channel_extended_statistics_inner->free_quantity) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->free_tier - if(channel_extended_statistics_inner->free_tier) { - if(cJSON_AddNumberToObject(item, "free_tier", channel_extended_statistics_inner->free_tier) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->paid_quantity - if(channel_extended_statistics_inner->paid_quantity) { - if(cJSON_AddNumberToObject(item, "paid_quantity", channel_extended_statistics_inner->paid_quantity) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->period_date - if(channel_extended_statistics_inner->period_date) { - if(cJSON_AddStringToObject(item, "period_date", channel_extended_statistics_inner->period_date) == NULL) { - goto fail; //String - } - } - - - // channel_extended_statistics_inner->quantity - if(channel_extended_statistics_inner->quantity) { - if(cJSON_AddNumberToObject(item, "quantity", channel_extended_statistics_inner->quantity) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->total_price - if(channel_extended_statistics_inner->total_price) { - if(cJSON_AddNumberToObject(item, "total_price", channel_extended_statistics_inner->total_price) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->user_initiated_paid_quantity - if(channel_extended_statistics_inner->user_initiated_paid_quantity) { - if(cJSON_AddNumberToObject(item, "user_initiated_paid_quantity", channel_extended_statistics_inner->user_initiated_paid_quantity) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->user_initiated_price - if(channel_extended_statistics_inner->user_initiated_price) { - if(cJSON_AddNumberToObject(item, "user_initiated_price", channel_extended_statistics_inner->user_initiated_price) == NULL) { - goto fail; //Numeric - } - } - - - // channel_extended_statistics_inner->user_initiated_quantity - if(channel_extended_statistics_inner->user_initiated_quantity) { - if(cJSON_AddNumberToObject(item, "user_initiated_quantity", channel_extended_statistics_inner->user_initiated_quantity) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -channel_extended_statistics_inner_t *channel_extended_statistics_inner_parseFromJSON(cJSON *channel_extended_statistics_innerJSON){ - - channel_extended_statistics_inner_t *channel_extended_statistics_inner_local_var = NULL; - - // channel_extended_statistics_inner->business_initiated_paid_quantity - cJSON *business_initiated_paid_quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "business_initiated_paid_quantity"); - if (business_initiated_paid_quantity) { - if(!cJSON_IsNumber(business_initiated_paid_quantity)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->business_initiated_price - cJSON *business_initiated_price = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "business_initiated_price"); - if (business_initiated_price) { - if(!cJSON_IsNumber(business_initiated_price)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->business_initiated_quantity - cJSON *business_initiated_quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "business_initiated_quantity"); - if (business_initiated_quantity) { - if(!cJSON_IsNumber(business_initiated_quantity)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->free_entry_point - cJSON *free_entry_point = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "free_entry_point"); - if (free_entry_point) { - if(!cJSON_IsNumber(free_entry_point)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->free_quantity - cJSON *free_quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "free_quantity"); - if (free_quantity) { - if(!cJSON_IsNumber(free_quantity)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->free_tier - cJSON *free_tier = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "free_tier"); - if (free_tier) { - if(!cJSON_IsNumber(free_tier)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->paid_quantity - cJSON *paid_quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "paid_quantity"); - if (paid_quantity) { - if(!cJSON_IsNumber(paid_quantity)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->period_date - cJSON *period_date = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "period_date"); - if (period_date) { - if(!cJSON_IsString(period_date) && !cJSON_IsNull(period_date)) - { - goto end; //String - } - } - - // channel_extended_statistics_inner->quantity - cJSON *quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "quantity"); - if (quantity) { - if(!cJSON_IsNumber(quantity)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->total_price - cJSON *total_price = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "total_price"); - if (total_price) { - if(!cJSON_IsNumber(total_price)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->user_initiated_paid_quantity - cJSON *user_initiated_paid_quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "user_initiated_paid_quantity"); - if (user_initiated_paid_quantity) { - if(!cJSON_IsNumber(user_initiated_paid_quantity)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->user_initiated_price - cJSON *user_initiated_price = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "user_initiated_price"); - if (user_initiated_price) { - if(!cJSON_IsNumber(user_initiated_price)) - { - goto end; //Numeric - } - } - - // channel_extended_statistics_inner->user_initiated_quantity - cJSON *user_initiated_quantity = cJSON_GetObjectItemCaseSensitive(channel_extended_statistics_innerJSON, "user_initiated_quantity"); - if (user_initiated_quantity) { - if(!cJSON_IsNumber(user_initiated_quantity)) - { - goto end; //Numeric - } - } - - - channel_extended_statistics_inner_local_var = channel_extended_statistics_inner_create ( - business_initiated_paid_quantity ? business_initiated_paid_quantity->valuedouble : 0, - business_initiated_price ? business_initiated_price->valuedouble : 0, - business_initiated_quantity ? business_initiated_quantity->valuedouble : 0, - free_entry_point ? free_entry_point->valuedouble : 0, - free_quantity ? free_quantity->valuedouble : 0, - free_tier ? free_tier->valuedouble : 0, - paid_quantity ? paid_quantity->valuedouble : 0, - period_date && !cJSON_IsNull(period_date) ? strdup(period_date->valuestring) : NULL, - quantity ? quantity->valuedouble : 0, - total_price ? total_price->valuedouble : 0, - user_initiated_paid_quantity ? user_initiated_paid_quantity->valuedouble : 0, - user_initiated_price ? user_initiated_price->valuedouble : 0, - user_initiated_quantity ? user_initiated_quantity->valuedouble : 0 - ); - - return channel_extended_statistics_inner_local_var; -end: - return NULL; - -} diff --git a/c/model/channel_extended_statistics_inner.h b/c/model/channel_extended_statistics_inner.h deleted file mode 100644 index 0303b54..0000000 --- a/c/model/channel_extended_statistics_inner.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * channel_extended_statistics_inner.h - * - * - */ - -#ifndef _channel_extended_statistics_inner_H_ -#define _channel_extended_statistics_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct channel_extended_statistics_inner_t channel_extended_statistics_inner_t; - - - - -typedef struct channel_extended_statistics_inner_t { - int business_initiated_paid_quantity; //numeric - double business_initiated_price; //numeric - int business_initiated_quantity; //numeric - int free_entry_point; //numeric - int free_quantity; //numeric - int free_tier; //numeric - int paid_quantity; //numeric - char *period_date; // string - double quantity; //numeric - double total_price; //numeric - int user_initiated_paid_quantity; //numeric - double user_initiated_price; //numeric - int user_initiated_quantity; //numeric - -} channel_extended_statistics_inner_t; - -channel_extended_statistics_inner_t *channel_extended_statistics_inner_create( - int business_initiated_paid_quantity, - double business_initiated_price, - int business_initiated_quantity, - int free_entry_point, - int free_quantity, - int free_tier, - int paid_quantity, - char *period_date, - double quantity, - double total_price, - int user_initiated_paid_quantity, - double user_initiated_price, - int user_initiated_quantity -); - -void channel_extended_statistics_inner_free(channel_extended_statistics_inner_t *channel_extended_statistics_inner); - -channel_extended_statistics_inner_t *channel_extended_statistics_inner_parseFromJSON(cJSON *channel_extended_statistics_innerJSON); - -cJSON *channel_extended_statistics_inner_convertToJSON(channel_extended_statistics_inner_t *channel_extended_statistics_inner); - -#endif /* _channel_extended_statistics_inner_H_ */ - diff --git a/c/model/channel_statistics.c b/c/model/channel_statistics.c deleted file mode 100644 index 41e2c45..0000000 --- a/c/model/channel_statistics.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include -#include "channel_statistics.h" - - - -channel_statistics_t *channel_statistics_create( - char *date, - double templates_cost - ) { - channel_statistics_t *channel_statistics_local_var = malloc(sizeof(channel_statistics_t)); - if (!channel_statistics_local_var) { - return NULL; - } - channel_statistics_local_var->date = date; - channel_statistics_local_var->templates_cost = templates_cost; - - return channel_statistics_local_var; -} - - -void channel_statistics_free(channel_statistics_t *channel_statistics) { - if(NULL == channel_statistics){ - return ; - } - listEntry_t *listEntry; - if (channel_statistics->date) { - free(channel_statistics->date); - channel_statistics->date = NULL; - } - free(channel_statistics); -} - -cJSON *channel_statistics_convertToJSON(channel_statistics_t *channel_statistics) { - cJSON *item = cJSON_CreateObject(); - - // channel_statistics->date - if(channel_statistics->date) { - if(cJSON_AddStringToObject(item, "date", channel_statistics->date) == NULL) { - goto fail; //String - } - } - - - // channel_statistics->templates_cost - if(channel_statistics->templates_cost) { - if(cJSON_AddNumberToObject(item, "templates_cost", channel_statistics->templates_cost) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -channel_statistics_t *channel_statistics_parseFromJSON(cJSON *channel_statisticsJSON){ - - channel_statistics_t *channel_statistics_local_var = NULL; - - // channel_statistics->date - cJSON *date = cJSON_GetObjectItemCaseSensitive(channel_statisticsJSON, "date"); - if (date) { - if(!cJSON_IsString(date) && !cJSON_IsNull(date)) - { - goto end; //String - } - } - - // channel_statistics->templates_cost - cJSON *templates_cost = cJSON_GetObjectItemCaseSensitive(channel_statisticsJSON, "templates_cost"); - if (templates_cost) { - if(!cJSON_IsNumber(templates_cost)) - { - goto end; //Numeric - } - } - - - channel_statistics_local_var = channel_statistics_create ( - date && !cJSON_IsNull(date) ? strdup(date->valuestring) : NULL, - templates_cost ? templates_cost->valuedouble : 0 - ); - - return channel_statistics_local_var; -end: - return NULL; - -} diff --git a/c/model/channel_statistics.h b/c/model/channel_statistics.h deleted file mode 100644 index 68ee653..0000000 --- a/c/model/channel_statistics.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * channel_statistics.h - * - * - */ - -#ifndef _channel_statistics_H_ -#define _channel_statistics_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct channel_statistics_t channel_statistics_t; - - - - -typedef struct channel_statistics_t { - char *date; // string - double templates_cost; //numeric - -} channel_statistics_t; - -channel_statistics_t *channel_statistics_create( - char *date, - double templates_cost -); - -void channel_statistics_free(channel_statistics_t *channel_statistics); - -channel_statistics_t *channel_statistics_parseFromJSON(cJSON *channel_statisticsJSON); - -cJSON *channel_statistics_convertToJSON(channel_statistics_t *channel_statistics); - -#endif /* _channel_statistics_H_ */ - diff --git a/c/model/channel_status.c b/c/model/channel_status.c deleted file mode 100644 index f4494e9..0000000 --- a/c/model/channel_status.c +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include -#include -#include "channel_status.h" - - -char* statuschannel_status_ToString(one_msg_waba_sdk_channel_status_STATUS_e status) { - char* statusArray[] = { "NULL", "connected", "connecting", "disconnected", "uninitialized", "unregistered" }; - return statusArray[status]; -} - -one_msg_waba_sdk_channel_status_STATUS_e statuschannel_status_FromString(char* status){ - int stringToReturn = 0; - char *statusArray[] = { "NULL", "connected", "connecting", "disconnected", "uninitialized", "unregistered" }; - size_t sizeofArray = sizeof(statusArray) / sizeof(statusArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(status, statusArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -channel_status_t *channel_status_create( - one_msg_waba_sdk_channel_status_STATUS_e status - ) { - channel_status_t *channel_status_local_var = malloc(sizeof(channel_status_t)); - if (!channel_status_local_var) { - return NULL; - } - channel_status_local_var->status = status; - - return channel_status_local_var; -} - - -void channel_status_free(channel_status_t *channel_status) { - if(NULL == channel_status){ - return ; - } - listEntry_t *listEntry; - free(channel_status); -} - -cJSON *channel_status_convertToJSON(channel_status_t *channel_status) { - cJSON *item = cJSON_CreateObject(); - - // channel_status->status - if(channel_status->status != one_msg_waba_sdk_channel_status_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", statuschannel_status_ToString(channel_status->status)) == NULL) - { - goto fail; //Enum - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -channel_status_t *channel_status_parseFromJSON(cJSON *channel_statusJSON){ - - channel_status_t *channel_status_local_var = NULL; - - // channel_status->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(channel_statusJSON, "status"); - one_msg_waba_sdk_channel_status_STATUS_e statusVariable; - if (status) { - if(!cJSON_IsString(status)) - { - goto end; //Enum - } - statusVariable = statuschannel_status_FromString(status->valuestring); - } - - - channel_status_local_var = channel_status_create ( - status ? statusVariable : -1 - ); - - return channel_status_local_var; -end: - return NULL; - -} diff --git a/c/model/channel_status.h b/c/model/channel_status.h deleted file mode 100644 index ad85ca7..0000000 --- a/c/model/channel_status.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * channel_status.h - * - * - */ - -#ifndef _channel_status_H_ -#define _channel_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct channel_status_t channel_status_t; - - -// Enum STATUS for channel_status - -typedef enum { one_msg_waba_sdk_channel_status_STATUS_NULL = 0, one_msg_waba_sdk_channel_status_STATUS_connected, one_msg_waba_sdk_channel_status_STATUS_connecting, one_msg_waba_sdk_channel_status_STATUS_disconnected, one_msg_waba_sdk_channel_status_STATUS_uninitialized, one_msg_waba_sdk_channel_status_STATUS_unregistered } one_msg_waba_sdk_channel_status_STATUS_e; - -char* channel_status_status_ToString(one_msg_waba_sdk_channel_status_STATUS_e status); - -one_msg_waba_sdk_channel_status_STATUS_e channel_status_status_FromString(char* status); - - - -typedef struct channel_status_t { - one_msg_waba_sdk_channel_status_STATUS_e status; //enum - -} channel_status_t; - -channel_status_t *channel_status_create( - one_msg_waba_sdk_channel_status_STATUS_e status -); - -void channel_status_free(channel_status_t *channel_status); - -channel_status_t *channel_status_parseFromJSON(cJSON *channel_statusJSON); - -cJSON *channel_status_convertToJSON(channel_status_t *channel_status); - -#endif /* _channel_status_H_ */ - diff --git a/c/model/chat_id_prop.c b/c/model/chat_id_prop.c deleted file mode 100644 index f0b389f..0000000 --- a/c/model/chat_id_prop.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "chat_id_prop.h" - - - -chat_id_prop_t *chat_id_prop_create( - char *chat_id - ) { - chat_id_prop_t *chat_id_prop_local_var = malloc(sizeof(chat_id_prop_t)); - if (!chat_id_prop_local_var) { - return NULL; - } - chat_id_prop_local_var->chat_id = chat_id; - - return chat_id_prop_local_var; -} - - -void chat_id_prop_free(chat_id_prop_t *chat_id_prop) { - if(NULL == chat_id_prop){ - return ; - } - listEntry_t *listEntry; - if (chat_id_prop->chat_id) { - free(chat_id_prop->chat_id); - chat_id_prop->chat_id = NULL; - } - free(chat_id_prop); -} - -cJSON *chat_id_prop_convertToJSON(chat_id_prop_t *chat_id_prop) { - cJSON *item = cJSON_CreateObject(); - - // chat_id_prop->chat_id - if(chat_id_prop->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", chat_id_prop->chat_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -chat_id_prop_t *chat_id_prop_parseFromJSON(cJSON *chat_id_propJSON){ - - chat_id_prop_t *chat_id_prop_local_var = NULL; - - // chat_id_prop->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(chat_id_propJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - - chat_id_prop_local_var = chat_id_prop_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL - ); - - return chat_id_prop_local_var; -end: - return NULL; - -} diff --git a/c/model/chat_id_prop.h b/c/model/chat_id_prop.h deleted file mode 100644 index 3af6605..0000000 --- a/c/model/chat_id_prop.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * chat_id_prop.h - * - * - */ - -#ifndef _chat_id_prop_H_ -#define _chat_id_prop_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct chat_id_prop_t chat_id_prop_t; - - - - -typedef struct chat_id_prop_t { - char *chat_id; // string - -} chat_id_prop_t; - -chat_id_prop_t *chat_id_prop_create( - char *chat_id -); - -void chat_id_prop_free(chat_id_prop_t *chat_id_prop); - -chat_id_prop_t *chat_id_prop_parseFromJSON(cJSON *chat_id_propJSON); - -cJSON *chat_id_prop_convertToJSON(chat_id_prop_t *chat_id_prop); - -#endif /* _chat_id_prop_H_ */ - diff --git a/c/model/commerce.c b/c/model/commerce.c deleted file mode 100644 index 1443fa8..0000000 --- a/c/model/commerce.c +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include -#include -#include "commerce.h" - - - -commerce_t *commerce_create( - commerce_params_t *params - ) { - commerce_t *commerce_local_var = malloc(sizeof(commerce_t)); - if (!commerce_local_var) { - return NULL; - } - commerce_local_var->params = params; - - return commerce_local_var; -} - - -void commerce_free(commerce_t *commerce) { - if(NULL == commerce){ - return ; - } - listEntry_t *listEntry; - if (commerce->params) { - commerce_params_free(commerce->params); - commerce->params = NULL; - } - free(commerce); -} - -cJSON *commerce_convertToJSON(commerce_t *commerce) { - cJSON *item = cJSON_CreateObject(); - - // commerce->params - if(commerce->params) { - cJSON *params_local_JSON = commerce_params_convertToJSON(commerce->params); - if(params_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "params", params_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -commerce_t *commerce_parseFromJSON(cJSON *commerceJSON){ - - commerce_t *commerce_local_var = NULL; - - // define the local variable for commerce->params - commerce_params_t *params_local_nonprim = NULL; - - // commerce->params - cJSON *params = cJSON_GetObjectItemCaseSensitive(commerceJSON, "params"); - if (params) { - params_local_nonprim = commerce_params_parseFromJSON(params); //nonprimitive - } - - - commerce_local_var = commerce_create ( - params ? params_local_nonprim : NULL - ); - - return commerce_local_var; -end: - if (params_local_nonprim) { - commerce_params_free(params_local_nonprim); - params_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/commerce.h b/c/model/commerce.h deleted file mode 100644 index 136231f..0000000 --- a/c/model/commerce.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * commerce.h - * - * - */ - -#ifndef _commerce_H_ -#define _commerce_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct commerce_t commerce_t; - -#include "commerce_params.h" - - - -typedef struct commerce_t { - struct commerce_params_t *params; //model - -} commerce_t; - -commerce_t *commerce_create( - commerce_params_t *params -); - -void commerce_free(commerce_t *commerce); - -commerce_t *commerce_parseFromJSON(cJSON *commerceJSON); - -cJSON *commerce_convertToJSON(commerce_t *commerce); - -#endif /* _commerce_H_ */ - diff --git a/c/model/commerce_params.c b/c/model/commerce_params.c deleted file mode 100644 index 468b5d4..0000000 --- a/c/model/commerce_params.c +++ /dev/null @@ -1,97 +0,0 @@ -#include -#include -#include -#include "commerce_params.h" - - - -commerce_params_t *commerce_params_create( - int is_cart_enabled, - int is_catalog_visible - ) { - commerce_params_t *commerce_params_local_var = malloc(sizeof(commerce_params_t)); - if (!commerce_params_local_var) { - return NULL; - } - commerce_params_local_var->is_cart_enabled = is_cart_enabled; - commerce_params_local_var->is_catalog_visible = is_catalog_visible; - - return commerce_params_local_var; -} - - -void commerce_params_free(commerce_params_t *commerce_params) { - if(NULL == commerce_params){ - return ; - } - listEntry_t *listEntry; - free(commerce_params); -} - -cJSON *commerce_params_convertToJSON(commerce_params_t *commerce_params) { - cJSON *item = cJSON_CreateObject(); - - // commerce_params->is_cart_enabled - if (!commerce_params->is_cart_enabled) { - goto fail; - } - if(cJSON_AddBoolToObject(item, "is_cart_enabled", commerce_params->is_cart_enabled) == NULL) { - goto fail; //Bool - } - - - // commerce_params->is_catalog_visible - if (!commerce_params->is_catalog_visible) { - goto fail; - } - if(cJSON_AddBoolToObject(item, "is_catalog_visible", commerce_params->is_catalog_visible) == NULL) { - goto fail; //Bool - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -commerce_params_t *commerce_params_parseFromJSON(cJSON *commerce_paramsJSON){ - - commerce_params_t *commerce_params_local_var = NULL; - - // commerce_params->is_cart_enabled - cJSON *is_cart_enabled = cJSON_GetObjectItemCaseSensitive(commerce_paramsJSON, "is_cart_enabled"); - if (!is_cart_enabled) { - goto end; - } - - - if(!cJSON_IsBool(is_cart_enabled)) - { - goto end; //Bool - } - - // commerce_params->is_catalog_visible - cJSON *is_catalog_visible = cJSON_GetObjectItemCaseSensitive(commerce_paramsJSON, "is_catalog_visible"); - if (!is_catalog_visible) { - goto end; - } - - - if(!cJSON_IsBool(is_catalog_visible)) - { - goto end; //Bool - } - - - commerce_params_local_var = commerce_params_create ( - is_cart_enabled->valueint, - is_catalog_visible->valueint - ); - - return commerce_params_local_var; -end: - return NULL; - -} diff --git a/c/model/commerce_params.h b/c/model/commerce_params.h deleted file mode 100644 index d97d25b..0000000 --- a/c/model/commerce_params.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * commerce_params.h - * - * - */ - -#ifndef _commerce_params_H_ -#define _commerce_params_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct commerce_params_t commerce_params_t; - - - - -typedef struct commerce_params_t { - int is_cart_enabled; //boolean - int is_catalog_visible; //boolean - -} commerce_params_t; - -commerce_params_t *commerce_params_create( - int is_cart_enabled, - int is_catalog_visible -); - -void commerce_params_free(commerce_params_t *commerce_params); - -commerce_params_t *commerce_params_parseFromJSON(cJSON *commerce_paramsJSON); - -cJSON *commerce_params_convertToJSON(commerce_params_t *commerce_params); - -#endif /* _commerce_params_H_ */ - diff --git a/c/model/contacts.c b/c/model/contacts.c deleted file mode 100644 index 0a83dca..0000000 --- a/c/model/contacts.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "contacts.h" - - - -contacts_t *contacts_create( - list_t *contacts - ) { - contacts_t *contacts_local_var = malloc(sizeof(contacts_t)); - if (!contacts_local_var) { - return NULL; - } - contacts_local_var->contacts = contacts; - - return contacts_local_var; -} - - -void contacts_free(contacts_t *contacts) { - if(NULL == contacts){ - return ; - } - listEntry_t *listEntry; - if (contacts->contacts) { - list_ForEach(listEntry, contacts->contacts) { - contacts_contacts_inner_free(listEntry->data); - } - list_freeList(contacts->contacts); - contacts->contacts = NULL; - } - free(contacts); -} - -cJSON *contacts_convertToJSON(contacts_t *contacts) { - cJSON *item = cJSON_CreateObject(); - - // contacts->contacts - if(contacts->contacts) { - cJSON *contacts = cJSON_AddArrayToObject(item, "contacts"); - if(contacts == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *contactsListEntry; - if (contacts->contacts) { - list_ForEach(contactsListEntry, contacts->contacts) { - cJSON *itemLocal = contacts_contacts_inner_convertToJSON(contactsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(contacts, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -contacts_t *contacts_parseFromJSON(cJSON *contactsJSON){ - - contacts_t *contacts_local_var = NULL; - - // define the local list for contacts->contacts - list_t *contactsList = NULL; - - // contacts->contacts - cJSON *contacts = cJSON_GetObjectItemCaseSensitive(contactsJSON, "contacts"); - if (contacts) { - cJSON *contacts_local_nonprimitive = NULL; - if(!cJSON_IsArray(contacts)){ - goto end; //nonprimitive container - } - - contactsList = list_createList(); - - cJSON_ArrayForEach(contacts_local_nonprimitive,contacts ) - { - if(!cJSON_IsObject(contacts_local_nonprimitive)){ - goto end; - } - contacts_contacts_inner_t *contactsItem = contacts_contacts_inner_parseFromJSON(contacts_local_nonprimitive); - - list_addElement(contactsList, contactsItem); - } - } - - - contacts_local_var = contacts_create ( - contacts ? contactsList : NULL - ); - - return contacts_local_var; -end: - if (contactsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, contactsList) { - contacts_contacts_inner_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(contactsList); - contactsList = NULL; - } - return NULL; - -} diff --git a/c/model/contacts.h b/c/model/contacts.h deleted file mode 100644 index 90cb48e..0000000 --- a/c/model/contacts.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * contacts.h - * - * - */ - -#ifndef _contacts_H_ -#define _contacts_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct contacts_t contacts_t; - -#include "contacts_contacts_inner.h" - - - -typedef struct contacts_t { - list_t *contacts; //nonprimitive container - -} contacts_t; - -contacts_t *contacts_create( - list_t *contacts -); - -void contacts_free(contacts_t *contacts); - -contacts_t *contacts_parseFromJSON(cJSON *contactsJSON); - -cJSON *contacts_convertToJSON(contacts_t *contacts); - -#endif /* _contacts_H_ */ - diff --git a/c/model/contacts_contacts_inner.c b/c/model/contacts_contacts_inner.c deleted file mode 100644 index 62b4897..0000000 --- a/c/model/contacts_contacts_inner.c +++ /dev/null @@ -1,121 +0,0 @@ -#include -#include -#include -#include "contacts_contacts_inner.h" - - - -contacts_contacts_inner_t *contacts_contacts_inner_create( - char *input, - char *status, - char *wa_id - ) { - contacts_contacts_inner_t *contacts_contacts_inner_local_var = malloc(sizeof(contacts_contacts_inner_t)); - if (!contacts_contacts_inner_local_var) { - return NULL; - } - contacts_contacts_inner_local_var->input = input; - contacts_contacts_inner_local_var->status = status; - contacts_contacts_inner_local_var->wa_id = wa_id; - - return contacts_contacts_inner_local_var; -} - - -void contacts_contacts_inner_free(contacts_contacts_inner_t *contacts_contacts_inner) { - if(NULL == contacts_contacts_inner){ - return ; - } - listEntry_t *listEntry; - if (contacts_contacts_inner->input) { - free(contacts_contacts_inner->input); - contacts_contacts_inner->input = NULL; - } - if (contacts_contacts_inner->status) { - free(contacts_contacts_inner->status); - contacts_contacts_inner->status = NULL; - } - if (contacts_contacts_inner->wa_id) { - free(contacts_contacts_inner->wa_id); - contacts_contacts_inner->wa_id = NULL; - } - free(contacts_contacts_inner); -} - -cJSON *contacts_contacts_inner_convertToJSON(contacts_contacts_inner_t *contacts_contacts_inner) { - cJSON *item = cJSON_CreateObject(); - - // contacts_contacts_inner->input - if(contacts_contacts_inner->input) { - if(cJSON_AddStringToObject(item, "input", contacts_contacts_inner->input) == NULL) { - goto fail; //String - } - } - - - // contacts_contacts_inner->status - if(contacts_contacts_inner->status) { - if(cJSON_AddStringToObject(item, "status", contacts_contacts_inner->status) == NULL) { - goto fail; //String - } - } - - - // contacts_contacts_inner->wa_id - if(contacts_contacts_inner->wa_id) { - if(cJSON_AddStringToObject(item, "wa_id", contacts_contacts_inner->wa_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -contacts_contacts_inner_t *contacts_contacts_inner_parseFromJSON(cJSON *contacts_contacts_innerJSON){ - - contacts_contacts_inner_t *contacts_contacts_inner_local_var = NULL; - - // contacts_contacts_inner->input - cJSON *input = cJSON_GetObjectItemCaseSensitive(contacts_contacts_innerJSON, "input"); - if (input) { - if(!cJSON_IsString(input) && !cJSON_IsNull(input)) - { - goto end; //String - } - } - - // contacts_contacts_inner->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(contacts_contacts_innerJSON, "status"); - if (status) { - if(!cJSON_IsString(status) && !cJSON_IsNull(status)) - { - goto end; //String - } - } - - // contacts_contacts_inner->wa_id - cJSON *wa_id = cJSON_GetObjectItemCaseSensitive(contacts_contacts_innerJSON, "wa_id"); - if (wa_id) { - if(!cJSON_IsString(wa_id) && !cJSON_IsNull(wa_id)) - { - goto end; //String - } - } - - - contacts_contacts_inner_local_var = contacts_contacts_inner_create ( - input && !cJSON_IsNull(input) ? strdup(input->valuestring) : NULL, - status && !cJSON_IsNull(status) ? strdup(status->valuestring) : NULL, - wa_id && !cJSON_IsNull(wa_id) ? strdup(wa_id->valuestring) : NULL - ); - - return contacts_contacts_inner_local_var; -end: - return NULL; - -} diff --git a/c/model/contacts_contacts_inner.h b/c/model/contacts_contacts_inner.h deleted file mode 100644 index f7418bf..0000000 --- a/c/model/contacts_contacts_inner.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * contacts_contacts_inner.h - * - * - */ - -#ifndef _contacts_contacts_inner_H_ -#define _contacts_contacts_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct contacts_contacts_inner_t contacts_contacts_inner_t; - - - - -typedef struct contacts_contacts_inner_t { - char *input; // string - char *status; // string - char *wa_id; // string - -} contacts_contacts_inner_t; - -contacts_contacts_inner_t *contacts_contacts_inner_create( - char *input, - char *status, - char *wa_id -); - -void contacts_contacts_inner_free(contacts_contacts_inner_t *contacts_contacts_inner); - -contacts_contacts_inner_t *contacts_contacts_inner_parseFromJSON(cJSON *contacts_contacts_innerJSON); - -cJSON *contacts_contacts_inner_convertToJSON(contacts_contacts_inner_t *contacts_contacts_inner); - -#endif /* _contacts_contacts_inner_H_ */ - diff --git a/c/model/contacts_request.c b/c/model/contacts_request.c deleted file mode 100644 index 0a9f63e..0000000 --- a/c/model/contacts_request.c +++ /dev/null @@ -1,155 +0,0 @@ -#include -#include -#include -#include "contacts_request.h" - - - -contacts_request_t *contacts_request_create( - char *blocking, - int force_check, - list_t *contacts - ) { - contacts_request_t *contacts_request_local_var = malloc(sizeof(contacts_request_t)); - if (!contacts_request_local_var) { - return NULL; - } - contacts_request_local_var->blocking = blocking; - contacts_request_local_var->force_check = force_check; - contacts_request_local_var->contacts = contacts; - - return contacts_request_local_var; -} - - -void contacts_request_free(contacts_request_t *contacts_request) { - if(NULL == contacts_request){ - return ; - } - listEntry_t *listEntry; - if (contacts_request->blocking) { - free(contacts_request->blocking); - contacts_request->blocking = NULL; - } - if (contacts_request->contacts) { - list_ForEach(listEntry, contacts_request->contacts) { - free(listEntry->data); - } - list_freeList(contacts_request->contacts); - contacts_request->contacts = NULL; - } - free(contacts_request); -} - -cJSON *contacts_request_convertToJSON(contacts_request_t *contacts_request) { - cJSON *item = cJSON_CreateObject(); - - // contacts_request->blocking - if(contacts_request->blocking) { - if(cJSON_AddStringToObject(item, "blocking", contacts_request->blocking) == NULL) { - goto fail; //String - } - } - - - // contacts_request->force_check - if(contacts_request->force_check) { - if(cJSON_AddBoolToObject(item, "force_check", contacts_request->force_check) == NULL) { - goto fail; //Bool - } - } - - - // contacts_request->contacts - if (!contacts_request->contacts) { - goto fail; - } - cJSON *contacts = cJSON_AddArrayToObject(item, "contacts"); - if(contacts == NULL) { - goto fail; //primitive container - } - - listEntry_t *contactsListEntry; - list_ForEach(contactsListEntry, contacts_request->contacts) { - if(cJSON_AddStringToObject(contacts, "", (char*)contactsListEntry->data) == NULL) - { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -contacts_request_t *contacts_request_parseFromJSON(cJSON *contacts_requestJSON){ - - contacts_request_t *contacts_request_local_var = NULL; - - // define the local list for contacts_request->contacts - list_t *contactsList = NULL; - - // contacts_request->blocking - cJSON *blocking = cJSON_GetObjectItemCaseSensitive(contacts_requestJSON, "blocking"); - if (blocking) { - if(!cJSON_IsString(blocking) && !cJSON_IsNull(blocking)) - { - goto end; //String - } - } - - // contacts_request->force_check - cJSON *force_check = cJSON_GetObjectItemCaseSensitive(contacts_requestJSON, "force_check"); - if (force_check) { - if(!cJSON_IsBool(force_check)) - { - goto end; //Bool - } - } - - // contacts_request->contacts - cJSON *contacts = cJSON_GetObjectItemCaseSensitive(contacts_requestJSON, "contacts"); - if (!contacts) { - goto end; - } - - - cJSON *contacts_local = NULL; - if(!cJSON_IsArray(contacts)) { - goto end;//primitive container - } - contactsList = list_createList(); - - cJSON_ArrayForEach(contacts_local, contacts) - { - if(!cJSON_IsString(contacts_local)) - { - goto end; - } - list_addElement(contactsList , strdup(contacts_local->valuestring)); - } - - - contacts_request_local_var = contacts_request_create ( - blocking && !cJSON_IsNull(blocking) ? strdup(blocking->valuestring) : NULL, - force_check ? force_check->valueint : 0, - contactsList - ); - - return contacts_request_local_var; -end: - if (contactsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, contactsList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(contactsList); - contactsList = NULL; - } - return NULL; - -} diff --git a/c/model/contacts_request.h b/c/model/contacts_request.h deleted file mode 100644 index 208045c..0000000 --- a/c/model/contacts_request.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * contacts_request.h - * - * - */ - -#ifndef _contacts_request_H_ -#define _contacts_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct contacts_request_t contacts_request_t; - - - - -typedef struct contacts_request_t { - char *blocking; // string - int force_check; //boolean - list_t *contacts; //primitive container - -} contacts_request_t; - -contacts_request_t *contacts_request_create( - char *blocking, - int force_check, - list_t *contacts -); - -void contacts_request_free(contacts_request_t *contacts_request); - -contacts_request_t *contacts_request_parseFromJSON(cJSON *contacts_requestJSON); - -cJSON *contacts_request_convertToJSON(contacts_request_t *contacts_request); - -#endif /* _contacts_request_H_ */ - diff --git a/c/model/get_ack_info.c b/c/model/get_ack_info.c deleted file mode 100644 index fc0b3d1..0000000 --- a/c/model/get_ack_info.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "get_ack_info.h" - - - -get_ack_info_t *get_ack_info_create( - list_t *hooks - ) { - get_ack_info_t *get_ack_info_local_var = malloc(sizeof(get_ack_info_t)); - if (!get_ack_info_local_var) { - return NULL; - } - get_ack_info_local_var->hooks = hooks; - - return get_ack_info_local_var; -} - - -void get_ack_info_free(get_ack_info_t *get_ack_info) { - if(NULL == get_ack_info){ - return ; - } - listEntry_t *listEntry; - if (get_ack_info->hooks) { - list_ForEach(listEntry, get_ack_info->hooks) { - get_ack_info_hooks_inner_free(listEntry->data); - } - list_freeList(get_ack_info->hooks); - get_ack_info->hooks = NULL; - } - free(get_ack_info); -} - -cJSON *get_ack_info_convertToJSON(get_ack_info_t *get_ack_info) { - cJSON *item = cJSON_CreateObject(); - - // get_ack_info->hooks - if(get_ack_info->hooks) { - cJSON *hooks = cJSON_AddArrayToObject(item, "hooks"); - if(hooks == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *hooksListEntry; - if (get_ack_info->hooks) { - list_ForEach(hooksListEntry, get_ack_info->hooks) { - cJSON *itemLocal = get_ack_info_hooks_inner_convertToJSON(hooksListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(hooks, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_ack_info_t *get_ack_info_parseFromJSON(cJSON *get_ack_infoJSON){ - - get_ack_info_t *get_ack_info_local_var = NULL; - - // define the local list for get_ack_info->hooks - list_t *hooksList = NULL; - - // get_ack_info->hooks - cJSON *hooks = cJSON_GetObjectItemCaseSensitive(get_ack_infoJSON, "hooks"); - if (hooks) { - cJSON *hooks_local_nonprimitive = NULL; - if(!cJSON_IsArray(hooks)){ - goto end; //nonprimitive container - } - - hooksList = list_createList(); - - cJSON_ArrayForEach(hooks_local_nonprimitive,hooks ) - { - if(!cJSON_IsObject(hooks_local_nonprimitive)){ - goto end; - } - get_ack_info_hooks_inner_t *hooksItem = get_ack_info_hooks_inner_parseFromJSON(hooks_local_nonprimitive); - - list_addElement(hooksList, hooksItem); - } - } - - - get_ack_info_local_var = get_ack_info_create ( - hooks ? hooksList : NULL - ); - - return get_ack_info_local_var; -end: - if (hooksList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, hooksList) { - get_ack_info_hooks_inner_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(hooksList); - hooksList = NULL; - } - return NULL; - -} diff --git a/c/model/get_ack_info.h b/c/model/get_ack_info.h deleted file mode 100644 index 88e3118..0000000 --- a/c/model/get_ack_info.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * get_ack_info.h - * - * - */ - -#ifndef _get_ack_info_H_ -#define _get_ack_info_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_ack_info_t get_ack_info_t; - -#include "get_ack_info_hooks_inner.h" - - - -typedef struct get_ack_info_t { - list_t *hooks; //nonprimitive container - -} get_ack_info_t; - -get_ack_info_t *get_ack_info_create( - list_t *hooks -); - -void get_ack_info_free(get_ack_info_t *get_ack_info); - -get_ack_info_t *get_ack_info_parseFromJSON(cJSON *get_ack_infoJSON); - -cJSON *get_ack_info_convertToJSON(get_ack_info_t *get_ack_info); - -#endif /* _get_ack_info_H_ */ - diff --git a/c/model/get_ack_info_hooks_inner.c b/c/model/get_ack_info_hooks_inner.c deleted file mode 100644 index 5fb8d25..0000000 --- a/c/model/get_ack_info_hooks_inner.c +++ /dev/null @@ -1,223 +0,0 @@ -#include -#include -#include -#include "get_ack_info_hooks_inner.h" - - - -get_ack_info_hooks_inner_t *get_ack_info_hooks_inner_create( - char *id, - char *type, - char *status, - object_t *pricing, - char *timestamp, - object_t *conversation, - char *recipient_id - ) { - get_ack_info_hooks_inner_t *get_ack_info_hooks_inner_local_var = malloc(sizeof(get_ack_info_hooks_inner_t)); - if (!get_ack_info_hooks_inner_local_var) { - return NULL; - } - get_ack_info_hooks_inner_local_var->id = id; - get_ack_info_hooks_inner_local_var->type = type; - get_ack_info_hooks_inner_local_var->status = status; - get_ack_info_hooks_inner_local_var->pricing = pricing; - get_ack_info_hooks_inner_local_var->timestamp = timestamp; - get_ack_info_hooks_inner_local_var->conversation = conversation; - get_ack_info_hooks_inner_local_var->recipient_id = recipient_id; - - return get_ack_info_hooks_inner_local_var; -} - - -void get_ack_info_hooks_inner_free(get_ack_info_hooks_inner_t *get_ack_info_hooks_inner) { - if(NULL == get_ack_info_hooks_inner){ - return ; - } - listEntry_t *listEntry; - if (get_ack_info_hooks_inner->id) { - free(get_ack_info_hooks_inner->id); - get_ack_info_hooks_inner->id = NULL; - } - if (get_ack_info_hooks_inner->type) { - free(get_ack_info_hooks_inner->type); - get_ack_info_hooks_inner->type = NULL; - } - if (get_ack_info_hooks_inner->status) { - free(get_ack_info_hooks_inner->status); - get_ack_info_hooks_inner->status = NULL; - } - if (get_ack_info_hooks_inner->pricing) { - object_free(get_ack_info_hooks_inner->pricing); - get_ack_info_hooks_inner->pricing = NULL; - } - if (get_ack_info_hooks_inner->timestamp) { - free(get_ack_info_hooks_inner->timestamp); - get_ack_info_hooks_inner->timestamp = NULL; - } - if (get_ack_info_hooks_inner->conversation) { - object_free(get_ack_info_hooks_inner->conversation); - get_ack_info_hooks_inner->conversation = NULL; - } - if (get_ack_info_hooks_inner->recipient_id) { - free(get_ack_info_hooks_inner->recipient_id); - get_ack_info_hooks_inner->recipient_id = NULL; - } - free(get_ack_info_hooks_inner); -} - -cJSON *get_ack_info_hooks_inner_convertToJSON(get_ack_info_hooks_inner_t *get_ack_info_hooks_inner) { - cJSON *item = cJSON_CreateObject(); - - // get_ack_info_hooks_inner->id - if(get_ack_info_hooks_inner->id) { - if(cJSON_AddStringToObject(item, "id", get_ack_info_hooks_inner->id) == NULL) { - goto fail; //String - } - } - - - // get_ack_info_hooks_inner->type - if(get_ack_info_hooks_inner->type) { - if(cJSON_AddStringToObject(item, "type", get_ack_info_hooks_inner->type) == NULL) { - goto fail; //String - } - } - - - // get_ack_info_hooks_inner->status - if(get_ack_info_hooks_inner->status) { - if(cJSON_AddStringToObject(item, "status", get_ack_info_hooks_inner->status) == NULL) { - goto fail; //String - } - } - - - // get_ack_info_hooks_inner->pricing - if(get_ack_info_hooks_inner->pricing) { - cJSON *pricing_object = object_convertToJSON(get_ack_info_hooks_inner->pricing); - if(pricing_object == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "pricing", pricing_object); - if(item->child == NULL) { - goto fail; - } - } - - - // get_ack_info_hooks_inner->timestamp - if(get_ack_info_hooks_inner->timestamp) { - if(cJSON_AddStringToObject(item, "timestamp", get_ack_info_hooks_inner->timestamp) == NULL) { - goto fail; //String - } - } - - - // get_ack_info_hooks_inner->conversation - if(get_ack_info_hooks_inner->conversation) { - cJSON *conversation_object = object_convertToJSON(get_ack_info_hooks_inner->conversation); - if(conversation_object == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "conversation", conversation_object); - if(item->child == NULL) { - goto fail; - } - } - - - // get_ack_info_hooks_inner->recipient_id - if(get_ack_info_hooks_inner->recipient_id) { - if(cJSON_AddStringToObject(item, "recipient_id", get_ack_info_hooks_inner->recipient_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_ack_info_hooks_inner_t *get_ack_info_hooks_inner_parseFromJSON(cJSON *get_ack_info_hooks_innerJSON){ - - get_ack_info_hooks_inner_t *get_ack_info_hooks_inner_local_var = NULL; - - // get_ack_info_hooks_inner->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "id"); - if (id) { - if(!cJSON_IsString(id) && !cJSON_IsNull(id)) - { - goto end; //String - } - } - - // get_ack_info_hooks_inner->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "type"); - if (type) { - if(!cJSON_IsString(type) && !cJSON_IsNull(type)) - { - goto end; //String - } - } - - // get_ack_info_hooks_inner->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "status"); - if (status) { - if(!cJSON_IsString(status) && !cJSON_IsNull(status)) - { - goto end; //String - } - } - - // get_ack_info_hooks_inner->pricing - cJSON *pricing = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "pricing"); - object_t *pricing_local_object = NULL; - if (pricing) { - pricing_local_object = object_parseFromJSON(pricing); //object - } - - // get_ack_info_hooks_inner->timestamp - cJSON *timestamp = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "timestamp"); - if (timestamp) { - if(!cJSON_IsString(timestamp) && !cJSON_IsNull(timestamp)) - { - goto end; //String - } - } - - // get_ack_info_hooks_inner->conversation - cJSON *conversation = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "conversation"); - object_t *conversation_local_object = NULL; - if (conversation) { - conversation_local_object = object_parseFromJSON(conversation); //object - } - - // get_ack_info_hooks_inner->recipient_id - cJSON *recipient_id = cJSON_GetObjectItemCaseSensitive(get_ack_info_hooks_innerJSON, "recipient_id"); - if (recipient_id) { - if(!cJSON_IsString(recipient_id) && !cJSON_IsNull(recipient_id)) - { - goto end; //String - } - } - - - get_ack_info_hooks_inner_local_var = get_ack_info_hooks_inner_create ( - id && !cJSON_IsNull(id) ? strdup(id->valuestring) : NULL, - type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL, - status && !cJSON_IsNull(status) ? strdup(status->valuestring) : NULL, - pricing ? pricing_local_object : NULL, - timestamp && !cJSON_IsNull(timestamp) ? strdup(timestamp->valuestring) : NULL, - conversation ? conversation_local_object : NULL, - recipient_id && !cJSON_IsNull(recipient_id) ? strdup(recipient_id->valuestring) : NULL - ); - - return get_ack_info_hooks_inner_local_var; -end: - return NULL; - -} diff --git a/c/model/get_ack_info_hooks_inner.h b/c/model/get_ack_info_hooks_inner.h deleted file mode 100644 index b6c97f4..0000000 --- a/c/model/get_ack_info_hooks_inner.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * get_ack_info_hooks_inner.h - * - * - */ - -#ifndef _get_ack_info_hooks_inner_H_ -#define _get_ack_info_hooks_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_ack_info_hooks_inner_t get_ack_info_hooks_inner_t; - -#include "object.h" - - - -typedef struct get_ack_info_hooks_inner_t { - char *id; // string - char *type; // string - char *status; // string - object_t *pricing; //object - char *timestamp; // string - object_t *conversation; //object - char *recipient_id; // string - -} get_ack_info_hooks_inner_t; - -get_ack_info_hooks_inner_t *get_ack_info_hooks_inner_create( - char *id, - char *type, - char *status, - object_t *pricing, - char *timestamp, - object_t *conversation, - char *recipient_id -); - -void get_ack_info_hooks_inner_free(get_ack_info_hooks_inner_t *get_ack_info_hooks_inner); - -get_ack_info_hooks_inner_t *get_ack_info_hooks_inner_parseFromJSON(cJSON *get_ack_info_hooks_innerJSON); - -cJSON *get_ack_info_hooks_inner_convertToJSON(get_ack_info_hooks_inner_t *get_ack_info_hooks_inner); - -#endif /* _get_ack_info_hooks_inner_H_ */ - diff --git a/c/model/get_commerce.c b/c/model/get_commerce.c deleted file mode 100644 index 7c039d4..0000000 --- a/c/model/get_commerce.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include -#include "get_commerce.h" - - - -get_commerce_t *get_commerce_create( - ) { - get_commerce_t *get_commerce_local_var = malloc(sizeof(get_commerce_t)); - if (!get_commerce_local_var) { - return NULL; - } - - return get_commerce_local_var; -} - - -void get_commerce_free(get_commerce_t *get_commerce) { - if(NULL == get_commerce){ - return ; - } - listEntry_t *listEntry; - free(get_commerce); -} - -cJSON *get_commerce_convertToJSON(get_commerce_t *get_commerce) { - cJSON *item = cJSON_CreateObject(); - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_commerce_t *get_commerce_parseFromJSON(cJSON *get_commerceJSON){ - - get_commerce_t *get_commerce_local_var = NULL; - - - get_commerce_local_var = get_commerce_create ( - ); - - return get_commerce_local_var; -end: - return NULL; - -} diff --git a/c/model/get_commerce.h b/c/model/get_commerce.h deleted file mode 100644 index 3d3f812..0000000 --- a/c/model/get_commerce.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * get_commerce.h - * - * - */ - -#ifndef _get_commerce_H_ -#define _get_commerce_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_commerce_t get_commerce_t; - -#include "get_commerce_inner.h" - - - -typedef struct get_commerce_t { - -} get_commerce_t; - -get_commerce_t *get_commerce_create( -); - -void get_commerce_free(get_commerce_t *get_commerce); - -get_commerce_t *get_commerce_parseFromJSON(cJSON *get_commerceJSON); - -cJSON *get_commerce_convertToJSON(get_commerce_t *get_commerce); - -#endif /* _get_commerce_H_ */ - diff --git a/c/model/get_commerce_inner.c b/c/model/get_commerce_inner.c deleted file mode 100644 index 98ee840..0000000 --- a/c/model/get_commerce_inner.c +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include "get_commerce_inner.h" - - - -get_commerce_inner_t *get_commerce_inner_create( - char *id, - int is_cart_enabled, - int is_catalog_visible - ) { - get_commerce_inner_t *get_commerce_inner_local_var = malloc(sizeof(get_commerce_inner_t)); - if (!get_commerce_inner_local_var) { - return NULL; - } - get_commerce_inner_local_var->id = id; - get_commerce_inner_local_var->is_cart_enabled = is_cart_enabled; - get_commerce_inner_local_var->is_catalog_visible = is_catalog_visible; - - return get_commerce_inner_local_var; -} - - -void get_commerce_inner_free(get_commerce_inner_t *get_commerce_inner) { - if(NULL == get_commerce_inner){ - return ; - } - listEntry_t *listEntry; - if (get_commerce_inner->id) { - free(get_commerce_inner->id); - get_commerce_inner->id = NULL; - } - free(get_commerce_inner); -} - -cJSON *get_commerce_inner_convertToJSON(get_commerce_inner_t *get_commerce_inner) { - cJSON *item = cJSON_CreateObject(); - - // get_commerce_inner->id - if(get_commerce_inner->id) { - if(cJSON_AddStringToObject(item, "id", get_commerce_inner->id) == NULL) { - goto fail; //String - } - } - - - // get_commerce_inner->is_cart_enabled - if(get_commerce_inner->is_cart_enabled) { - if(cJSON_AddBoolToObject(item, "is_cart_enabled", get_commerce_inner->is_cart_enabled) == NULL) { - goto fail; //Bool - } - } - - - // get_commerce_inner->is_catalog_visible - if(get_commerce_inner->is_catalog_visible) { - if(cJSON_AddBoolToObject(item, "is_catalog_visible", get_commerce_inner->is_catalog_visible) == NULL) { - goto fail; //Bool - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_commerce_inner_t *get_commerce_inner_parseFromJSON(cJSON *get_commerce_innerJSON){ - - get_commerce_inner_t *get_commerce_inner_local_var = NULL; - - // get_commerce_inner->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(get_commerce_innerJSON, "id"); - if (id) { - if(!cJSON_IsString(id) && !cJSON_IsNull(id)) - { - goto end; //String - } - } - - // get_commerce_inner->is_cart_enabled - cJSON *is_cart_enabled = cJSON_GetObjectItemCaseSensitive(get_commerce_innerJSON, "is_cart_enabled"); - if (is_cart_enabled) { - if(!cJSON_IsBool(is_cart_enabled)) - { - goto end; //Bool - } - } - - // get_commerce_inner->is_catalog_visible - cJSON *is_catalog_visible = cJSON_GetObjectItemCaseSensitive(get_commerce_innerJSON, "is_catalog_visible"); - if (is_catalog_visible) { - if(!cJSON_IsBool(is_catalog_visible)) - { - goto end; //Bool - } - } - - - get_commerce_inner_local_var = get_commerce_inner_create ( - id && !cJSON_IsNull(id) ? strdup(id->valuestring) : NULL, - is_cart_enabled ? is_cart_enabled->valueint : 0, - is_catalog_visible ? is_catalog_visible->valueint : 0 - ); - - return get_commerce_inner_local_var; -end: - return NULL; - -} diff --git a/c/model/get_commerce_inner.h b/c/model/get_commerce_inner.h deleted file mode 100644 index af9f742..0000000 --- a/c/model/get_commerce_inner.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * get_commerce_inner.h - * - * - */ - -#ifndef _get_commerce_inner_H_ -#define _get_commerce_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_commerce_inner_t get_commerce_inner_t; - - - - -typedef struct get_commerce_inner_t { - char *id; // string - int is_cart_enabled; //boolean - int is_catalog_visible; //boolean - -} get_commerce_inner_t; - -get_commerce_inner_t *get_commerce_inner_create( - char *id, - int is_cart_enabled, - int is_catalog_visible -); - -void get_commerce_inner_free(get_commerce_inner_t *get_commerce_inner); - -get_commerce_inner_t *get_commerce_inner_parseFromJSON(cJSON *get_commerce_innerJSON); - -cJSON *get_commerce_inner_convertToJSON(get_commerce_inner_t *get_commerce_inner); - -#endif /* _get_commerce_inner_H_ */ - diff --git a/c/model/get_ip.c b/c/model/get_ip.c deleted file mode 100644 index a8ba6a9..0000000 --- a/c/model/get_ip.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "get_ip.h" - - - -get_ip_t *get_ip_create( - char *result - ) { - get_ip_t *get_ip_local_var = malloc(sizeof(get_ip_t)); - if (!get_ip_local_var) { - return NULL; - } - get_ip_local_var->result = result; - - return get_ip_local_var; -} - - -void get_ip_free(get_ip_t *get_ip) { - if(NULL == get_ip){ - return ; - } - listEntry_t *listEntry; - if (get_ip->result) { - free(get_ip->result); - get_ip->result = NULL; - } - free(get_ip); -} - -cJSON *get_ip_convertToJSON(get_ip_t *get_ip) { - cJSON *item = cJSON_CreateObject(); - - // get_ip->result - if(get_ip->result) { - if(cJSON_AddStringToObject(item, "result", get_ip->result) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_ip_t *get_ip_parseFromJSON(cJSON *get_ipJSON){ - - get_ip_t *get_ip_local_var = NULL; - - // get_ip->result - cJSON *result = cJSON_GetObjectItemCaseSensitive(get_ipJSON, "result"); - if (result) { - if(!cJSON_IsString(result) && !cJSON_IsNull(result)) - { - goto end; //String - } - } - - - get_ip_local_var = get_ip_create ( - result && !cJSON_IsNull(result) ? strdup(result->valuestring) : NULL - ); - - return get_ip_local_var; -end: - return NULL; - -} diff --git a/c/model/get_ip.h b/c/model/get_ip.h deleted file mode 100644 index 947e99a..0000000 --- a/c/model/get_ip.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * get_ip.h - * - * - */ - -#ifndef _get_ip_H_ -#define _get_ip_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_ip_t get_ip_t; - - - - -typedef struct get_ip_t { - char *result; // string - -} get_ip_t; - -get_ip_t *get_ip_create( - char *result -); - -void get_ip_free(get_ip_t *get_ip); - -get_ip_t *get_ip_parseFromJSON(cJSON *get_ipJSON); - -cJSON *get_ip_convertToJSON(get_ip_t *get_ip); - -#endif /* _get_ip_H_ */ - diff --git a/c/model/get_me.c b/c/model/get_me.c deleted file mode 100644 index 6d1004f..0000000 --- a/c/model/get_me.c +++ /dev/null @@ -1,233 +0,0 @@ -#include -#include -#include -#include "get_me.h" - - -char* verticalget_me_ToString(one_msg_waba_sdk_get_me_VERTICAL_e vertical) { - char* verticalArray[] = { "NULL", "Automotive", "Beauty, Spa and Salon", "Clothing and Apparel", "Education", "Entertainment", "Event Planning and Service", "Finance and Banking", "Food and Grocery", "Public Service", "Hotel and Lodging", "Medical and Health", "Non-profit", "Professional Services", "Shopping and Retail", "Travel and Transportation", "Restaurant", "Other", "" }; - return verticalArray[vertical]; -} - -one_msg_waba_sdk_get_me_VERTICAL_e verticalget_me_FromString(char* vertical){ - int stringToReturn = 0; - char *verticalArray[] = { "NULL", "Automotive", "Beauty, Spa and Salon", "Clothing and Apparel", "Education", "Entertainment", "Event Planning and Service", "Finance and Banking", "Food and Grocery", "Public Service", "Hotel and Lodging", "Medical and Health", "Non-profit", "Professional Services", "Shopping and Retail", "Travel and Transportation", "Restaurant", "Other", "" }; - size_t sizeofArray = sizeof(verticalArray) / sizeof(verticalArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(vertical, verticalArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -get_me_t *get_me_create( - char *about, - char *address, - char *description, - char *email, - char *phone, - one_msg_waba_sdk_get_me_VERTICAL_e vertical, - char *photo - ) { - get_me_t *get_me_local_var = malloc(sizeof(get_me_t)); - if (!get_me_local_var) { - return NULL; - } - get_me_local_var->about = about; - get_me_local_var->address = address; - get_me_local_var->description = description; - get_me_local_var->email = email; - get_me_local_var->phone = phone; - get_me_local_var->vertical = vertical; - get_me_local_var->photo = photo; - - return get_me_local_var; -} - - -void get_me_free(get_me_t *get_me) { - if(NULL == get_me){ - return ; - } - listEntry_t *listEntry; - if (get_me->about) { - free(get_me->about); - get_me->about = NULL; - } - if (get_me->address) { - free(get_me->address); - get_me->address = NULL; - } - if (get_me->description) { - free(get_me->description); - get_me->description = NULL; - } - if (get_me->email) { - free(get_me->email); - get_me->email = NULL; - } - if (get_me->phone) { - free(get_me->phone); - get_me->phone = NULL; - } - if (get_me->photo) { - free(get_me->photo); - get_me->photo = NULL; - } - free(get_me); -} - -cJSON *get_me_convertToJSON(get_me_t *get_me) { - cJSON *item = cJSON_CreateObject(); - - // get_me->about - if(get_me->about) { - if(cJSON_AddStringToObject(item, "about", get_me->about) == NULL) { - goto fail; //String - } - } - - - // get_me->address - if(get_me->address) { - if(cJSON_AddStringToObject(item, "address", get_me->address) == NULL) { - goto fail; //String - } - } - - - // get_me->description - if(get_me->description) { - if(cJSON_AddStringToObject(item, "description", get_me->description) == NULL) { - goto fail; //String - } - } - - - // get_me->email - if(get_me->email) { - if(cJSON_AddStringToObject(item, "email", get_me->email) == NULL) { - goto fail; //String - } - } - - - // get_me->phone - if(get_me->phone) { - if(cJSON_AddStringToObject(item, "phone", get_me->phone) == NULL) { - goto fail; //String - } - } - - - // get_me->vertical - if(get_me->vertical != one_msg_waba_sdk_get_me_VERTICAL_NULL) { - if(cJSON_AddStringToObject(item, "vertical", verticalget_me_ToString(get_me->vertical)) == NULL) - { - goto fail; //Enum - } - } - - - // get_me->photo - if(get_me->photo) { - if(cJSON_AddStringToObject(item, "photo", get_me->photo) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_me_t *get_me_parseFromJSON(cJSON *get_meJSON){ - - get_me_t *get_me_local_var = NULL; - - // get_me->about - cJSON *about = cJSON_GetObjectItemCaseSensitive(get_meJSON, "about"); - if (about) { - if(!cJSON_IsString(about) && !cJSON_IsNull(about)) - { - goto end; //String - } - } - - // get_me->address - cJSON *address = cJSON_GetObjectItemCaseSensitive(get_meJSON, "address"); - if (address) { - if(!cJSON_IsString(address) && !cJSON_IsNull(address)) - { - goto end; //String - } - } - - // get_me->description - cJSON *description = cJSON_GetObjectItemCaseSensitive(get_meJSON, "description"); - if (description) { - if(!cJSON_IsString(description) && !cJSON_IsNull(description)) - { - goto end; //String - } - } - - // get_me->email - cJSON *email = cJSON_GetObjectItemCaseSensitive(get_meJSON, "email"); - if (email) { - if(!cJSON_IsString(email) && !cJSON_IsNull(email)) - { - goto end; //String - } - } - - // get_me->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(get_meJSON, "phone"); - if (phone) { - if(!cJSON_IsString(phone) && !cJSON_IsNull(phone)) - { - goto end; //String - } - } - - // get_me->vertical - cJSON *vertical = cJSON_GetObjectItemCaseSensitive(get_meJSON, "vertical"); - one_msg_waba_sdk_get_me_VERTICAL_e verticalVariable; - if (vertical) { - if(!cJSON_IsString(vertical)) - { - goto end; //Enum - } - verticalVariable = verticalget_me_FromString(vertical->valuestring); - } - - // get_me->photo - cJSON *photo = cJSON_GetObjectItemCaseSensitive(get_meJSON, "photo"); - if (photo) { - if(!cJSON_IsString(photo) && !cJSON_IsNull(photo)) - { - goto end; //String - } - } - - - get_me_local_var = get_me_create ( - about && !cJSON_IsNull(about) ? strdup(about->valuestring) : NULL, - address && !cJSON_IsNull(address) ? strdup(address->valuestring) : NULL, - description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL, - email && !cJSON_IsNull(email) ? strdup(email->valuestring) : NULL, - phone && !cJSON_IsNull(phone) ? strdup(phone->valuestring) : NULL, - vertical ? verticalVariable : -1, - photo && !cJSON_IsNull(photo) ? strdup(photo->valuestring) : NULL - ); - - return get_me_local_var; -end: - return NULL; - -} diff --git a/c/model/get_me.h b/c/model/get_me.h deleted file mode 100644 index 64e08a5..0000000 --- a/c/model/get_me.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * get_me.h - * - * - */ - -#ifndef _get_me_H_ -#define _get_me_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_me_t get_me_t; - - -// Enum VERTICAL for get_me - -typedef enum { one_msg_waba_sdk_get_me_VERTICAL_NULL = 0, one_msg_waba_sdk_get_me_VERTICAL_Automotive, one_msg_waba_sdk_get_me_VERTICAL_Beauty, Spa and Salon, one_msg_waba_sdk_get_me_VERTICAL_Clothing and Apparel, one_msg_waba_sdk_get_me_VERTICAL_Education, one_msg_waba_sdk_get_me_VERTICAL_Entertainment, one_msg_waba_sdk_get_me_VERTICAL_Event Planning and Service, one_msg_waba_sdk_get_me_VERTICAL_Finance and Banking, one_msg_waba_sdk_get_me_VERTICAL_Food and Grocery, one_msg_waba_sdk_get_me_VERTICAL_Public Service, one_msg_waba_sdk_get_me_VERTICAL_Hotel and Lodging, one_msg_waba_sdk_get_me_VERTICAL_Medical and Health, one_msg_waba_sdk_get_me_VERTICAL_Non_profit, one_msg_waba_sdk_get_me_VERTICAL_Professional Services, one_msg_waba_sdk_get_me_VERTICAL_Shopping and Retail, one_msg_waba_sdk_get_me_VERTICAL_Travel and Transportation, one_msg_waba_sdk_get_me_VERTICAL_Restaurant, one_msg_waba_sdk_get_me_VERTICAL_Other, one_msg_waba_sdk_get_me_VERTICAL_ } one_msg_waba_sdk_get_me_VERTICAL_e; - -char* get_me_vertical_ToString(one_msg_waba_sdk_get_me_VERTICAL_e vertical); - -one_msg_waba_sdk_get_me_VERTICAL_e get_me_vertical_FromString(char* vertical); - - - -typedef struct get_me_t { - char *about; // string - char *address; // string - char *description; // string - char *email; // string - char *phone; // string - one_msg_waba_sdk_get_me_VERTICAL_e vertical; //enum - char *photo; // string - -} get_me_t; - -get_me_t *get_me_create( - char *about, - char *address, - char *description, - char *email, - char *phone, - one_msg_waba_sdk_get_me_VERTICAL_e vertical, - char *photo -); - -void get_me_free(get_me_t *get_me); - -get_me_t *get_me_parseFromJSON(cJSON *get_meJSON); - -cJSON *get_me_convertToJSON(get_me_t *get_me); - -#endif /* _get_me_H_ */ - diff --git a/c/model/get_me_401_response.c b/c/model/get_me_401_response.c deleted file mode 100644 index 1ab37a5..0000000 --- a/c/model/get_me_401_response.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "get_me_401_response.h" - - - -get_me_401_response_t *get_me_401_response_create( - char *error - ) { - get_me_401_response_t *get_me_401_response_local_var = malloc(sizeof(get_me_401_response_t)); - if (!get_me_401_response_local_var) { - return NULL; - } - get_me_401_response_local_var->error = error; - - return get_me_401_response_local_var; -} - - -void get_me_401_response_free(get_me_401_response_t *get_me_401_response) { - if(NULL == get_me_401_response){ - return ; - } - listEntry_t *listEntry; - if (get_me_401_response->error) { - free(get_me_401_response->error); - get_me_401_response->error = NULL; - } - free(get_me_401_response); -} - -cJSON *get_me_401_response_convertToJSON(get_me_401_response_t *get_me_401_response) { - cJSON *item = cJSON_CreateObject(); - - // get_me_401_response->error - if(get_me_401_response->error) { - if(cJSON_AddStringToObject(item, "error", get_me_401_response->error) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_me_401_response_t *get_me_401_response_parseFromJSON(cJSON *get_me_401_responseJSON){ - - get_me_401_response_t *get_me_401_response_local_var = NULL; - - // get_me_401_response->error - cJSON *error = cJSON_GetObjectItemCaseSensitive(get_me_401_responseJSON, "error"); - if (error) { - if(!cJSON_IsString(error) && !cJSON_IsNull(error)) - { - goto end; //String - } - } - - - get_me_401_response_local_var = get_me_401_response_create ( - error && !cJSON_IsNull(error) ? strdup(error->valuestring) : NULL - ); - - return get_me_401_response_local_var; -end: - return NULL; - -} diff --git a/c/model/get_me_401_response.h b/c/model/get_me_401_response.h deleted file mode 100644 index 2aed5d3..0000000 --- a/c/model/get_me_401_response.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * get_me_401_response.h - * - * - */ - -#ifndef _get_me_401_response_H_ -#define _get_me_401_response_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_me_401_response_t get_me_401_response_t; - - - - -typedef struct get_me_401_response_t { - char *error; // string - -} get_me_401_response_t; - -get_me_401_response_t *get_me_401_response_create( - char *error -); - -void get_me_401_response_free(get_me_401_response_t *get_me_401_response); - -get_me_401_response_t *get_me_401_response_parseFromJSON(cJSON *get_me_401_responseJSON); - -cJSON *get_me_401_response_convertToJSON(get_me_401_response_t *get_me_401_response); - -#endif /* _get_me_401_response_H_ */ - diff --git a/c/model/get_messages.c b/c/model/get_messages.c deleted file mode 100644 index 9fb4351..0000000 --- a/c/model/get_messages.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "get_messages.h" - - - -get_messages_t *get_messages_create( - list_t *messages - ) { - get_messages_t *get_messages_local_var = malloc(sizeof(get_messages_t)); - if (!get_messages_local_var) { - return NULL; - } - get_messages_local_var->messages = messages; - - return get_messages_local_var; -} - - -void get_messages_free(get_messages_t *get_messages) { - if(NULL == get_messages){ - return ; - } - listEntry_t *listEntry; - if (get_messages->messages) { - list_ForEach(listEntry, get_messages->messages) { - get_messages_messages_inner_free(listEntry->data); - } - list_freeList(get_messages->messages); - get_messages->messages = NULL; - } - free(get_messages); -} - -cJSON *get_messages_convertToJSON(get_messages_t *get_messages) { - cJSON *item = cJSON_CreateObject(); - - // get_messages->messages - if(get_messages->messages) { - cJSON *messages = cJSON_AddArrayToObject(item, "messages"); - if(messages == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *messagesListEntry; - if (get_messages->messages) { - list_ForEach(messagesListEntry, get_messages->messages) { - cJSON *itemLocal = get_messages_messages_inner_convertToJSON(messagesListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(messages, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_messages_t *get_messages_parseFromJSON(cJSON *get_messagesJSON){ - - get_messages_t *get_messages_local_var = NULL; - - // define the local list for get_messages->messages - list_t *messagesList = NULL; - - // get_messages->messages - cJSON *messages = cJSON_GetObjectItemCaseSensitive(get_messagesJSON, "messages"); - if (messages) { - cJSON *messages_local_nonprimitive = NULL; - if(!cJSON_IsArray(messages)){ - goto end; //nonprimitive container - } - - messagesList = list_createList(); - - cJSON_ArrayForEach(messages_local_nonprimitive,messages ) - { - if(!cJSON_IsObject(messages_local_nonprimitive)){ - goto end; - } - get_messages_messages_inner_t *messagesItem = get_messages_messages_inner_parseFromJSON(messages_local_nonprimitive); - - list_addElement(messagesList, messagesItem); - } - } - - - get_messages_local_var = get_messages_create ( - messages ? messagesList : NULL - ); - - return get_messages_local_var; -end: - if (messagesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, messagesList) { - get_messages_messages_inner_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(messagesList); - messagesList = NULL; - } - return NULL; - -} diff --git a/c/model/get_messages.h b/c/model/get_messages.h deleted file mode 100644 index d957ce7..0000000 --- a/c/model/get_messages.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * get_messages.h - * - * - */ - -#ifndef _get_messages_H_ -#define _get_messages_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_messages_t get_messages_t; - -#include "get_messages_messages_inner.h" - - - -typedef struct get_messages_t { - list_t *messages; //nonprimitive container - -} get_messages_t; - -get_messages_t *get_messages_create( - list_t *messages -); - -void get_messages_free(get_messages_t *get_messages); - -get_messages_t *get_messages_parseFromJSON(cJSON *get_messagesJSON); - -cJSON *get_messages_convertToJSON(get_messages_t *get_messages); - -#endif /* _get_messages_H_ */ - diff --git a/c/model/get_messages_messages_inner.c b/c/model/get_messages_messages_inner.c deleted file mode 100644 index 12217f4..0000000 --- a/c/model/get_messages_messages_inner.c +++ /dev/null @@ -1,392 +0,0 @@ -#include -#include -#include -#include "get_messages_messages_inner.h" - - - -get_messages_messages_inner_t *get_messages_messages_inner_create( - int message_number, - char *id, - char *body, - int from_me, - int self, - int is_forwarded, - char *author, - int time, - char *chat_id, - char *type, - char *sender_name, - char *caption, - char *quoted_msg_id, - object_t *metadata, - char *chat_name - ) { - get_messages_messages_inner_t *get_messages_messages_inner_local_var = malloc(sizeof(get_messages_messages_inner_t)); - if (!get_messages_messages_inner_local_var) { - return NULL; - } - get_messages_messages_inner_local_var->message_number = message_number; - get_messages_messages_inner_local_var->id = id; - get_messages_messages_inner_local_var->body = body; - get_messages_messages_inner_local_var->from_me = from_me; - get_messages_messages_inner_local_var->self = self; - get_messages_messages_inner_local_var->is_forwarded = is_forwarded; - get_messages_messages_inner_local_var->author = author; - get_messages_messages_inner_local_var->time = time; - get_messages_messages_inner_local_var->chat_id = chat_id; - get_messages_messages_inner_local_var->type = type; - get_messages_messages_inner_local_var->sender_name = sender_name; - get_messages_messages_inner_local_var->caption = caption; - get_messages_messages_inner_local_var->quoted_msg_id = quoted_msg_id; - get_messages_messages_inner_local_var->metadata = metadata; - get_messages_messages_inner_local_var->chat_name = chat_name; - - return get_messages_messages_inner_local_var; -} - - -void get_messages_messages_inner_free(get_messages_messages_inner_t *get_messages_messages_inner) { - if(NULL == get_messages_messages_inner){ - return ; - } - listEntry_t *listEntry; - if (get_messages_messages_inner->id) { - free(get_messages_messages_inner->id); - get_messages_messages_inner->id = NULL; - } - if (get_messages_messages_inner->body) { - free(get_messages_messages_inner->body); - get_messages_messages_inner->body = NULL; - } - if (get_messages_messages_inner->author) { - free(get_messages_messages_inner->author); - get_messages_messages_inner->author = NULL; - } - if (get_messages_messages_inner->chat_id) { - free(get_messages_messages_inner->chat_id); - get_messages_messages_inner->chat_id = NULL; - } - if (get_messages_messages_inner->type) { - free(get_messages_messages_inner->type); - get_messages_messages_inner->type = NULL; - } - if (get_messages_messages_inner->sender_name) { - free(get_messages_messages_inner->sender_name); - get_messages_messages_inner->sender_name = NULL; - } - if (get_messages_messages_inner->caption) { - free(get_messages_messages_inner->caption); - get_messages_messages_inner->caption = NULL; - } - if (get_messages_messages_inner->quoted_msg_id) { - free(get_messages_messages_inner->quoted_msg_id); - get_messages_messages_inner->quoted_msg_id = NULL; - } - if (get_messages_messages_inner->metadata) { - object_free(get_messages_messages_inner->metadata); - get_messages_messages_inner->metadata = NULL; - } - if (get_messages_messages_inner->chat_name) { - free(get_messages_messages_inner->chat_name); - get_messages_messages_inner->chat_name = NULL; - } - free(get_messages_messages_inner); -} - -cJSON *get_messages_messages_inner_convertToJSON(get_messages_messages_inner_t *get_messages_messages_inner) { - cJSON *item = cJSON_CreateObject(); - - // get_messages_messages_inner->message_number - if(get_messages_messages_inner->message_number) { - if(cJSON_AddNumberToObject(item, "messageNumber", get_messages_messages_inner->message_number) == NULL) { - goto fail; //Numeric - } - } - - - // get_messages_messages_inner->id - if(get_messages_messages_inner->id) { - if(cJSON_AddStringToObject(item, "id", get_messages_messages_inner->id) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->body - if(get_messages_messages_inner->body) { - if(cJSON_AddStringToObject(item, "body", get_messages_messages_inner->body) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->from_me - if(get_messages_messages_inner->from_me) { - if(cJSON_AddBoolToObject(item, "fromMe", get_messages_messages_inner->from_me) == NULL) { - goto fail; //Bool - } - } - - - // get_messages_messages_inner->self - if(get_messages_messages_inner->self) { - if(cJSON_AddNumberToObject(item, "self", get_messages_messages_inner->self) == NULL) { - goto fail; //Numeric - } - } - - - // get_messages_messages_inner->is_forwarded - if(get_messages_messages_inner->is_forwarded) { - if(cJSON_AddNumberToObject(item, "isForwarded", get_messages_messages_inner->is_forwarded) == NULL) { - goto fail; //Numeric - } - } - - - // get_messages_messages_inner->author - if(get_messages_messages_inner->author) { - if(cJSON_AddStringToObject(item, "author", get_messages_messages_inner->author) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->time - if(get_messages_messages_inner->time) { - if(cJSON_AddNumberToObject(item, "time", get_messages_messages_inner->time) == NULL) { - goto fail; //Numeric - } - } - - - // get_messages_messages_inner->chat_id - if(get_messages_messages_inner->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", get_messages_messages_inner->chat_id) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->type - if(get_messages_messages_inner->type) { - if(cJSON_AddStringToObject(item, "type", get_messages_messages_inner->type) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->sender_name - if(get_messages_messages_inner->sender_name) { - if(cJSON_AddStringToObject(item, "senderName", get_messages_messages_inner->sender_name) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->caption - if(get_messages_messages_inner->caption) { - if(cJSON_AddStringToObject(item, "caption", get_messages_messages_inner->caption) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->quoted_msg_id - if(get_messages_messages_inner->quoted_msg_id) { - if(cJSON_AddStringToObject(item, "quotedMsgId", get_messages_messages_inner->quoted_msg_id) == NULL) { - goto fail; //String - } - } - - - // get_messages_messages_inner->metadata - if(get_messages_messages_inner->metadata) { - cJSON *metadata_object = object_convertToJSON(get_messages_messages_inner->metadata); - if(metadata_object == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_object); - if(item->child == NULL) { - goto fail; - } - } - - - // get_messages_messages_inner->chat_name - if(get_messages_messages_inner->chat_name) { - if(cJSON_AddStringToObject(item, "chatName", get_messages_messages_inner->chat_name) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_messages_messages_inner_t *get_messages_messages_inner_parseFromJSON(cJSON *get_messages_messages_innerJSON){ - - get_messages_messages_inner_t *get_messages_messages_inner_local_var = NULL; - - // get_messages_messages_inner->message_number - cJSON *message_number = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "messageNumber"); - if (message_number) { - if(!cJSON_IsNumber(message_number)) - { - goto end; //Numeric - } - } - - // get_messages_messages_inner->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "id"); - if (id) { - if(!cJSON_IsString(id) && !cJSON_IsNull(id)) - { - goto end; //String - } - } - - // get_messages_messages_inner->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "body"); - if (body) { - if(!cJSON_IsString(body) && !cJSON_IsNull(body)) - { - goto end; //String - } - } - - // get_messages_messages_inner->from_me - cJSON *from_me = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "fromMe"); - if (from_me) { - if(!cJSON_IsBool(from_me)) - { - goto end; //Bool - } - } - - // get_messages_messages_inner->self - cJSON *self = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "self"); - if (self) { - if(!cJSON_IsNumber(self)) - { - goto end; //Numeric - } - } - - // get_messages_messages_inner->is_forwarded - cJSON *is_forwarded = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "isForwarded"); - if (is_forwarded) { - if(!cJSON_IsNumber(is_forwarded)) - { - goto end; //Numeric - } - } - - // get_messages_messages_inner->author - cJSON *author = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "author"); - if (author) { - if(!cJSON_IsString(author) && !cJSON_IsNull(author)) - { - goto end; //String - } - } - - // get_messages_messages_inner->time - cJSON *time = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "time"); - if (time) { - if(!cJSON_IsNumber(time)) - { - goto end; //Numeric - } - } - - // get_messages_messages_inner->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // get_messages_messages_inner->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "type"); - if (type) { - if(!cJSON_IsString(type) && !cJSON_IsNull(type)) - { - goto end; //String - } - } - - // get_messages_messages_inner->sender_name - cJSON *sender_name = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "senderName"); - if (sender_name) { - if(!cJSON_IsString(sender_name) && !cJSON_IsNull(sender_name)) - { - goto end; //String - } - } - - // get_messages_messages_inner->caption - cJSON *caption = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "caption"); - if (caption) { - if(!cJSON_IsString(caption) && !cJSON_IsNull(caption)) - { - goto end; //String - } - } - - // get_messages_messages_inner->quoted_msg_id - cJSON *quoted_msg_id = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "quotedMsgId"); - if (quoted_msg_id) { - if(!cJSON_IsString(quoted_msg_id) && !cJSON_IsNull(quoted_msg_id)) - { - goto end; //String - } - } - - // get_messages_messages_inner->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "metadata"); - object_t *metadata_local_object = NULL; - if (metadata) { - metadata_local_object = object_parseFromJSON(metadata); //object - } - - // get_messages_messages_inner->chat_name - cJSON *chat_name = cJSON_GetObjectItemCaseSensitive(get_messages_messages_innerJSON, "chatName"); - if (chat_name) { - if(!cJSON_IsString(chat_name) && !cJSON_IsNull(chat_name)) - { - goto end; //String - } - } - - - get_messages_messages_inner_local_var = get_messages_messages_inner_create ( - message_number ? message_number->valuedouble : 0, - id && !cJSON_IsNull(id) ? strdup(id->valuestring) : NULL, - body && !cJSON_IsNull(body) ? strdup(body->valuestring) : NULL, - from_me ? from_me->valueint : 0, - self ? self->valuedouble : 0, - is_forwarded ? is_forwarded->valuedouble : 0, - author && !cJSON_IsNull(author) ? strdup(author->valuestring) : NULL, - time ? time->valuedouble : 0, - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL, - sender_name && !cJSON_IsNull(sender_name) ? strdup(sender_name->valuestring) : NULL, - caption && !cJSON_IsNull(caption) ? strdup(caption->valuestring) : NULL, - quoted_msg_id && !cJSON_IsNull(quoted_msg_id) ? strdup(quoted_msg_id->valuestring) : NULL, - metadata ? metadata_local_object : NULL, - chat_name && !cJSON_IsNull(chat_name) ? strdup(chat_name->valuestring) : NULL - ); - - return get_messages_messages_inner_local_var; -end: - return NULL; - -} diff --git a/c/model/get_messages_messages_inner.h b/c/model/get_messages_messages_inner.h deleted file mode 100644 index 43aa152..0000000 --- a/c/model/get_messages_messages_inner.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * get_messages_messages_inner.h - * - * - */ - -#ifndef _get_messages_messages_inner_H_ -#define _get_messages_messages_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_messages_messages_inner_t get_messages_messages_inner_t; - -#include "object.h" - - - -typedef struct get_messages_messages_inner_t { - int message_number; //numeric - char *id; // string - char *body; // string - int from_me; //boolean - int self; //numeric - int is_forwarded; //numeric - char *author; // string - int time; //numeric - char *chat_id; // string - char *type; // string - char *sender_name; // string - char *caption; // string - char *quoted_msg_id; // string - object_t *metadata; //object - char *chat_name; // string - -} get_messages_messages_inner_t; - -get_messages_messages_inner_t *get_messages_messages_inner_create( - int message_number, - char *id, - char *body, - int from_me, - int self, - int is_forwarded, - char *author, - int time, - char *chat_id, - char *type, - char *sender_name, - char *caption, - char *quoted_msg_id, - object_t *metadata, - char *chat_name -); - -void get_messages_messages_inner_free(get_messages_messages_inner_t *get_messages_messages_inner); - -get_messages_messages_inner_t *get_messages_messages_inner_parseFromJSON(cJSON *get_messages_messages_innerJSON); - -cJSON *get_messages_messages_inner_convertToJSON(get_messages_messages_inner_t *get_messages_messages_inner); - -#endif /* _get_messages_messages_inner_H_ */ - diff --git a/c/model/get_templates.c b/c/model/get_templates.c deleted file mode 100644 index bf9fb4f..0000000 --- a/c/model/get_templates.c +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include -#include -#include "get_templates.h" - - - -get_templates_t *get_templates_create( - int total, - list_t *templates - ) { - get_templates_t *get_templates_local_var = malloc(sizeof(get_templates_t)); - if (!get_templates_local_var) { - return NULL; - } - get_templates_local_var->total = total; - get_templates_local_var->templates = templates; - - return get_templates_local_var; -} - - -void get_templates_free(get_templates_t *get_templates) { - if(NULL == get_templates){ - return ; - } - listEntry_t *listEntry; - if (get_templates->templates) { - list_ForEach(listEntry, get_templates->templates) { - get_templates_templates_inner_free(listEntry->data); - } - list_freeList(get_templates->templates); - get_templates->templates = NULL; - } - free(get_templates); -} - -cJSON *get_templates_convertToJSON(get_templates_t *get_templates) { - cJSON *item = cJSON_CreateObject(); - - // get_templates->total - if(get_templates->total) { - if(cJSON_AddNumberToObject(item, "total", get_templates->total) == NULL) { - goto fail; //Numeric - } - } - - - // get_templates->templates - if(get_templates->templates) { - cJSON *templates = cJSON_AddArrayToObject(item, "templates"); - if(templates == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *templatesListEntry; - if (get_templates->templates) { - list_ForEach(templatesListEntry, get_templates->templates) { - cJSON *itemLocal = get_templates_templates_inner_convertToJSON(templatesListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(templates, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_templates_t *get_templates_parseFromJSON(cJSON *get_templatesJSON){ - - get_templates_t *get_templates_local_var = NULL; - - // define the local list for get_templates->templates - list_t *templatesList = NULL; - - // get_templates->total - cJSON *total = cJSON_GetObjectItemCaseSensitive(get_templatesJSON, "total"); - if (total) { - if(!cJSON_IsNumber(total)) - { - goto end; //Numeric - } - } - - // get_templates->templates - cJSON *templates = cJSON_GetObjectItemCaseSensitive(get_templatesJSON, "templates"); - if (templates) { - cJSON *templates_local_nonprimitive = NULL; - if(!cJSON_IsArray(templates)){ - goto end; //nonprimitive container - } - - templatesList = list_createList(); - - cJSON_ArrayForEach(templates_local_nonprimitive,templates ) - { - if(!cJSON_IsObject(templates_local_nonprimitive)){ - goto end; - } - get_templates_templates_inner_t *templatesItem = get_templates_templates_inner_parseFromJSON(templates_local_nonprimitive); - - list_addElement(templatesList, templatesItem); - } - } - - - get_templates_local_var = get_templates_create ( - total ? total->valuedouble : 0, - templates ? templatesList : NULL - ); - - return get_templates_local_var; -end: - if (templatesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, templatesList) { - get_templates_templates_inner_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(templatesList); - templatesList = NULL; - } - return NULL; - -} diff --git a/c/model/get_templates.h b/c/model/get_templates.h deleted file mode 100644 index ae1544b..0000000 --- a/c/model/get_templates.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * get_templates.h - * - * - */ - -#ifndef _get_templates_H_ -#define _get_templates_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_templates_t get_templates_t; - -#include "get_templates_templates_inner.h" - - - -typedef struct get_templates_t { - int total; //numeric - list_t *templates; //nonprimitive container - -} get_templates_t; - -get_templates_t *get_templates_create( - int total, - list_t *templates -); - -void get_templates_free(get_templates_t *get_templates); - -get_templates_t *get_templates_parseFromJSON(cJSON *get_templatesJSON); - -cJSON *get_templates_convertToJSON(get_templates_t *get_templates); - -#endif /* _get_templates_H_ */ - diff --git a/c/model/get_templates_templates_inner.c b/c/model/get_templates_templates_inner.c deleted file mode 100644 index 2babf2c..0000000 --- a/c/model/get_templates_templates_inner.c +++ /dev/null @@ -1,278 +0,0 @@ -#include -#include -#include -#include "get_templates_templates_inner.h" - - -char* categoryget_templates_templates_inner_ToString(one_msg_waba_sdk_get_templates_templates_inner__e category) { - char* categoryArray[] = { "NULL", "MARKETING", "TRANSACTIONAL", "OTP" }; - return categoryArray[category]; -} - -one_msg_waba_sdk_get_templates_templates_inner__e categoryget_templates_templates_inner_FromString(char* category){ - int stringToReturn = 0; - char *categoryArray[] = { "NULL", "MARKETING", "TRANSACTIONAL", "OTP" }; - size_t sizeofArray = sizeof(categoryArray) / sizeof(categoryArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(category, categoryArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} -char* languageget_templates_templates_inner_ToString(one_msg_waba_sdk_get_templates_templates_inner__e language) { - char* languageArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - return languageArray[language]; -} - -one_msg_waba_sdk_get_templates_templates_inner__e languageget_templates_templates_inner_FromString(char* language){ - int stringToReturn = 0; - char *languageArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - size_t sizeofArray = sizeof(languageArray) / sizeof(languageArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(language, languageArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -get_templates_templates_inner_t *get_templates_templates_inner_create( - template_category_prop_t *category, - template_components_prop_t *components, - template_language_prop_t *language, - char *name, - char *_namespace, - char *rejected_reason, - char *status - ) { - get_templates_templates_inner_t *get_templates_templates_inner_local_var = malloc(sizeof(get_templates_templates_inner_t)); - if (!get_templates_templates_inner_local_var) { - return NULL; - } - get_templates_templates_inner_local_var->category = category; - get_templates_templates_inner_local_var->components = components; - get_templates_templates_inner_local_var->language = language; - get_templates_templates_inner_local_var->name = name; - get_templates_templates_inner_local_var->_namespace = _namespace; - get_templates_templates_inner_local_var->rejected_reason = rejected_reason; - get_templates_templates_inner_local_var->status = status; - - return get_templates_templates_inner_local_var; -} - - -void get_templates_templates_inner_free(get_templates_templates_inner_t *get_templates_templates_inner) { - if(NULL == get_templates_templates_inner){ - return ; - } - listEntry_t *listEntry; - if (get_templates_templates_inner->category) { - template_category_prop_free(get_templates_templates_inner->category); - get_templates_templates_inner->category = NULL; - } - if (get_templates_templates_inner->components) { - template_components_prop_free(get_templates_templates_inner->components); - get_templates_templates_inner->components = NULL; - } - if (get_templates_templates_inner->language) { - template_language_prop_free(get_templates_templates_inner->language); - get_templates_templates_inner->language = NULL; - } - if (get_templates_templates_inner->name) { - free(get_templates_templates_inner->name); - get_templates_templates_inner->name = NULL; - } - if (get_templates_templates_inner->_namespace) { - free(get_templates_templates_inner->_namespace); - get_templates_templates_inner->_namespace = NULL; - } - if (get_templates_templates_inner->rejected_reason) { - free(get_templates_templates_inner->rejected_reason); - get_templates_templates_inner->rejected_reason = NULL; - } - if (get_templates_templates_inner->status) { - free(get_templates_templates_inner->status); - get_templates_templates_inner->status = NULL; - } - free(get_templates_templates_inner); -} - -cJSON *get_templates_templates_inner_convertToJSON(get_templates_templates_inner_t *get_templates_templates_inner) { - cJSON *item = cJSON_CreateObject(); - - // get_templates_templates_inner->category - if(get_templates_templates_inner->category != one_msg_waba_sdk_get_templates_templates_inner__NULL) { - cJSON *category_local_JSON = template_category_prop_convertToJSON(get_templates_templates_inner->category); - if(category_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "category", category_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // get_templates_templates_inner->components - if(get_templates_templates_inner->components) { - cJSON *components_local_JSON = template_components_prop_convertToJSON(get_templates_templates_inner->components); - if(components_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "components", components_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // get_templates_templates_inner->language - if(get_templates_templates_inner->language != one_msg_waba_sdk_get_templates_templates_inner__NULL) { - cJSON *language_local_JSON = template_language_prop_convertToJSON(get_templates_templates_inner->language); - if(language_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "language", language_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // get_templates_templates_inner->name - if(get_templates_templates_inner->name) { - if(cJSON_AddStringToObject(item, "name", get_templates_templates_inner->name) == NULL) { - goto fail; //String - } - } - - - // get_templates_templates_inner->_namespace - if(get_templates_templates_inner->_namespace) { - if(cJSON_AddStringToObject(item, "namespace", get_templates_templates_inner->_namespace) == NULL) { - goto fail; //String - } - } - - - // get_templates_templates_inner->rejected_reason - if(get_templates_templates_inner->rejected_reason) { - if(cJSON_AddStringToObject(item, "rejected_reason", get_templates_templates_inner->rejected_reason) == NULL) { - goto fail; //String - } - } - - - // get_templates_templates_inner->status - if(get_templates_templates_inner->status) { - if(cJSON_AddStringToObject(item, "status", get_templates_templates_inner->status) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -get_templates_templates_inner_t *get_templates_templates_inner_parseFromJSON(cJSON *get_templates_templates_innerJSON){ - - get_templates_templates_inner_t *get_templates_templates_inner_local_var = NULL; - - // define the local variable for get_templates_templates_inner->category - template_category_prop_t *category_local_nonprim = NULL; - - // define the local variable for get_templates_templates_inner->components - template_components_prop_t *components_local_nonprim = NULL; - - // define the local variable for get_templates_templates_inner->language - template_language_prop_t *language_local_nonprim = NULL; - - // get_templates_templates_inner->category - cJSON *category = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "category"); - if (category) { - category_local_nonprim = template_category_prop_parseFromJSON(category); //custom - } - - // get_templates_templates_inner->components - cJSON *components = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "components"); - if (components) { - components_local_nonprim = template_components_prop_parseFromJSON(components); //custom - } - - // get_templates_templates_inner->language - cJSON *language = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "language"); - if (language) { - language_local_nonprim = template_language_prop_parseFromJSON(language); //custom - } - - // get_templates_templates_inner->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "name"); - if (name) { - if(!cJSON_IsString(name) && !cJSON_IsNull(name)) - { - goto end; //String - } - } - - // get_templates_templates_inner->_namespace - cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "namespace"); - if (_namespace) { - if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) - { - goto end; //String - } - } - - // get_templates_templates_inner->rejected_reason - cJSON *rejected_reason = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "rejected_reason"); - if (rejected_reason) { - if(!cJSON_IsString(rejected_reason) && !cJSON_IsNull(rejected_reason)) - { - goto end; //String - } - } - - // get_templates_templates_inner->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(get_templates_templates_innerJSON, "status"); - if (status) { - if(!cJSON_IsString(status) && !cJSON_IsNull(status)) - { - goto end; //String - } - } - - - get_templates_templates_inner_local_var = get_templates_templates_inner_create ( - category ? category_local_nonprim : NULL, - components ? components_local_nonprim : NULL, - language ? language_local_nonprim : NULL, - name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, - _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL, - rejected_reason && !cJSON_IsNull(rejected_reason) ? strdup(rejected_reason->valuestring) : NULL, - status && !cJSON_IsNull(status) ? strdup(status->valuestring) : NULL - ); - - return get_templates_templates_inner_local_var; -end: - if (category_local_nonprim) { - template_category_prop_free(category_local_nonprim); - category_local_nonprim = NULL; - } - if (components_local_nonprim) { - template_components_prop_free(components_local_nonprim); - components_local_nonprim = NULL; - } - if (language_local_nonprim) { - template_language_prop_free(language_local_nonprim); - language_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/get_templates_templates_inner.h b/c/model/get_templates_templates_inner.h deleted file mode 100644 index 8d8fdaa..0000000 --- a/c/model/get_templates_templates_inner.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * get_templates_templates_inner.h - * - * - */ - -#ifndef _get_templates_templates_inner_H_ -#define _get_templates_templates_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct get_templates_templates_inner_t get_templates_templates_inner_t; - -#include "template_category_prop.h" -#include "template_components_prop.h" -#include "template_language_prop.h" - -// Enum for get_templates_templates_inner - -typedef enum { one_msg_waba_sdk_get_templates_templates_inner__NULL = 0, one_msg_waba_sdk_get_templates_templates_inner__MARKETING, one_msg_waba_sdk_get_templates_templates_inner__TRANSACTIONAL, one_msg_waba_sdk_get_templates_templates_inner__OTP } one_msg_waba_sdk_get_templates_templates_inner__e; - -char* get_templates_templates_inner_category_ToString(one_msg_waba_sdk_get_templates_templates_inner__e category); - -one_msg_waba_sdk_get_templates_templates_inner__e get_templates_templates_inner_category_FromString(char* category); - -// Enum for get_templates_templates_inner - -typedef enum { one_msg_waba_sdk_get_templates_templates_inner__NULL = 0, one_msg_waba_sdk_get_templates_templates_inner__af, one_msg_waba_sdk_get_templates_templates_inner__sq, one_msg_waba_sdk_get_templates_templates_inner__ar, one_msg_waba_sdk_get_templates_templates_inner__az, one_msg_waba_sdk_get_templates_templates_inner__bn, one_msg_waba_sdk_get_templates_templates_inner__bg, one_msg_waba_sdk_get_templates_templates_inner__ca, one_msg_waba_sdk_get_templates_templates_inner__zh_CN, one_msg_waba_sdk_get_templates_templates_inner__zh_HK, one_msg_waba_sdk_get_templates_templates_inner__zh_TW, one_msg_waba_sdk_get_templates_templates_inner__hr, one_msg_waba_sdk_get_templates_templates_inner__cs, one_msg_waba_sdk_get_templates_templates_inner__da, one_msg_waba_sdk_get_templates_templates_inner__nl, one_msg_waba_sdk_get_templates_templates_inner__en, one_msg_waba_sdk_get_templates_templates_inner__en_GB, one_msg_waba_sdk_get_templates_templates_inner__en_US, one_msg_waba_sdk_get_templates_templates_inner__et, one_msg_waba_sdk_get_templates_templates_inner__fil, one_msg_waba_sdk_get_templates_templates_inner__fi, one_msg_waba_sdk_get_templates_templates_inner__fr, one_msg_waba_sdk_get_templates_templates_inner__de, one_msg_waba_sdk_get_templates_templates_inner__el, one_msg_waba_sdk_get_templates_templates_inner__gu, one_msg_waba_sdk_get_templates_templates_inner__he, one_msg_waba_sdk_get_templates_templates_inner__hi, one_msg_waba_sdk_get_templates_templates_inner__hu, one_msg_waba_sdk_get_templates_templates_inner__id, one_msg_waba_sdk_get_templates_templates_inner__ga, one_msg_waba_sdk_get_templates_templates_inner__it, one_msg_waba_sdk_get_templates_templates_inner__ja, one_msg_waba_sdk_get_templates_templates_inner__kn, one_msg_waba_sdk_get_templates_templates_inner__kk, one_msg_waba_sdk_get_templates_templates_inner__ko, one_msg_waba_sdk_get_templates_templates_inner__lo, one_msg_waba_sdk_get_templates_templates_inner__lv, one_msg_waba_sdk_get_templates_templates_inner__lt, one_msg_waba_sdk_get_templates_templates_inner__mk, one_msg_waba_sdk_get_templates_templates_inner__ms, one_msg_waba_sdk_get_templates_templates_inner__mr, one_msg_waba_sdk_get_templates_templates_inner__nb, one_msg_waba_sdk_get_templates_templates_inner__fa, one_msg_waba_sdk_get_templates_templates_inner__pl, one_msg_waba_sdk_get_templates_templates_inner__pt_BR, one_msg_waba_sdk_get_templates_templates_inner__pt_PT, one_msg_waba_sdk_get_templates_templates_inner__pa, one_msg_waba_sdk_get_templates_templates_inner__ro, one_msg_waba_sdk_get_templates_templates_inner__ru, one_msg_waba_sdk_get_templates_templates_inner__sr, one_msg_waba_sdk_get_templates_templates_inner__sk, one_msg_waba_sdk_get_templates_templates_inner__sl, one_msg_waba_sdk_get_templates_templates_inner__es, one_msg_waba_sdk_get_templates_templates_inner__es_AR, one_msg_waba_sdk_get_templates_templates_inner__es_ES, one_msg_waba_sdk_get_templates_templates_inner__es_MX, one_msg_waba_sdk_get_templates_templates_inner__sw, one_msg_waba_sdk_get_templates_templates_inner__sv, one_msg_waba_sdk_get_templates_templates_inner__ta, one_msg_waba_sdk_get_templates_templates_inner__te, one_msg_waba_sdk_get_templates_templates_inner__th, one_msg_waba_sdk_get_templates_templates_inner__tr, one_msg_waba_sdk_get_templates_templates_inner__uk, one_msg_waba_sdk_get_templates_templates_inner__ur, one_msg_waba_sdk_get_templates_templates_inner__uz, one_msg_waba_sdk_get_templates_templates_inner__vi } one_msg_waba_sdk_get_templates_templates_inner__e; - -char* get_templates_templates_inner_language_ToString(one_msg_waba_sdk_get_templates_templates_inner__e language); - -one_msg_waba_sdk_get_templates_templates_inner__e get_templates_templates_inner_language_FromString(char* language); - - - -typedef struct get_templates_templates_inner_t { - template_category_prop_t *category; // custom - template_components_prop_t *components; // custom - template_language_prop_t *language; // custom - char *name; // string - char *_namespace; // string - char *rejected_reason; // string - char *status; // string - -} get_templates_templates_inner_t; - -get_templates_templates_inner_t *get_templates_templates_inner_create( - template_category_prop_t *category, - template_components_prop_t *components, - template_language_prop_t *language, - char *name, - char *_namespace, - char *rejected_reason, - char *status -); - -void get_templates_templates_inner_free(get_templates_templates_inner_t *get_templates_templates_inner); - -get_templates_templates_inner_t *get_templates_templates_inner_parseFromJSON(cJSON *get_templates_templates_innerJSON); - -cJSON *get_templates_templates_inner_convertToJSON(get_templates_templates_inner_t *get_templates_templates_inner); - -#endif /* _get_templates_templates_inner_H_ */ - diff --git a/c/model/me_components.c b/c/model/me_components.c deleted file mode 100644 index 46e11b6..0000000 --- a/c/model/me_components.c +++ /dev/null @@ -1,233 +0,0 @@ -#include -#include -#include -#include "me_components.h" - - -char* verticalme_components_ToString(one_msg_waba_sdk_me_components_VERTICAL_e vertical) { - char* verticalArray[] = { "NULL", "Automotive", "Beauty, Spa and Salon", "Clothing and Apparel", "Education", "Entertainment", "Event Planning and Service", "Finance and Banking", "Food and Grocery", "Public Service", "Hotel and Lodging", "Medical and Health", "Non-profit", "Professional Services", "Shopping and Retail", "Travel and Transportation", "Restaurant", "Other", "" }; - return verticalArray[vertical]; -} - -one_msg_waba_sdk_me_components_VERTICAL_e verticalme_components_FromString(char* vertical){ - int stringToReturn = 0; - char *verticalArray[] = { "NULL", "Automotive", "Beauty, Spa and Salon", "Clothing and Apparel", "Education", "Entertainment", "Event Planning and Service", "Finance and Banking", "Food and Grocery", "Public Service", "Hotel and Lodging", "Medical and Health", "Non-profit", "Professional Services", "Shopping and Retail", "Travel and Transportation", "Restaurant", "Other", "" }; - size_t sizeofArray = sizeof(verticalArray) / sizeof(verticalArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(vertical, verticalArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -me_components_t *me_components_create( - char *about, - char *address, - char *description, - char *email, - char *phone, - one_msg_waba_sdk_me_components_VERTICAL_e vertical, - char *photo - ) { - me_components_t *me_components_local_var = malloc(sizeof(me_components_t)); - if (!me_components_local_var) { - return NULL; - } - me_components_local_var->about = about; - me_components_local_var->address = address; - me_components_local_var->description = description; - me_components_local_var->email = email; - me_components_local_var->phone = phone; - me_components_local_var->vertical = vertical; - me_components_local_var->photo = photo; - - return me_components_local_var; -} - - -void me_components_free(me_components_t *me_components) { - if(NULL == me_components){ - return ; - } - listEntry_t *listEntry; - if (me_components->about) { - free(me_components->about); - me_components->about = NULL; - } - if (me_components->address) { - free(me_components->address); - me_components->address = NULL; - } - if (me_components->description) { - free(me_components->description); - me_components->description = NULL; - } - if (me_components->email) { - free(me_components->email); - me_components->email = NULL; - } - if (me_components->phone) { - free(me_components->phone); - me_components->phone = NULL; - } - if (me_components->photo) { - free(me_components->photo); - me_components->photo = NULL; - } - free(me_components); -} - -cJSON *me_components_convertToJSON(me_components_t *me_components) { - cJSON *item = cJSON_CreateObject(); - - // me_components->about - if(me_components->about) { - if(cJSON_AddStringToObject(item, "about", me_components->about) == NULL) { - goto fail; //String - } - } - - - // me_components->address - if(me_components->address) { - if(cJSON_AddStringToObject(item, "address", me_components->address) == NULL) { - goto fail; //String - } - } - - - // me_components->description - if(me_components->description) { - if(cJSON_AddStringToObject(item, "description", me_components->description) == NULL) { - goto fail; //String - } - } - - - // me_components->email - if(me_components->email) { - if(cJSON_AddStringToObject(item, "email", me_components->email) == NULL) { - goto fail; //String - } - } - - - // me_components->phone - if(me_components->phone) { - if(cJSON_AddStringToObject(item, "phone", me_components->phone) == NULL) { - goto fail; //String - } - } - - - // me_components->vertical - if(me_components->vertical != one_msg_waba_sdk_me_components_VERTICAL_NULL) { - if(cJSON_AddStringToObject(item, "vertical", verticalme_components_ToString(me_components->vertical)) == NULL) - { - goto fail; //Enum - } - } - - - // me_components->photo - if(me_components->photo) { - if(cJSON_AddStringToObject(item, "photo", me_components->photo) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -me_components_t *me_components_parseFromJSON(cJSON *me_componentsJSON){ - - me_components_t *me_components_local_var = NULL; - - // me_components->about - cJSON *about = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "about"); - if (about) { - if(!cJSON_IsString(about) && !cJSON_IsNull(about)) - { - goto end; //String - } - } - - // me_components->address - cJSON *address = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "address"); - if (address) { - if(!cJSON_IsString(address) && !cJSON_IsNull(address)) - { - goto end; //String - } - } - - // me_components->description - cJSON *description = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "description"); - if (description) { - if(!cJSON_IsString(description) && !cJSON_IsNull(description)) - { - goto end; //String - } - } - - // me_components->email - cJSON *email = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "email"); - if (email) { - if(!cJSON_IsString(email) && !cJSON_IsNull(email)) - { - goto end; //String - } - } - - // me_components->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "phone"); - if (phone) { - if(!cJSON_IsString(phone) && !cJSON_IsNull(phone)) - { - goto end; //String - } - } - - // me_components->vertical - cJSON *vertical = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "vertical"); - one_msg_waba_sdk_me_components_VERTICAL_e verticalVariable; - if (vertical) { - if(!cJSON_IsString(vertical)) - { - goto end; //Enum - } - verticalVariable = verticalme_components_FromString(vertical->valuestring); - } - - // me_components->photo - cJSON *photo = cJSON_GetObjectItemCaseSensitive(me_componentsJSON, "photo"); - if (photo) { - if(!cJSON_IsString(photo) && !cJSON_IsNull(photo)) - { - goto end; //String - } - } - - - me_components_local_var = me_components_create ( - about && !cJSON_IsNull(about) ? strdup(about->valuestring) : NULL, - address && !cJSON_IsNull(address) ? strdup(address->valuestring) : NULL, - description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL, - email && !cJSON_IsNull(email) ? strdup(email->valuestring) : NULL, - phone && !cJSON_IsNull(phone) ? strdup(phone->valuestring) : NULL, - vertical ? verticalVariable : -1, - photo && !cJSON_IsNull(photo) ? strdup(photo->valuestring) : NULL - ); - - return me_components_local_var; -end: - return NULL; - -} diff --git a/c/model/me_components.h b/c/model/me_components.h deleted file mode 100644 index 9fccbc2..0000000 --- a/c/model/me_components.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * me_components.h - * - * - */ - -#ifndef _me_components_H_ -#define _me_components_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct me_components_t me_components_t; - - -// Enum VERTICAL for me_components - -typedef enum { one_msg_waba_sdk_me_components_VERTICAL_NULL = 0, one_msg_waba_sdk_me_components_VERTICAL_Automotive, one_msg_waba_sdk_me_components_VERTICAL_Beauty, Spa and Salon, one_msg_waba_sdk_me_components_VERTICAL_Clothing and Apparel, one_msg_waba_sdk_me_components_VERTICAL_Education, one_msg_waba_sdk_me_components_VERTICAL_Entertainment, one_msg_waba_sdk_me_components_VERTICAL_Event Planning and Service, one_msg_waba_sdk_me_components_VERTICAL_Finance and Banking, one_msg_waba_sdk_me_components_VERTICAL_Food and Grocery, one_msg_waba_sdk_me_components_VERTICAL_Public Service, one_msg_waba_sdk_me_components_VERTICAL_Hotel and Lodging, one_msg_waba_sdk_me_components_VERTICAL_Medical and Health, one_msg_waba_sdk_me_components_VERTICAL_Non_profit, one_msg_waba_sdk_me_components_VERTICAL_Professional Services, one_msg_waba_sdk_me_components_VERTICAL_Shopping and Retail, one_msg_waba_sdk_me_components_VERTICAL_Travel and Transportation, one_msg_waba_sdk_me_components_VERTICAL_Restaurant, one_msg_waba_sdk_me_components_VERTICAL_Other, one_msg_waba_sdk_me_components_VERTICAL_ } one_msg_waba_sdk_me_components_VERTICAL_e; - -char* me_components_vertical_ToString(one_msg_waba_sdk_me_components_VERTICAL_e vertical); - -one_msg_waba_sdk_me_components_VERTICAL_e me_components_vertical_FromString(char* vertical); - - - -typedef struct me_components_t { - char *about; // string - char *address; // string - char *description; // string - char *email; // string - char *phone; // string - one_msg_waba_sdk_me_components_VERTICAL_e vertical; //enum - char *photo; // string - -} me_components_t; - -me_components_t *me_components_create( - char *about, - char *address, - char *description, - char *email, - char *phone, - one_msg_waba_sdk_me_components_VERTICAL_e vertical, - char *photo -); - -void me_components_free(me_components_t *me_components); - -me_components_t *me_components_parseFromJSON(cJSON *me_componentsJSON); - -cJSON *me_components_convertToJSON(me_components_t *me_components); - -#endif /* _me_components_H_ */ - diff --git a/c/model/media_id.c b/c/model/media_id.c deleted file mode 100644 index 543ee81..0000000 --- a/c/model/media_id.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "media_id.h" - - - -media_id_t *media_id_create( - char *media_id - ) { - media_id_t *media_id_local_var = malloc(sizeof(media_id_t)); - if (!media_id_local_var) { - return NULL; - } - media_id_local_var->media_id = media_id; - - return media_id_local_var; -} - - -void media_id_free(media_id_t *media_id) { - if(NULL == media_id){ - return ; - } - listEntry_t *listEntry; - if (media_id->media_id) { - free(media_id->media_id); - media_id->media_id = NULL; - } - free(media_id); -} - -cJSON *media_id_convertToJSON(media_id_t *media_id) { - cJSON *item = cJSON_CreateObject(); - - // media_id->media_id - if(media_id->media_id) { - if(cJSON_AddStringToObject(item, "mediaId", media_id->media_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -media_id_t *media_id_parseFromJSON(cJSON *media_idJSON){ - - media_id_t *media_id_local_var = NULL; - - // media_id->media_id - cJSON *media_id = cJSON_GetObjectItemCaseSensitive(media_idJSON, "mediaId"); - if (media_id) { - if(!cJSON_IsString(media_id) && !cJSON_IsNull(media_id)) - { - goto end; //String - } - } - - - media_id_local_var = media_id_create ( - media_id && !cJSON_IsNull(media_id) ? strdup(media_id->valuestring) : NULL - ); - - return media_id_local_var; -end: - return NULL; - -} diff --git a/c/model/media_id.h b/c/model/media_id.h deleted file mode 100644 index 489e715..0000000 --- a/c/model/media_id.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * media_id.h - * - * - */ - -#ifndef _media_id_H_ -#define _media_id_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct media_id_t media_id_t; - - - - -typedef struct media_id_t { - char *media_id; // string - -} media_id_t; - -media_id_t *media_id_create( - char *media_id -); - -void media_id_free(media_id_t *media_id); - -media_id_t *media_id_parseFromJSON(cJSON *media_idJSON); - -cJSON *media_id_convertToJSON(media_id_t *media_id); - -#endif /* _media_id_H_ */ - diff --git a/c/model/message.c b/c/model/message.c deleted file mode 100644 index ee96bc4..0000000 --- a/c/model/message.c +++ /dev/null @@ -1,337 +0,0 @@ -#include -#include -#include -#include "message.h" - - -char* typemessage_ToString(one_msg_waba_sdk_message_TYPE_e type) { - char* typeArray[] = { "NULL", "chat", "interactive", "image", "video", "document", "audio", "sticker", "voice" }; - return typeArray[type]; -} - -one_msg_waba_sdk_message_TYPE_e typemessage_FromString(char* type){ - int stringToReturn = 0; - char *typeArray[] = { "NULL", "chat", "interactive", "image", "video", "document", "audio", "sticker", "voice" }; - size_t sizeofArray = sizeof(typeArray) / sizeof(typeArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(type, typeArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -message_t *message_create( - char *id, - char *body, - int from_me, - int self, - int is_forwarded, - char *author, - int time, - char *chat_id, - one_msg_waba_sdk_message_TYPE_e type, - char *sender_name, - char *caption, - char *quoted_msg_id - ) { - message_t *message_local_var = malloc(sizeof(message_t)); - if (!message_local_var) { - return NULL; - } - message_local_var->id = id; - message_local_var->body = body; - message_local_var->from_me = from_me; - message_local_var->self = self; - message_local_var->is_forwarded = is_forwarded; - message_local_var->author = author; - message_local_var->time = time; - message_local_var->chat_id = chat_id; - message_local_var->type = type; - message_local_var->sender_name = sender_name; - message_local_var->caption = caption; - message_local_var->quoted_msg_id = quoted_msg_id; - - return message_local_var; -} - - -void message_free(message_t *message) { - if(NULL == message){ - return ; - } - listEntry_t *listEntry; - if (message->id) { - free(message->id); - message->id = NULL; - } - if (message->body) { - free(message->body); - message->body = NULL; - } - if (message->author) { - free(message->author); - message->author = NULL; - } - if (message->chat_id) { - free(message->chat_id); - message->chat_id = NULL; - } - if (message->sender_name) { - free(message->sender_name); - message->sender_name = NULL; - } - if (message->caption) { - free(message->caption); - message->caption = NULL; - } - if (message->quoted_msg_id) { - free(message->quoted_msg_id); - message->quoted_msg_id = NULL; - } - free(message); -} - -cJSON *message_convertToJSON(message_t *message) { - cJSON *item = cJSON_CreateObject(); - - // message->id - if(message->id) { - if(cJSON_AddStringToObject(item, "id", message->id) == NULL) { - goto fail; //String - } - } - - - // message->body - if(message->body) { - if(cJSON_AddStringToObject(item, "body", message->body) == NULL) { - goto fail; //String - } - } - - - // message->from_me - if(message->from_me) { - if(cJSON_AddBoolToObject(item, "fromMe", message->from_me) == NULL) { - goto fail; //Bool - } - } - - - // message->self - if(message->self) { - if(cJSON_AddNumberToObject(item, "self", message->self) == NULL) { - goto fail; //Numeric - } - } - - - // message->is_forwarded - if(message->is_forwarded) { - if(cJSON_AddBoolToObject(item, "isForwarded", message->is_forwarded) == NULL) { - goto fail; //Bool - } - } - - - // message->author - if(message->author) { - if(cJSON_AddStringToObject(item, "author", message->author) == NULL) { - goto fail; //String - } - } - - - // message->time - if(message->time) { - if(cJSON_AddNumberToObject(item, "time", message->time) == NULL) { - goto fail; //Numeric - } - } - - - // message->chat_id - if(message->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", message->chat_id) == NULL) { - goto fail; //String - } - } - - - // message->type - if(message->type != one_msg_waba_sdk_message_TYPE_NULL) { - if(cJSON_AddStringToObject(item, "type", typemessage_ToString(message->type)) == NULL) - { - goto fail; //Enum - } - } - - - // message->sender_name - if(message->sender_name) { - if(cJSON_AddStringToObject(item, "senderName", message->sender_name) == NULL) { - goto fail; //String - } - } - - - // message->caption - if(message->caption) { - if(cJSON_AddStringToObject(item, "caption", message->caption) == NULL) { - goto fail; //String - } - } - - - // message->quoted_msg_id - if(message->quoted_msg_id) { - if(cJSON_AddStringToObject(item, "quotedMsgId", message->quoted_msg_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -message_t *message_parseFromJSON(cJSON *messageJSON){ - - message_t *message_local_var = NULL; - - // message->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(messageJSON, "id"); - if (id) { - if(!cJSON_IsString(id) && !cJSON_IsNull(id)) - { - goto end; //String - } - } - - // message->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(messageJSON, "body"); - if (body) { - if(!cJSON_IsString(body) && !cJSON_IsNull(body)) - { - goto end; //String - } - } - - // message->from_me - cJSON *from_me = cJSON_GetObjectItemCaseSensitive(messageJSON, "fromMe"); - if (from_me) { - if(!cJSON_IsBool(from_me)) - { - goto end; //Bool - } - } - - // message->self - cJSON *self = cJSON_GetObjectItemCaseSensitive(messageJSON, "self"); - if (self) { - if(!cJSON_IsNumber(self)) - { - goto end; //Numeric - } - } - - // message->is_forwarded - cJSON *is_forwarded = cJSON_GetObjectItemCaseSensitive(messageJSON, "isForwarded"); - if (is_forwarded) { - if(!cJSON_IsBool(is_forwarded)) - { - goto end; //Bool - } - } - - // message->author - cJSON *author = cJSON_GetObjectItemCaseSensitive(messageJSON, "author"); - if (author) { - if(!cJSON_IsString(author) && !cJSON_IsNull(author)) - { - goto end; //String - } - } - - // message->time - cJSON *time = cJSON_GetObjectItemCaseSensitive(messageJSON, "time"); - if (time) { - if(!cJSON_IsNumber(time)) - { - goto end; //Numeric - } - } - - // message->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(messageJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // message->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(messageJSON, "type"); - one_msg_waba_sdk_message_TYPE_e typeVariable; - if (type) { - if(!cJSON_IsString(type)) - { - goto end; //Enum - } - typeVariable = typemessage_FromString(type->valuestring); - } - - // message->sender_name - cJSON *sender_name = cJSON_GetObjectItemCaseSensitive(messageJSON, "senderName"); - if (sender_name) { - if(!cJSON_IsString(sender_name) && !cJSON_IsNull(sender_name)) - { - goto end; //String - } - } - - // message->caption - cJSON *caption = cJSON_GetObjectItemCaseSensitive(messageJSON, "caption"); - if (caption) { - if(!cJSON_IsString(caption) && !cJSON_IsNull(caption)) - { - goto end; //String - } - } - - // message->quoted_msg_id - cJSON *quoted_msg_id = cJSON_GetObjectItemCaseSensitive(messageJSON, "quotedMsgId"); - if (quoted_msg_id) { - if(!cJSON_IsString(quoted_msg_id) && !cJSON_IsNull(quoted_msg_id)) - { - goto end; //String - } - } - - - message_local_var = message_create ( - id && !cJSON_IsNull(id) ? strdup(id->valuestring) : NULL, - body && !cJSON_IsNull(body) ? strdup(body->valuestring) : NULL, - from_me ? from_me->valueint : 0, - self ? self->valuedouble : 0, - is_forwarded ? is_forwarded->valueint : 0, - author && !cJSON_IsNull(author) ? strdup(author->valuestring) : NULL, - time ? time->valuedouble : 0, - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - type ? typeVariable : -1, - sender_name && !cJSON_IsNull(sender_name) ? strdup(sender_name->valuestring) : NULL, - caption && !cJSON_IsNull(caption) ? strdup(caption->valuestring) : NULL, - quoted_msg_id && !cJSON_IsNull(quoted_msg_id) ? strdup(quoted_msg_id->valuestring) : NULL - ); - - return message_local_var; -end: - return NULL; - -} diff --git a/c/model/message.h b/c/model/message.h deleted file mode 100644 index 6c0c057..0000000 --- a/c/model/message.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * message.h - * - * - */ - -#ifndef _message_H_ -#define _message_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct message_t message_t; - - -// Enum TYPE for message - -typedef enum { one_msg_waba_sdk_message_TYPE_NULL = 0, one_msg_waba_sdk_message_TYPE_chat, one_msg_waba_sdk_message_TYPE_interactive, one_msg_waba_sdk_message_TYPE_image, one_msg_waba_sdk_message_TYPE_video, one_msg_waba_sdk_message_TYPE_document, one_msg_waba_sdk_message_TYPE_audio, one_msg_waba_sdk_message_TYPE_sticker, one_msg_waba_sdk_message_TYPE_voice } one_msg_waba_sdk_message_TYPE_e; - -char* message_type_ToString(one_msg_waba_sdk_message_TYPE_e type); - -one_msg_waba_sdk_message_TYPE_e message_type_FromString(char* type); - - - -typedef struct message_t { - char *id; // string - char *body; // string - int from_me; //boolean - int self; //numeric - int is_forwarded; //boolean - char *author; // string - int time; //numeric - char *chat_id; // string - one_msg_waba_sdk_message_TYPE_e type; //enum - char *sender_name; // string - char *caption; // string - char *quoted_msg_id; // string - -} message_t; - -message_t *message_create( - char *id, - char *body, - int from_me, - int self, - int is_forwarded, - char *author, - int time, - char *chat_id, - one_msg_waba_sdk_message_TYPE_e type, - char *sender_name, - char *caption, - char *quoted_msg_id -); - -void message_free(message_t *message); - -message_t *message_parseFromJSON(cJSON *messageJSON); - -cJSON *message_convertToJSON(message_t *message); - -#endif /* _message_H_ */ - diff --git a/c/model/message_id_prop.c b/c/model/message_id_prop.c deleted file mode 100644 index 8aefbf3..0000000 --- a/c/model/message_id_prop.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "message_id_prop.h" - - - -message_id_prop_t *message_id_prop_create( - char *message_id - ) { - message_id_prop_t *message_id_prop_local_var = malloc(sizeof(message_id_prop_t)); - if (!message_id_prop_local_var) { - return NULL; - } - message_id_prop_local_var->message_id = message_id; - - return message_id_prop_local_var; -} - - -void message_id_prop_free(message_id_prop_t *message_id_prop) { - if(NULL == message_id_prop){ - return ; - } - listEntry_t *listEntry; - if (message_id_prop->message_id) { - free(message_id_prop->message_id); - message_id_prop->message_id = NULL; - } - free(message_id_prop); -} - -cJSON *message_id_prop_convertToJSON(message_id_prop_t *message_id_prop) { - cJSON *item = cJSON_CreateObject(); - - // message_id_prop->message_id - if(message_id_prop->message_id) { - if(cJSON_AddStringToObject(item, "messageId", message_id_prop->message_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -message_id_prop_t *message_id_prop_parseFromJSON(cJSON *message_id_propJSON){ - - message_id_prop_t *message_id_prop_local_var = NULL; - - // message_id_prop->message_id - cJSON *message_id = cJSON_GetObjectItemCaseSensitive(message_id_propJSON, "messageId"); - if (message_id) { - if(!cJSON_IsString(message_id) && !cJSON_IsNull(message_id)) - { - goto end; //String - } - } - - - message_id_prop_local_var = message_id_prop_create ( - message_id && !cJSON_IsNull(message_id) ? strdup(message_id->valuestring) : NULL - ); - - return message_id_prop_local_var; -end: - return NULL; - -} diff --git a/c/model/message_id_prop.h b/c/model/message_id_prop.h deleted file mode 100644 index 9e8cdb0..0000000 --- a/c/model/message_id_prop.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * message_id_prop.h - * - * - */ - -#ifndef _message_id_prop_H_ -#define _message_id_prop_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct message_id_prop_t message_id_prop_t; - - - - -typedef struct message_id_prop_t { - char *message_id; // string - -} message_id_prop_t; - -message_id_prop_t *message_id_prop_create( - char *message_id -); - -void message_id_prop_free(message_id_prop_t *message_id_prop); - -message_id_prop_t *message_id_prop_parseFromJSON(cJSON *message_id_propJSON); - -cJSON *message_id_prop_convertToJSON(message_id_prop_t *message_id_prop); - -#endif /* _message_id_prop_H_ */ - diff --git a/c/model/object.c b/c/model/object.c deleted file mode 100644 index ff293bc..0000000 --- a/c/model/object.c +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include -#include -#include "object.h" - -object_t *object_create() { - object_t *object = calloc(1, sizeof(object_t)); - - return object; -} - -void object_free(object_t *object) { - if (!object) { - return ; - } - - if (object->temporary) { - free(object->temporary); - object->temporary = NULL; - } - - free (object); -} - -cJSON *object_convertToJSON(object_t *object) { - if (!object) { - return NULL; - } - - if (!object->temporary) { - return cJSON_Parse("null"); - } - - return cJSON_Parse(object->temporary); -} - -object_t *object_parseFromJSON(cJSON *json){ - if (!json) { - goto end; - } - - object_t *object = object_create(); - if (!object) { - goto end; - } - object->temporary = cJSON_Print(json); - return object; - -end: - return NULL; -} diff --git a/c/model/object.h b/c/model/object.h deleted file mode 100644 index 35bfeb6..0000000 --- a/c/model/object.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * object.h - */ - -#ifndef _object_H_ -#define _object_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - - -typedef struct object_t { - void *temporary; -} object_t; - -object_t *object_create(); - -void object_free(object_t *object); - -object_t *object_parseFromJSON(cJSON *json); - -cJSON *object_convertToJSON(object_t *object); - -#endif /* _object_H_ */ diff --git a/c/model/phone_prop.c b/c/model/phone_prop.c deleted file mode 100644 index d3f5204..0000000 --- a/c/model/phone_prop.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include -#include -#include "phone_prop.h" - - - -phone_prop_t *phone_prop_create( - int phone - ) { - phone_prop_t *phone_prop_local_var = malloc(sizeof(phone_prop_t)); - if (!phone_prop_local_var) { - return NULL; - } - phone_prop_local_var->phone = phone; - - return phone_prop_local_var; -} - - -void phone_prop_free(phone_prop_t *phone_prop) { - if(NULL == phone_prop){ - return ; - } - listEntry_t *listEntry; - free(phone_prop); -} - -cJSON *phone_prop_convertToJSON(phone_prop_t *phone_prop) { - cJSON *item = cJSON_CreateObject(); - - // phone_prop->phone - if(phone_prop->phone) { - if(cJSON_AddNumberToObject(item, "phone", phone_prop->phone) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -phone_prop_t *phone_prop_parseFromJSON(cJSON *phone_propJSON){ - - phone_prop_t *phone_prop_local_var = NULL; - - // phone_prop->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(phone_propJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - - phone_prop_local_var = phone_prop_create ( - phone ? phone->valuedouble : 0 - ); - - return phone_prop_local_var; -end: - return NULL; - -} diff --git a/c/model/phone_prop.h b/c/model/phone_prop.h deleted file mode 100644 index ea030d6..0000000 --- a/c/model/phone_prop.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * phone_prop.h - * - * - */ - -#ifndef _phone_prop_H_ -#define _phone_prop_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct phone_prop_t phone_prop_t; - - - - -typedef struct phone_prop_t { - int phone; //numeric - -} phone_prop_t; - -phone_prop_t *phone_prop_create( - int phone -); - -void phone_prop_free(phone_prop_t *phone_prop); - -phone_prop_t *phone_prop_parseFromJSON(cJSON *phone_propJSON); - -cJSON *phone_prop_convertToJSON(phone_prop_t *phone_prop); - -#endif /* _phone_prop_H_ */ - diff --git a/c/model/read_message_request.c b/c/model/read_message_request.c deleted file mode 100644 index 4e67bbb..0000000 --- a/c/model/read_message_request.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "read_message_request.h" - - - -read_message_request_t *read_message_request_create( - char *message_id - ) { - read_message_request_t *read_message_request_local_var = malloc(sizeof(read_message_request_t)); - if (!read_message_request_local_var) { - return NULL; - } - read_message_request_local_var->message_id = message_id; - - return read_message_request_local_var; -} - - -void read_message_request_free(read_message_request_t *read_message_request) { - if(NULL == read_message_request){ - return ; - } - listEntry_t *listEntry; - if (read_message_request->message_id) { - free(read_message_request->message_id); - read_message_request->message_id = NULL; - } - free(read_message_request); -} - -cJSON *read_message_request_convertToJSON(read_message_request_t *read_message_request) { - cJSON *item = cJSON_CreateObject(); - - // read_message_request->message_id - if(read_message_request->message_id) { - if(cJSON_AddStringToObject(item, "messageId", read_message_request->message_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -read_message_request_t *read_message_request_parseFromJSON(cJSON *read_message_requestJSON){ - - read_message_request_t *read_message_request_local_var = NULL; - - // read_message_request->message_id - cJSON *message_id = cJSON_GetObjectItemCaseSensitive(read_message_requestJSON, "messageId"); - if (message_id) { - if(!cJSON_IsString(message_id) && !cJSON_IsNull(message_id)) - { - goto end; //String - } - } - - - read_message_request_local_var = read_message_request_create ( - message_id && !cJSON_IsNull(message_id) ? strdup(message_id->valuestring) : NULL - ); - - return read_message_request_local_var; -end: - return NULL; - -} diff --git a/c/model/read_message_request.h b/c/model/read_message_request.h deleted file mode 100644 index fbe8d3d..0000000 --- a/c/model/read_message_request.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * read_message_request.h - * - * - */ - -#ifndef _read_message_request_H_ -#define _read_message_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct read_message_request_t read_message_request_t; - - - - -typedef struct read_message_request_t { - char *message_id; // string - -} read_message_request_t; - -read_message_request_t *read_message_request_create( - char *message_id -); - -void read_message_request_free(read_message_request_t *read_message_request); - -read_message_request_t *read_message_request_parseFromJSON(cJSON *read_message_requestJSON); - -cJSON *read_message_request_convertToJSON(read_message_request_t *read_message_request); - -#endif /* _read_message_request_H_ */ - diff --git a/c/model/remove_template_request.c b/c/model/remove_template_request.c deleted file mode 100644 index d6be47f..0000000 --- a/c/model/remove_template_request.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "remove_template_request.h" - - - -remove_template_request_t *remove_template_request_create( - char *name - ) { - remove_template_request_t *remove_template_request_local_var = malloc(sizeof(remove_template_request_t)); - if (!remove_template_request_local_var) { - return NULL; - } - remove_template_request_local_var->name = name; - - return remove_template_request_local_var; -} - - -void remove_template_request_free(remove_template_request_t *remove_template_request) { - if(NULL == remove_template_request){ - return ; - } - listEntry_t *listEntry; - if (remove_template_request->name) { - free(remove_template_request->name); - remove_template_request->name = NULL; - } - free(remove_template_request); -} - -cJSON *remove_template_request_convertToJSON(remove_template_request_t *remove_template_request) { - cJSON *item = cJSON_CreateObject(); - - // remove_template_request->name - if(remove_template_request->name) { - if(cJSON_AddStringToObject(item, "name", remove_template_request->name) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -remove_template_request_t *remove_template_request_parseFromJSON(cJSON *remove_template_requestJSON){ - - remove_template_request_t *remove_template_request_local_var = NULL; - - // remove_template_request->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(remove_template_requestJSON, "name"); - if (name) { - if(!cJSON_IsString(name) && !cJSON_IsNull(name)) - { - goto end; //String - } - } - - - remove_template_request_local_var = remove_template_request_create ( - name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL - ); - - return remove_template_request_local_var; -end: - return NULL; - -} diff --git a/c/model/remove_template_request.h b/c/model/remove_template_request.h deleted file mode 100644 index 0242550..0000000 --- a/c/model/remove_template_request.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * remove_template_request.h - * - * - */ - -#ifndef _remove_template_request_H_ -#define _remove_template_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct remove_template_request_t remove_template_request_t; - - - - -typedef struct remove_template_request_t { - char *name; // string - -} remove_template_request_t; - -remove_template_request_t *remove_template_request_create( - char *name -); - -void remove_template_request_free(remove_template_request_t *remove_template_request); - -remove_template_request_t *remove_template_request_parseFromJSON(cJSON *remove_template_requestJSON); - -cJSON *remove_template_request_convertToJSON(remove_template_request_t *remove_template_request); - -#endif /* _remove_template_request_H_ */ - diff --git a/c/model/send_contact_request.c b/c/model/send_contact_request.c deleted file mode 100644 index 974caea..0000000 --- a/c/model/send_contact_request.c +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include -#include -#include "send_contact_request.h" - - - -send_contact_request_t *send_contact_request_create( - char *chat_id, - int phone, - list_t *contacts - ) { - send_contact_request_t *send_contact_request_local_var = malloc(sizeof(send_contact_request_t)); - if (!send_contact_request_local_var) { - return NULL; - } - send_contact_request_local_var->chat_id = chat_id; - send_contact_request_local_var->phone = phone; - send_contact_request_local_var->contacts = contacts; - - return send_contact_request_local_var; -} - - -void send_contact_request_free(send_contact_request_t *send_contact_request) { - if(NULL == send_contact_request){ - return ; - } - listEntry_t *listEntry; - if (send_contact_request->chat_id) { - free(send_contact_request->chat_id); - send_contact_request->chat_id = NULL; - } - if (send_contact_request->contacts) { - list_ForEach(listEntry, send_contact_request->contacts) { - object_free(listEntry->data); - } - list_freeList(send_contact_request->contacts); - send_contact_request->contacts = NULL; - } - free(send_contact_request); -} - -cJSON *send_contact_request_convertToJSON(send_contact_request_t *send_contact_request) { - cJSON *item = cJSON_CreateObject(); - - // send_contact_request->chat_id - if(send_contact_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_contact_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_contact_request->phone - if(send_contact_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_contact_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_contact_request->contacts - if(send_contact_request->contacts) { - cJSON *contacts = cJSON_AddArrayToObject(item, "contacts"); - if(contacts == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *contactsListEntry; - if (send_contact_request->contacts) { - list_ForEach(contactsListEntry, send_contact_request->contacts) { - cJSON *itemLocal = object_convertToJSON(contactsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(contacts, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_contact_request_t *send_contact_request_parseFromJSON(cJSON *send_contact_requestJSON){ - - send_contact_request_t *send_contact_request_local_var = NULL; - - // define the local list for send_contact_request->contacts - list_t *contactsList = NULL; - - // send_contact_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_contact_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_contact_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_contact_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_contact_request->contacts - cJSON *contacts = cJSON_GetObjectItemCaseSensitive(send_contact_requestJSON, "contacts"); - if (contacts) { - cJSON *contacts_local_nonprimitive = NULL; - if(!cJSON_IsArray(contacts)){ - goto end; //nonprimitive container - } - - contactsList = list_createList(); - - cJSON_ArrayForEach(contacts_local_nonprimitive,contacts ) - { - if(!cJSON_IsObject(contacts_local_nonprimitive)){ - goto end; - } - object_t *contactsItem = object_parseFromJSON(contacts_local_nonprimitive); - - list_addElement(contactsList, contactsItem); - } - } - - - send_contact_request_local_var = send_contact_request_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - contacts ? contactsList : NULL - ); - - return send_contact_request_local_var; -end: - if (contactsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, contactsList) { - object_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(contactsList); - contactsList = NULL; - } - return NULL; - -} diff --git a/c/model/send_contact_request.h b/c/model/send_contact_request.h deleted file mode 100644 index c9367ec..0000000 --- a/c/model/send_contact_request.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * send_contact_request.h - * - * - */ - -#ifndef _send_contact_request_H_ -#define _send_contact_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_contact_request_t send_contact_request_t; - -#include "object.h" - - - -typedef struct send_contact_request_t { - char *chat_id; // string - int phone; //numeric - list_t *contacts; //nonprimitive container - -} send_contact_request_t; - -send_contact_request_t *send_contact_request_create( - char *chat_id, - int phone, - list_t *contacts -); - -void send_contact_request_free(send_contact_request_t *send_contact_request); - -send_contact_request_t *send_contact_request_parseFromJSON(cJSON *send_contact_requestJSON); - -cJSON *send_contact_request_convertToJSON(send_contact_request_t *send_contact_request); - -#endif /* _send_contact_request_H_ */ - diff --git a/c/model/send_file_request.c b/c/model/send_file_request.c deleted file mode 100644 index f12b95c..0000000 --- a/c/model/send_file_request.c +++ /dev/null @@ -1,173 +0,0 @@ -#include -#include -#include -#include "send_file_request.h" - - - -send_file_request_t *send_file_request_create( - char *chat_id, - int phone, - char *body, - char *filename, - char *caption - ) { - send_file_request_t *send_file_request_local_var = malloc(sizeof(send_file_request_t)); - if (!send_file_request_local_var) { - return NULL; - } - send_file_request_local_var->chat_id = chat_id; - send_file_request_local_var->phone = phone; - send_file_request_local_var->body = body; - send_file_request_local_var->filename = filename; - send_file_request_local_var->caption = caption; - - return send_file_request_local_var; -} - - -void send_file_request_free(send_file_request_t *send_file_request) { - if(NULL == send_file_request){ - return ; - } - listEntry_t *listEntry; - if (send_file_request->chat_id) { - free(send_file_request->chat_id); - send_file_request->chat_id = NULL; - } - if (send_file_request->body) { - free(send_file_request->body); - send_file_request->body = NULL; - } - if (send_file_request->filename) { - free(send_file_request->filename); - send_file_request->filename = NULL; - } - if (send_file_request->caption) { - free(send_file_request->caption); - send_file_request->caption = NULL; - } - free(send_file_request); -} - -cJSON *send_file_request_convertToJSON(send_file_request_t *send_file_request) { - cJSON *item = cJSON_CreateObject(); - - // send_file_request->chat_id - if(send_file_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_file_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_file_request->phone - if(send_file_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_file_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_file_request->body - if (!send_file_request->body) { - goto fail; - } - if(cJSON_AddStringToObject(item, "body", send_file_request->body) == NULL) { - goto fail; //String - } - - - // send_file_request->filename - if (!send_file_request->filename) { - goto fail; - } - if(cJSON_AddStringToObject(item, "filename", send_file_request->filename) == NULL) { - goto fail; //String - } - - - // send_file_request->caption - if(send_file_request->caption) { - if(cJSON_AddStringToObject(item, "caption", send_file_request->caption) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_file_request_t *send_file_request_parseFromJSON(cJSON *send_file_requestJSON){ - - send_file_request_t *send_file_request_local_var = NULL; - - // send_file_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_file_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_file_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_file_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_file_request->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(send_file_requestJSON, "body"); - if (!body) { - goto end; - } - - - if(!cJSON_IsString(body)) - { - goto end; //String - } - - // send_file_request->filename - cJSON *filename = cJSON_GetObjectItemCaseSensitive(send_file_requestJSON, "filename"); - if (!filename) { - goto end; - } - - - if(!cJSON_IsString(filename)) - { - goto end; //String - } - - // send_file_request->caption - cJSON *caption = cJSON_GetObjectItemCaseSensitive(send_file_requestJSON, "caption"); - if (caption) { - if(!cJSON_IsString(caption) && !cJSON_IsNull(caption)) - { - goto end; //String - } - } - - - send_file_request_local_var = send_file_request_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - strdup(body->valuestring), - strdup(filename->valuestring), - caption && !cJSON_IsNull(caption) ? strdup(caption->valuestring) : NULL - ); - - return send_file_request_local_var; -end: - return NULL; - -} diff --git a/c/model/send_file_request.h b/c/model/send_file_request.h deleted file mode 100644 index 5334131..0000000 --- a/c/model/send_file_request.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * send_file_request.h - * - * - */ - -#ifndef _send_file_request_H_ -#define _send_file_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_file_request_t send_file_request_t; - - - - -typedef struct send_file_request_t { - char *chat_id; // string - int phone; //numeric - char *body; // string - char *filename; // string - char *caption; // string - -} send_file_request_t; - -send_file_request_t *send_file_request_create( - char *chat_id, - int phone, - char *body, - char *filename, - char *caption -); - -void send_file_request_free(send_file_request_t *send_file_request); - -send_file_request_t *send_file_request_parseFromJSON(cJSON *send_file_requestJSON); - -cJSON *send_file_request_convertToJSON(send_file_request_t *send_file_request); - -#endif /* _send_file_request_H_ */ - diff --git a/c/model/send_list_request.c b/c/model/send_list_request.c deleted file mode 100644 index ea6a271..0000000 --- a/c/model/send_list_request.c +++ /dev/null @@ -1,264 +0,0 @@ -#include -#include -#include -#include "send_list_request.h" - - - -send_list_request_t *send_list_request_create( - char *chat_id, - int phone, - char *body, - char *header, - char *footer, - char *action, - list_t *sections - ) { - send_list_request_t *send_list_request_local_var = malloc(sizeof(send_list_request_t)); - if (!send_list_request_local_var) { - return NULL; - } - send_list_request_local_var->chat_id = chat_id; - send_list_request_local_var->phone = phone; - send_list_request_local_var->body = body; - send_list_request_local_var->header = header; - send_list_request_local_var->footer = footer; - send_list_request_local_var->action = action; - send_list_request_local_var->sections = sections; - - return send_list_request_local_var; -} - - -void send_list_request_free(send_list_request_t *send_list_request) { - if(NULL == send_list_request){ - return ; - } - listEntry_t *listEntry; - if (send_list_request->chat_id) { - free(send_list_request->chat_id); - send_list_request->chat_id = NULL; - } - if (send_list_request->body) { - free(send_list_request->body); - send_list_request->body = NULL; - } - if (send_list_request->header) { - free(send_list_request->header); - send_list_request->header = NULL; - } - if (send_list_request->footer) { - free(send_list_request->footer); - send_list_request->footer = NULL; - } - if (send_list_request->action) { - free(send_list_request->action); - send_list_request->action = NULL; - } - if (send_list_request->sections) { - list_ForEach(listEntry, send_list_request->sections) { - send_list_request_all_of_sections_free(listEntry->data); - } - list_freeList(send_list_request->sections); - send_list_request->sections = NULL; - } - free(send_list_request); -} - -cJSON *send_list_request_convertToJSON(send_list_request_t *send_list_request) { - cJSON *item = cJSON_CreateObject(); - - // send_list_request->chat_id - if(send_list_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_list_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_list_request->phone - if(send_list_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_list_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_list_request->body - if (!send_list_request->body) { - goto fail; - } - if(cJSON_AddStringToObject(item, "body", send_list_request->body) == NULL) { - goto fail; //String - } - - - // send_list_request->header - if(send_list_request->header) { - if(cJSON_AddStringToObject(item, "header", send_list_request->header) == NULL) { - goto fail; //String - } - } - - - // send_list_request->footer - if(send_list_request->footer) { - if(cJSON_AddStringToObject(item, "footer", send_list_request->footer) == NULL) { - goto fail; //String - } - } - - - // send_list_request->action - if (!send_list_request->action) { - goto fail; - } - if(cJSON_AddStringToObject(item, "action", send_list_request->action) == NULL) { - goto fail; //String - } - - - // send_list_request->sections - if (!send_list_request->sections) { - goto fail; - } - cJSON *sections = cJSON_AddArrayToObject(item, "sections"); - if(sections == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *sectionsListEntry; - if (send_list_request->sections) { - list_ForEach(sectionsListEntry, send_list_request->sections) { - cJSON *itemLocal = send_list_request_all_of_sections_convertToJSON(sectionsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(sections, itemLocal); - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_list_request_t *send_list_request_parseFromJSON(cJSON *send_list_requestJSON){ - - send_list_request_t *send_list_request_local_var = NULL; - - // define the local list for send_list_request->sections - list_t *sectionsList = NULL; - - // send_list_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_list_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_list_request->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "body"); - if (!body) { - goto end; - } - - - if(!cJSON_IsString(body)) - { - goto end; //String - } - - // send_list_request->header - cJSON *header = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "header"); - if (header) { - if(!cJSON_IsString(header) && !cJSON_IsNull(header)) - { - goto end; //String - } - } - - // send_list_request->footer - cJSON *footer = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "footer"); - if (footer) { - if(!cJSON_IsString(footer) && !cJSON_IsNull(footer)) - { - goto end; //String - } - } - - // send_list_request->action - cJSON *action = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "action"); - if (!action) { - goto end; - } - - - if(!cJSON_IsString(action)) - { - goto end; //String - } - - // send_list_request->sections - cJSON *sections = cJSON_GetObjectItemCaseSensitive(send_list_requestJSON, "sections"); - if (!sections) { - goto end; - } - - - cJSON *sections_local_nonprimitive = NULL; - if(!cJSON_IsArray(sections)){ - goto end; //nonprimitive container - } - - sectionsList = list_createList(); - - cJSON_ArrayForEach(sections_local_nonprimitive,sections ) - { - if(!cJSON_IsObject(sections_local_nonprimitive)){ - goto end; - } - send_list_request_all_of_sections_t *sectionsItem = send_list_request_all_of_sections_parseFromJSON(sections_local_nonprimitive); - - list_addElement(sectionsList, sectionsItem); - } - - - send_list_request_local_var = send_list_request_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - strdup(body->valuestring), - header && !cJSON_IsNull(header) ? strdup(header->valuestring) : NULL, - footer && !cJSON_IsNull(footer) ? strdup(footer->valuestring) : NULL, - strdup(action->valuestring), - sectionsList - ); - - return send_list_request_local_var; -end: - if (sectionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, sectionsList) { - send_list_request_all_of_sections_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(sectionsList); - sectionsList = NULL; - } - return NULL; - -} diff --git a/c/model/send_list_request.h b/c/model/send_list_request.h deleted file mode 100644 index 4474797..0000000 --- a/c/model/send_list_request.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * send_list_request.h - * - * - */ - -#ifndef _send_list_request_H_ -#define _send_list_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_list_request_t send_list_request_t; - -#include "send_list_request_all_of_sections.h" - - - -typedef struct send_list_request_t { - char *chat_id; // string - int phone; //numeric - char *body; // string - char *header; // string - char *footer; // string - char *action; // string - list_t *sections; //nonprimitive container - -} send_list_request_t; - -send_list_request_t *send_list_request_create( - char *chat_id, - int phone, - char *body, - char *header, - char *footer, - char *action, - list_t *sections -); - -void send_list_request_free(send_list_request_t *send_list_request); - -send_list_request_t *send_list_request_parseFromJSON(cJSON *send_list_requestJSON); - -cJSON *send_list_request_convertToJSON(send_list_request_t *send_list_request); - -#endif /* _send_list_request_H_ */ - diff --git a/c/model/send_list_request_all_of_rows.c b/c/model/send_list_request_all_of_rows.c deleted file mode 100644 index b7b31a4..0000000 --- a/c/model/send_list_request_all_of_rows.c +++ /dev/null @@ -1,129 +0,0 @@ -#include -#include -#include -#include "send_list_request_all_of_rows.h" - - - -send_list_request_all_of_rows_t *send_list_request_all_of_rows_create( - char *id, - char *title, - char *description - ) { - send_list_request_all_of_rows_t *send_list_request_all_of_rows_local_var = malloc(sizeof(send_list_request_all_of_rows_t)); - if (!send_list_request_all_of_rows_local_var) { - return NULL; - } - send_list_request_all_of_rows_local_var->id = id; - send_list_request_all_of_rows_local_var->title = title; - send_list_request_all_of_rows_local_var->description = description; - - return send_list_request_all_of_rows_local_var; -} - - -void send_list_request_all_of_rows_free(send_list_request_all_of_rows_t *send_list_request_all_of_rows) { - if(NULL == send_list_request_all_of_rows){ - return ; - } - listEntry_t *listEntry; - if (send_list_request_all_of_rows->id) { - free(send_list_request_all_of_rows->id); - send_list_request_all_of_rows->id = NULL; - } - if (send_list_request_all_of_rows->title) { - free(send_list_request_all_of_rows->title); - send_list_request_all_of_rows->title = NULL; - } - if (send_list_request_all_of_rows->description) { - free(send_list_request_all_of_rows->description); - send_list_request_all_of_rows->description = NULL; - } - free(send_list_request_all_of_rows); -} - -cJSON *send_list_request_all_of_rows_convertToJSON(send_list_request_all_of_rows_t *send_list_request_all_of_rows) { - cJSON *item = cJSON_CreateObject(); - - // send_list_request_all_of_rows->id - if (!send_list_request_all_of_rows->id) { - goto fail; - } - if(cJSON_AddStringToObject(item, "id", send_list_request_all_of_rows->id) == NULL) { - goto fail; //String - } - - - // send_list_request_all_of_rows->title - if (!send_list_request_all_of_rows->title) { - goto fail; - } - if(cJSON_AddStringToObject(item, "title", send_list_request_all_of_rows->title) == NULL) { - goto fail; //String - } - - - // send_list_request_all_of_rows->description - if(send_list_request_all_of_rows->description) { - if(cJSON_AddStringToObject(item, "description", send_list_request_all_of_rows->description) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_list_request_all_of_rows_t *send_list_request_all_of_rows_parseFromJSON(cJSON *send_list_request_all_of_rowsJSON){ - - send_list_request_all_of_rows_t *send_list_request_all_of_rows_local_var = NULL; - - // send_list_request_all_of_rows->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(send_list_request_all_of_rowsJSON, "id"); - if (!id) { - goto end; - } - - - if(!cJSON_IsString(id)) - { - goto end; //String - } - - // send_list_request_all_of_rows->title - cJSON *title = cJSON_GetObjectItemCaseSensitive(send_list_request_all_of_rowsJSON, "title"); - if (!title) { - goto end; - } - - - if(!cJSON_IsString(title)) - { - goto end; //String - } - - // send_list_request_all_of_rows->description - cJSON *description = cJSON_GetObjectItemCaseSensitive(send_list_request_all_of_rowsJSON, "description"); - if (description) { - if(!cJSON_IsString(description) && !cJSON_IsNull(description)) - { - goto end; //String - } - } - - - send_list_request_all_of_rows_local_var = send_list_request_all_of_rows_create ( - strdup(id->valuestring), - strdup(title->valuestring), - description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL - ); - - return send_list_request_all_of_rows_local_var; -end: - return NULL; - -} diff --git a/c/model/send_list_request_all_of_rows.h b/c/model/send_list_request_all_of_rows.h deleted file mode 100644 index fe2c0be..0000000 --- a/c/model/send_list_request_all_of_rows.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * send_list_request_all_of_rows.h - * - * - */ - -#ifndef _send_list_request_all_of_rows_H_ -#define _send_list_request_all_of_rows_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_list_request_all_of_rows_t send_list_request_all_of_rows_t; - - - - -typedef struct send_list_request_all_of_rows_t { - char *id; // string - char *title; // string - char *description; // string - -} send_list_request_all_of_rows_t; - -send_list_request_all_of_rows_t *send_list_request_all_of_rows_create( - char *id, - char *title, - char *description -); - -void send_list_request_all_of_rows_free(send_list_request_all_of_rows_t *send_list_request_all_of_rows); - -send_list_request_all_of_rows_t *send_list_request_all_of_rows_parseFromJSON(cJSON *send_list_request_all_of_rowsJSON); - -cJSON *send_list_request_all_of_rows_convertToJSON(send_list_request_all_of_rows_t *send_list_request_all_of_rows); - -#endif /* _send_list_request_all_of_rows_H_ */ - diff --git a/c/model/send_list_request_all_of_sections.c b/c/model/send_list_request_all_of_sections.c deleted file mode 100644 index b931a2e..0000000 --- a/c/model/send_list_request_all_of_sections.c +++ /dev/null @@ -1,140 +0,0 @@ -#include -#include -#include -#include "send_list_request_all_of_sections.h" - - - -send_list_request_all_of_sections_t *send_list_request_all_of_sections_create( - char *title, - list_t *rows - ) { - send_list_request_all_of_sections_t *send_list_request_all_of_sections_local_var = malloc(sizeof(send_list_request_all_of_sections_t)); - if (!send_list_request_all_of_sections_local_var) { - return NULL; - } - send_list_request_all_of_sections_local_var->title = title; - send_list_request_all_of_sections_local_var->rows = rows; - - return send_list_request_all_of_sections_local_var; -} - - -void send_list_request_all_of_sections_free(send_list_request_all_of_sections_t *send_list_request_all_of_sections) { - if(NULL == send_list_request_all_of_sections){ - return ; - } - listEntry_t *listEntry; - if (send_list_request_all_of_sections->title) { - free(send_list_request_all_of_sections->title); - send_list_request_all_of_sections->title = NULL; - } - if (send_list_request_all_of_sections->rows) { - list_ForEach(listEntry, send_list_request_all_of_sections->rows) { - send_list_request_all_of_rows_free(listEntry->data); - } - list_freeList(send_list_request_all_of_sections->rows); - send_list_request_all_of_sections->rows = NULL; - } - free(send_list_request_all_of_sections); -} - -cJSON *send_list_request_all_of_sections_convertToJSON(send_list_request_all_of_sections_t *send_list_request_all_of_sections) { - cJSON *item = cJSON_CreateObject(); - - // send_list_request_all_of_sections->title - if(send_list_request_all_of_sections->title) { - if(cJSON_AddStringToObject(item, "title", send_list_request_all_of_sections->title) == NULL) { - goto fail; //String - } - } - - - // send_list_request_all_of_sections->rows - if (!send_list_request_all_of_sections->rows) { - goto fail; - } - cJSON *rows = cJSON_AddArrayToObject(item, "rows"); - if(rows == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *rowsListEntry; - if (send_list_request_all_of_sections->rows) { - list_ForEach(rowsListEntry, send_list_request_all_of_sections->rows) { - cJSON *itemLocal = send_list_request_all_of_rows_convertToJSON(rowsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(rows, itemLocal); - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_list_request_all_of_sections_t *send_list_request_all_of_sections_parseFromJSON(cJSON *send_list_request_all_of_sectionsJSON){ - - send_list_request_all_of_sections_t *send_list_request_all_of_sections_local_var = NULL; - - // define the local list for send_list_request_all_of_sections->rows - list_t *rowsList = NULL; - - // send_list_request_all_of_sections->title - cJSON *title = cJSON_GetObjectItemCaseSensitive(send_list_request_all_of_sectionsJSON, "title"); - if (title) { - if(!cJSON_IsString(title) && !cJSON_IsNull(title)) - { - goto end; //String - } - } - - // send_list_request_all_of_sections->rows - cJSON *rows = cJSON_GetObjectItemCaseSensitive(send_list_request_all_of_sectionsJSON, "rows"); - if (!rows) { - goto end; - } - - - cJSON *rows_local_nonprimitive = NULL; - if(!cJSON_IsArray(rows)){ - goto end; //nonprimitive container - } - - rowsList = list_createList(); - - cJSON_ArrayForEach(rows_local_nonprimitive,rows ) - { - if(!cJSON_IsObject(rows_local_nonprimitive)){ - goto end; - } - send_list_request_all_of_rows_t *rowsItem = send_list_request_all_of_rows_parseFromJSON(rows_local_nonprimitive); - - list_addElement(rowsList, rowsItem); - } - - - send_list_request_all_of_sections_local_var = send_list_request_all_of_sections_create ( - title && !cJSON_IsNull(title) ? strdup(title->valuestring) : NULL, - rowsList - ); - - return send_list_request_all_of_sections_local_var; -end: - if (rowsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, rowsList) { - send_list_request_all_of_rows_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(rowsList); - rowsList = NULL; - } - return NULL; - -} diff --git a/c/model/send_list_request_all_of_sections.h b/c/model/send_list_request_all_of_sections.h deleted file mode 100644 index e989abc..0000000 --- a/c/model/send_list_request_all_of_sections.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * send_list_request_all_of_sections.h - * - * - */ - -#ifndef _send_list_request_all_of_sections_H_ -#define _send_list_request_all_of_sections_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_list_request_all_of_sections_t send_list_request_all_of_sections_t; - -#include "send_list_request_all_of_rows.h" - - - -typedef struct send_list_request_all_of_sections_t { - char *title; // string - list_t *rows; //nonprimitive container - -} send_list_request_all_of_sections_t; - -send_list_request_all_of_sections_t *send_list_request_all_of_sections_create( - char *title, - list_t *rows -); - -void send_list_request_all_of_sections_free(send_list_request_all_of_sections_t *send_list_request_all_of_sections); - -send_list_request_all_of_sections_t *send_list_request_all_of_sections_parseFromJSON(cJSON *send_list_request_all_of_sectionsJSON); - -cJSON *send_list_request_all_of_sections_convertToJSON(send_list_request_all_of_sections_t *send_list_request_all_of_sections); - -#endif /* _send_list_request_all_of_sections_H_ */ - diff --git a/c/model/send_location_request.c b/c/model/send_location_request.c deleted file mode 100644 index fb21af9..0000000 --- a/c/model/send_location_request.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "send_location_request.h" - - - -send_location_request_t *send_location_request_create( - char *chat_id, - int phone, - char *lat, - char *lng, - char *address, - char *name - ) { - send_location_request_t *send_location_request_local_var = malloc(sizeof(send_location_request_t)); - if (!send_location_request_local_var) { - return NULL; - } - send_location_request_local_var->chat_id = chat_id; - send_location_request_local_var->phone = phone; - send_location_request_local_var->lat = lat; - send_location_request_local_var->lng = lng; - send_location_request_local_var->address = address; - send_location_request_local_var->name = name; - - return send_location_request_local_var; -} - - -void send_location_request_free(send_location_request_t *send_location_request) { - if(NULL == send_location_request){ - return ; - } - listEntry_t *listEntry; - if (send_location_request->chat_id) { - free(send_location_request->chat_id); - send_location_request->chat_id = NULL; - } - if (send_location_request->lat) { - free(send_location_request->lat); - send_location_request->lat = NULL; - } - if (send_location_request->lng) { - free(send_location_request->lng); - send_location_request->lng = NULL; - } - if (send_location_request->address) { - free(send_location_request->address); - send_location_request->address = NULL; - } - if (send_location_request->name) { - free(send_location_request->name); - send_location_request->name = NULL; - } - free(send_location_request); -} - -cJSON *send_location_request_convertToJSON(send_location_request_t *send_location_request) { - cJSON *item = cJSON_CreateObject(); - - // send_location_request->chat_id - if(send_location_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_location_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_location_request->phone - if(send_location_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_location_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_location_request->lat - if (!send_location_request->lat) { - goto fail; - } - if(cJSON_AddStringToObject(item, "lat", send_location_request->lat) == NULL) { - goto fail; //String - } - - - // send_location_request->lng - if (!send_location_request->lng) { - goto fail; - } - if(cJSON_AddStringToObject(item, "lng", send_location_request->lng) == NULL) { - goto fail; //String - } - - - // send_location_request->address - if(send_location_request->address) { - if(cJSON_AddStringToObject(item, "address", send_location_request->address) == NULL) { - goto fail; //String - } - } - - - // send_location_request->name - if(send_location_request->name) { - if(cJSON_AddStringToObject(item, "name", send_location_request->name) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_location_request_t *send_location_request_parseFromJSON(cJSON *send_location_requestJSON){ - - send_location_request_t *send_location_request_local_var = NULL; - - // send_location_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_location_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_location_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_location_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_location_request->lat - cJSON *lat = cJSON_GetObjectItemCaseSensitive(send_location_requestJSON, "lat"); - if (!lat) { - goto end; - } - - - if(!cJSON_IsString(lat)) - { - goto end; //String - } - - // send_location_request->lng - cJSON *lng = cJSON_GetObjectItemCaseSensitive(send_location_requestJSON, "lng"); - if (!lng) { - goto end; - } - - - if(!cJSON_IsString(lng)) - { - goto end; //String - } - - // send_location_request->address - cJSON *address = cJSON_GetObjectItemCaseSensitive(send_location_requestJSON, "address"); - if (address) { - if(!cJSON_IsString(address) && !cJSON_IsNull(address)) - { - goto end; //String - } - } - - // send_location_request->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(send_location_requestJSON, "name"); - if (name) { - if(!cJSON_IsString(name) && !cJSON_IsNull(name)) - { - goto end; //String - } - } - - - send_location_request_local_var = send_location_request_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - strdup(lat->valuestring), - strdup(lng->valuestring), - address && !cJSON_IsNull(address) ? strdup(address->valuestring) : NULL, - name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL - ); - - return send_location_request_local_var; -end: - return NULL; - -} diff --git a/c/model/send_location_request.h b/c/model/send_location_request.h deleted file mode 100644 index 9db1c59..0000000 --- a/c/model/send_location_request.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * send_location_request.h - * - * - */ - -#ifndef _send_location_request_H_ -#define _send_location_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_location_request_t send_location_request_t; - - - - -typedef struct send_location_request_t { - char *chat_id; // string - int phone; //numeric - char *lat; // string - char *lng; // string - char *address; // string - char *name; // string - -} send_location_request_t; - -send_location_request_t *send_location_request_create( - char *chat_id, - int phone, - char *lat, - char *lng, - char *address, - char *name -); - -void send_location_request_free(send_location_request_t *send_location_request); - -send_location_request_t *send_location_request_parseFromJSON(cJSON *send_location_requestJSON); - -cJSON *send_location_request_convertToJSON(send_location_request_t *send_location_request); - -#endif /* _send_location_request_H_ */ - diff --git a/c/model/send_message_request.c b/c/model/send_message_request.c deleted file mode 100644 index 404c3b1..0000000 --- a/c/model/send_message_request.c +++ /dev/null @@ -1,121 +0,0 @@ -#include -#include -#include -#include "send_message_request.h" - - - -send_message_request_t *send_message_request_create( - char *chat_id, - int phone, - char *body - ) { - send_message_request_t *send_message_request_local_var = malloc(sizeof(send_message_request_t)); - if (!send_message_request_local_var) { - return NULL; - } - send_message_request_local_var->chat_id = chat_id; - send_message_request_local_var->phone = phone; - send_message_request_local_var->body = body; - - return send_message_request_local_var; -} - - -void send_message_request_free(send_message_request_t *send_message_request) { - if(NULL == send_message_request){ - return ; - } - listEntry_t *listEntry; - if (send_message_request->chat_id) { - free(send_message_request->chat_id); - send_message_request->chat_id = NULL; - } - if (send_message_request->body) { - free(send_message_request->body); - send_message_request->body = NULL; - } - free(send_message_request); -} - -cJSON *send_message_request_convertToJSON(send_message_request_t *send_message_request) { - cJSON *item = cJSON_CreateObject(); - - // send_message_request->chat_id - if(send_message_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_message_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_message_request->phone - if(send_message_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_message_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_message_request->body - if (!send_message_request->body) { - goto fail; - } - if(cJSON_AddStringToObject(item, "body", send_message_request->body) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_message_request_t *send_message_request_parseFromJSON(cJSON *send_message_requestJSON){ - - send_message_request_t *send_message_request_local_var = NULL; - - // send_message_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_message_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_message_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_message_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_message_request->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(send_message_requestJSON, "body"); - if (!body) { - goto end; - } - - - if(!cJSON_IsString(body)) - { - goto end; //String - } - - - send_message_request_local_var = send_message_request_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - strdup(body->valuestring) - ); - - return send_message_request_local_var; -end: - return NULL; - -} diff --git a/c/model/send_message_request.h b/c/model/send_message_request.h deleted file mode 100644 index de87d05..0000000 --- a/c/model/send_message_request.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * send_message_request.h - * - * - */ - -#ifndef _send_message_request_H_ -#define _send_message_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_message_request_t send_message_request_t; - - - - -typedef struct send_message_request_t { - char *chat_id; // string - int phone; //numeric - char *body; // string - -} send_message_request_t; - -send_message_request_t *send_message_request_create( - char *chat_id, - int phone, - char *body -); - -void send_message_request_free(send_message_request_t *send_message_request); - -send_message_request_t *send_message_request_parseFromJSON(cJSON *send_message_requestJSON); - -cJSON *send_message_request_convertToJSON(send_message_request_t *send_message_request); - -#endif /* _send_message_request_H_ */ - diff --git a/c/model/send_message_status.c b/c/model/send_message_status.c deleted file mode 100644 index cf5842b..0000000 --- a/c/model/send_message_status.c +++ /dev/null @@ -1,141 +0,0 @@ -#include -#include -#include -#include "send_message_status.h" - - - -send_message_status_t *send_message_status_create( - int sent, - char *id, - char *message, - char *description - ) { - send_message_status_t *send_message_status_local_var = malloc(sizeof(send_message_status_t)); - if (!send_message_status_local_var) { - return NULL; - } - send_message_status_local_var->sent = sent; - send_message_status_local_var->id = id; - send_message_status_local_var->message = message; - send_message_status_local_var->description = description; - - return send_message_status_local_var; -} - - -void send_message_status_free(send_message_status_t *send_message_status) { - if(NULL == send_message_status){ - return ; - } - listEntry_t *listEntry; - if (send_message_status->id) { - free(send_message_status->id); - send_message_status->id = NULL; - } - if (send_message_status->message) { - free(send_message_status->message); - send_message_status->message = NULL; - } - if (send_message_status->description) { - free(send_message_status->description); - send_message_status->description = NULL; - } - free(send_message_status); -} - -cJSON *send_message_status_convertToJSON(send_message_status_t *send_message_status) { - cJSON *item = cJSON_CreateObject(); - - // send_message_status->sent - if(send_message_status->sent) { - if(cJSON_AddBoolToObject(item, "sent", send_message_status->sent) == NULL) { - goto fail; //Bool - } - } - - - // send_message_status->id - if(send_message_status->id) { - if(cJSON_AddStringToObject(item, "id", send_message_status->id) == NULL) { - goto fail; //String - } - } - - - // send_message_status->message - if(send_message_status->message) { - if(cJSON_AddStringToObject(item, "message", send_message_status->message) == NULL) { - goto fail; //String - } - } - - - // send_message_status->description - if(send_message_status->description) { - if(cJSON_AddStringToObject(item, "description", send_message_status->description) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_message_status_t *send_message_status_parseFromJSON(cJSON *send_message_statusJSON){ - - send_message_status_t *send_message_status_local_var = NULL; - - // send_message_status->sent - cJSON *sent = cJSON_GetObjectItemCaseSensitive(send_message_statusJSON, "sent"); - if (sent) { - if(!cJSON_IsBool(sent)) - { - goto end; //Bool - } - } - - // send_message_status->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(send_message_statusJSON, "id"); - if (id) { - if(!cJSON_IsString(id) && !cJSON_IsNull(id)) - { - goto end; //String - } - } - - // send_message_status->message - cJSON *message = cJSON_GetObjectItemCaseSensitive(send_message_statusJSON, "message"); - if (message) { - if(!cJSON_IsString(message) && !cJSON_IsNull(message)) - { - goto end; //String - } - } - - // send_message_status->description - cJSON *description = cJSON_GetObjectItemCaseSensitive(send_message_statusJSON, "description"); - if (description) { - if(!cJSON_IsString(description) && !cJSON_IsNull(description)) - { - goto end; //String - } - } - - - send_message_status_local_var = send_message_status_create ( - sent ? sent->valueint : 0, - id && !cJSON_IsNull(id) ? strdup(id->valuestring) : NULL, - message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, - description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL - ); - - return send_message_status_local_var; -end: - return NULL; - -} diff --git a/c/model/send_message_status.h b/c/model/send_message_status.h deleted file mode 100644 index 5bb0a8b..0000000 --- a/c/model/send_message_status.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * send_message_status.h - * - * - */ - -#ifndef _send_message_status_H_ -#define _send_message_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_message_status_t send_message_status_t; - - - - -typedef struct send_message_status_t { - int sent; //boolean - char *id; // string - char *message; // string - char *description; // string - -} send_message_status_t; - -send_message_status_t *send_message_status_create( - int sent, - char *id, - char *message, - char *description -); - -void send_message_status_free(send_message_status_t *send_message_status); - -send_message_status_t *send_message_status_parseFromJSON(cJSON *send_message_statusJSON); - -cJSON *send_message_status_convertToJSON(send_message_status_t *send_message_status); - -#endif /* _send_message_status_H_ */ - diff --git a/c/model/send_product_request.c b/c/model/send_product_request.c deleted file mode 100644 index 44050d9..0000000 --- a/c/model/send_product_request.c +++ /dev/null @@ -1,202 +0,0 @@ -#include -#include -#include -#include "send_product_request.h" - - - -send_product_request_t *send_product_request_create( - char *chat_id, - int phone, - send_product_request_all_of_action_t *action, - char *body, - char *footer, - char *header - ) { - send_product_request_t *send_product_request_local_var = malloc(sizeof(send_product_request_t)); - if (!send_product_request_local_var) { - return NULL; - } - send_product_request_local_var->chat_id = chat_id; - send_product_request_local_var->phone = phone; - send_product_request_local_var->action = action; - send_product_request_local_var->body = body; - send_product_request_local_var->footer = footer; - send_product_request_local_var->header = header; - - return send_product_request_local_var; -} - - -void send_product_request_free(send_product_request_t *send_product_request) { - if(NULL == send_product_request){ - return ; - } - listEntry_t *listEntry; - if (send_product_request->chat_id) { - free(send_product_request->chat_id); - send_product_request->chat_id = NULL; - } - if (send_product_request->action) { - send_product_request_all_of_action_free(send_product_request->action); - send_product_request->action = NULL; - } - if (send_product_request->body) { - free(send_product_request->body); - send_product_request->body = NULL; - } - if (send_product_request->footer) { - free(send_product_request->footer); - send_product_request->footer = NULL; - } - if (send_product_request->header) { - free(send_product_request->header); - send_product_request->header = NULL; - } - free(send_product_request); -} - -cJSON *send_product_request_convertToJSON(send_product_request_t *send_product_request) { - cJSON *item = cJSON_CreateObject(); - - // send_product_request->chat_id - if(send_product_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_product_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_product_request->phone - if(send_product_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_product_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_product_request->action - if (!send_product_request->action) { - goto fail; - } - cJSON *action_local_JSON = send_product_request_all_of_action_convertToJSON(send_product_request->action); - if(action_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "action", action_local_JSON); - if(item->child == NULL) { - goto fail; - } - - - // send_product_request->body - if(send_product_request->body) { - if(cJSON_AddStringToObject(item, "body", send_product_request->body) == NULL) { - goto fail; //String - } - } - - - // send_product_request->footer - if(send_product_request->footer) { - if(cJSON_AddStringToObject(item, "footer", send_product_request->footer) == NULL) { - goto fail; //String - } - } - - - // send_product_request->header - if(send_product_request->header) { - if(cJSON_AddStringToObject(item, "header", send_product_request->header) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_product_request_t *send_product_request_parseFromJSON(cJSON *send_product_requestJSON){ - - send_product_request_t *send_product_request_local_var = NULL; - - // define the local variable for send_product_request->action - send_product_request_all_of_action_t *action_local_nonprim = NULL; - - // send_product_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_product_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_product_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_product_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_product_request->action - cJSON *action = cJSON_GetObjectItemCaseSensitive(send_product_requestJSON, "action"); - if (!action) { - goto end; - } - - - action_local_nonprim = send_product_request_all_of_action_parseFromJSON(action); //nonprimitive - - // send_product_request->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(send_product_requestJSON, "body"); - if (body) { - if(!cJSON_IsString(body) && !cJSON_IsNull(body)) - { - goto end; //String - } - } - - // send_product_request->footer - cJSON *footer = cJSON_GetObjectItemCaseSensitive(send_product_requestJSON, "footer"); - if (footer) { - if(!cJSON_IsString(footer) && !cJSON_IsNull(footer)) - { - goto end; //String - } - } - - // send_product_request->header - cJSON *header = cJSON_GetObjectItemCaseSensitive(send_product_requestJSON, "header"); - if (header) { - if(!cJSON_IsString(header) && !cJSON_IsNull(header)) - { - goto end; //String - } - } - - - send_product_request_local_var = send_product_request_create ( - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - action_local_nonprim, - body && !cJSON_IsNull(body) ? strdup(body->valuestring) : NULL, - footer && !cJSON_IsNull(footer) ? strdup(footer->valuestring) : NULL, - header && !cJSON_IsNull(header) ? strdup(header->valuestring) : NULL - ); - - return send_product_request_local_var; -end: - if (action_local_nonprim) { - send_product_request_all_of_action_free(action_local_nonprim); - action_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/send_product_request.h b/c/model/send_product_request.h deleted file mode 100644 index 9211968..0000000 --- a/c/model/send_product_request.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * send_product_request.h - * - * - */ - -#ifndef _send_product_request_H_ -#define _send_product_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_product_request_t send_product_request_t; - -#include "send_product_request_all_of_action.h" - - - -typedef struct send_product_request_t { - char *chat_id; // string - int phone; //numeric - struct send_product_request_all_of_action_t *action; //model - char *body; // string - char *footer; // string - char *header; // string - -} send_product_request_t; - -send_product_request_t *send_product_request_create( - char *chat_id, - int phone, - send_product_request_all_of_action_t *action, - char *body, - char *footer, - char *header -); - -void send_product_request_free(send_product_request_t *send_product_request); - -send_product_request_t *send_product_request_parseFromJSON(cJSON *send_product_requestJSON); - -cJSON *send_product_request_convertToJSON(send_product_request_t *send_product_request); - -#endif /* _send_product_request_H_ */ - diff --git a/c/model/send_product_request_all_of_action.c b/c/model/send_product_request_all_of_action.c deleted file mode 100644 index 2f5c020..0000000 --- a/c/model/send_product_request_all_of_action.c +++ /dev/null @@ -1,160 +0,0 @@ -#include -#include -#include -#include "send_product_request_all_of_action.h" - - - -send_product_request_all_of_action_t *send_product_request_all_of_action_create( - char *catalog_id, - char *product_retailer_id, - list_t *sections - ) { - send_product_request_all_of_action_t *send_product_request_all_of_action_local_var = malloc(sizeof(send_product_request_all_of_action_t)); - if (!send_product_request_all_of_action_local_var) { - return NULL; - } - send_product_request_all_of_action_local_var->catalog_id = catalog_id; - send_product_request_all_of_action_local_var->product_retailer_id = product_retailer_id; - send_product_request_all_of_action_local_var->sections = sections; - - return send_product_request_all_of_action_local_var; -} - - -void send_product_request_all_of_action_free(send_product_request_all_of_action_t *send_product_request_all_of_action) { - if(NULL == send_product_request_all_of_action){ - return ; - } - listEntry_t *listEntry; - if (send_product_request_all_of_action->catalog_id) { - free(send_product_request_all_of_action->catalog_id); - send_product_request_all_of_action->catalog_id = NULL; - } - if (send_product_request_all_of_action->product_retailer_id) { - free(send_product_request_all_of_action->product_retailer_id); - send_product_request_all_of_action->product_retailer_id = NULL; - } - if (send_product_request_all_of_action->sections) { - list_ForEach(listEntry, send_product_request_all_of_action->sections) { - send_product_request_all_of_action_sections_free(listEntry->data); - } - list_freeList(send_product_request_all_of_action->sections); - send_product_request_all_of_action->sections = NULL; - } - free(send_product_request_all_of_action); -} - -cJSON *send_product_request_all_of_action_convertToJSON(send_product_request_all_of_action_t *send_product_request_all_of_action) { - cJSON *item = cJSON_CreateObject(); - - // send_product_request_all_of_action->catalog_id - if(send_product_request_all_of_action->catalog_id) { - if(cJSON_AddStringToObject(item, "catalog_id", send_product_request_all_of_action->catalog_id) == NULL) { - goto fail; //String - } - } - - - // send_product_request_all_of_action->product_retailer_id - if(send_product_request_all_of_action->product_retailer_id) { - if(cJSON_AddStringToObject(item, "product_retailer_id", send_product_request_all_of_action->product_retailer_id) == NULL) { - goto fail; //String - } - } - - - // send_product_request_all_of_action->sections - if(send_product_request_all_of_action->sections) { - cJSON *sections = cJSON_AddArrayToObject(item, "sections"); - if(sections == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *sectionsListEntry; - if (send_product_request_all_of_action->sections) { - list_ForEach(sectionsListEntry, send_product_request_all_of_action->sections) { - cJSON *itemLocal = send_product_request_all_of_action_sections_convertToJSON(sectionsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(sections, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_product_request_all_of_action_t *send_product_request_all_of_action_parseFromJSON(cJSON *send_product_request_all_of_actionJSON){ - - send_product_request_all_of_action_t *send_product_request_all_of_action_local_var = NULL; - - // define the local list for send_product_request_all_of_action->sections - list_t *sectionsList = NULL; - - // send_product_request_all_of_action->catalog_id - cJSON *catalog_id = cJSON_GetObjectItemCaseSensitive(send_product_request_all_of_actionJSON, "catalog_id"); - if (catalog_id) { - if(!cJSON_IsString(catalog_id) && !cJSON_IsNull(catalog_id)) - { - goto end; //String - } - } - - // send_product_request_all_of_action->product_retailer_id - cJSON *product_retailer_id = cJSON_GetObjectItemCaseSensitive(send_product_request_all_of_actionJSON, "product_retailer_id"); - if (product_retailer_id) { - if(!cJSON_IsString(product_retailer_id) && !cJSON_IsNull(product_retailer_id)) - { - goto end; //String - } - } - - // send_product_request_all_of_action->sections - cJSON *sections = cJSON_GetObjectItemCaseSensitive(send_product_request_all_of_actionJSON, "sections"); - if (sections) { - cJSON *sections_local_nonprimitive = NULL; - if(!cJSON_IsArray(sections)){ - goto end; //nonprimitive container - } - - sectionsList = list_createList(); - - cJSON_ArrayForEach(sections_local_nonprimitive,sections ) - { - if(!cJSON_IsObject(sections_local_nonprimitive)){ - goto end; - } - send_product_request_all_of_action_sections_t *sectionsItem = send_product_request_all_of_action_sections_parseFromJSON(sections_local_nonprimitive); - - list_addElement(sectionsList, sectionsItem); - } - } - - - send_product_request_all_of_action_local_var = send_product_request_all_of_action_create ( - catalog_id && !cJSON_IsNull(catalog_id) ? strdup(catalog_id->valuestring) : NULL, - product_retailer_id && !cJSON_IsNull(product_retailer_id) ? strdup(product_retailer_id->valuestring) : NULL, - sections ? sectionsList : NULL - ); - - return send_product_request_all_of_action_local_var; -end: - if (sectionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, sectionsList) { - send_product_request_all_of_action_sections_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(sectionsList); - sectionsList = NULL; - } - return NULL; - -} diff --git a/c/model/send_product_request_all_of_action.h b/c/model/send_product_request_all_of_action.h deleted file mode 100644 index 5f9fd9a..0000000 --- a/c/model/send_product_request_all_of_action.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * send_product_request_all_of_action.h - * - * Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - */ - -#ifndef _send_product_request_all_of_action_H_ -#define _send_product_request_all_of_action_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_product_request_all_of_action_t send_product_request_all_of_action_t; - -#include "send_product_request_all_of_action_sections.h" - - - -typedef struct send_product_request_all_of_action_t { - char *catalog_id; // string - char *product_retailer_id; // string - list_t *sections; //nonprimitive container - -} send_product_request_all_of_action_t; - -send_product_request_all_of_action_t *send_product_request_all_of_action_create( - char *catalog_id, - char *product_retailer_id, - list_t *sections -); - -void send_product_request_all_of_action_free(send_product_request_all_of_action_t *send_product_request_all_of_action); - -send_product_request_all_of_action_t *send_product_request_all_of_action_parseFromJSON(cJSON *send_product_request_all_of_actionJSON); - -cJSON *send_product_request_all_of_action_convertToJSON(send_product_request_all_of_action_t *send_product_request_all_of_action); - -#endif /* _send_product_request_all_of_action_H_ */ - diff --git a/c/model/send_product_request_all_of_action_product_items.c b/c/model/send_product_request_all_of_action_product_items.c deleted file mode 100644 index 9219ad6..0000000 --- a/c/model/send_product_request_all_of_action_product_items.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "send_product_request_all_of_action_product_items.h" - - - -send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items_create( - char *product_retailer_id - ) { - send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items_local_var = malloc(sizeof(send_product_request_all_of_action_product_items_t)); - if (!send_product_request_all_of_action_product_items_local_var) { - return NULL; - } - send_product_request_all_of_action_product_items_local_var->product_retailer_id = product_retailer_id; - - return send_product_request_all_of_action_product_items_local_var; -} - - -void send_product_request_all_of_action_product_items_free(send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items) { - if(NULL == send_product_request_all_of_action_product_items){ - return ; - } - listEntry_t *listEntry; - if (send_product_request_all_of_action_product_items->product_retailer_id) { - free(send_product_request_all_of_action_product_items->product_retailer_id); - send_product_request_all_of_action_product_items->product_retailer_id = NULL; - } - free(send_product_request_all_of_action_product_items); -} - -cJSON *send_product_request_all_of_action_product_items_convertToJSON(send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items) { - cJSON *item = cJSON_CreateObject(); - - // send_product_request_all_of_action_product_items->product_retailer_id - if(send_product_request_all_of_action_product_items->product_retailer_id) { - if(cJSON_AddStringToObject(item, "product_retailer_id", send_product_request_all_of_action_product_items->product_retailer_id) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items_parseFromJSON(cJSON *send_product_request_all_of_action_product_itemsJSON){ - - send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items_local_var = NULL; - - // send_product_request_all_of_action_product_items->product_retailer_id - cJSON *product_retailer_id = cJSON_GetObjectItemCaseSensitive(send_product_request_all_of_action_product_itemsJSON, "product_retailer_id"); - if (product_retailer_id) { - if(!cJSON_IsString(product_retailer_id) && !cJSON_IsNull(product_retailer_id)) - { - goto end; //String - } - } - - - send_product_request_all_of_action_product_items_local_var = send_product_request_all_of_action_product_items_create ( - product_retailer_id && !cJSON_IsNull(product_retailer_id) ? strdup(product_retailer_id->valuestring) : NULL - ); - - return send_product_request_all_of_action_product_items_local_var; -end: - return NULL; - -} diff --git a/c/model/send_product_request_all_of_action_product_items.h b/c/model/send_product_request_all_of_action_product_items.h deleted file mode 100644 index f5a1a4e..0000000 --- a/c/model/send_product_request_all_of_action_product_items.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * send_product_request_all_of_action_product_items.h - * - * - */ - -#ifndef _send_product_request_all_of_action_product_items_H_ -#define _send_product_request_all_of_action_product_items_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_product_request_all_of_action_product_items_t send_product_request_all_of_action_product_items_t; - - - - -typedef struct send_product_request_all_of_action_product_items_t { - char *product_retailer_id; // string - -} send_product_request_all_of_action_product_items_t; - -send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items_create( - char *product_retailer_id -); - -void send_product_request_all_of_action_product_items_free(send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items); - -send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items_parseFromJSON(cJSON *send_product_request_all_of_action_product_itemsJSON); - -cJSON *send_product_request_all_of_action_product_items_convertToJSON(send_product_request_all_of_action_product_items_t *send_product_request_all_of_action_product_items); - -#endif /* _send_product_request_all_of_action_product_items_H_ */ - diff --git a/c/model/send_product_request_all_of_action_sections.c b/c/model/send_product_request_all_of_action_sections.c deleted file mode 100644 index 0285fec..0000000 --- a/c/model/send_product_request_all_of_action_sections.c +++ /dev/null @@ -1,136 +0,0 @@ -#include -#include -#include -#include "send_product_request_all_of_action_sections.h" - - - -send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections_create( - char *title, - list_t *product_items - ) { - send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections_local_var = malloc(sizeof(send_product_request_all_of_action_sections_t)); - if (!send_product_request_all_of_action_sections_local_var) { - return NULL; - } - send_product_request_all_of_action_sections_local_var->title = title; - send_product_request_all_of_action_sections_local_var->product_items = product_items; - - return send_product_request_all_of_action_sections_local_var; -} - - -void send_product_request_all_of_action_sections_free(send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections) { - if(NULL == send_product_request_all_of_action_sections){ - return ; - } - listEntry_t *listEntry; - if (send_product_request_all_of_action_sections->title) { - free(send_product_request_all_of_action_sections->title); - send_product_request_all_of_action_sections->title = NULL; - } - if (send_product_request_all_of_action_sections->product_items) { - list_ForEach(listEntry, send_product_request_all_of_action_sections->product_items) { - send_product_request_all_of_action_product_items_free(listEntry->data); - } - list_freeList(send_product_request_all_of_action_sections->product_items); - send_product_request_all_of_action_sections->product_items = NULL; - } - free(send_product_request_all_of_action_sections); -} - -cJSON *send_product_request_all_of_action_sections_convertToJSON(send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections) { - cJSON *item = cJSON_CreateObject(); - - // send_product_request_all_of_action_sections->title - if(send_product_request_all_of_action_sections->title) { - if(cJSON_AddStringToObject(item, "title", send_product_request_all_of_action_sections->title) == NULL) { - goto fail; //String - } - } - - - // send_product_request_all_of_action_sections->product_items - if(send_product_request_all_of_action_sections->product_items) { - cJSON *product_items = cJSON_AddArrayToObject(item, "product_items"); - if(product_items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *product_itemsListEntry; - if (send_product_request_all_of_action_sections->product_items) { - list_ForEach(product_itemsListEntry, send_product_request_all_of_action_sections->product_items) { - cJSON *itemLocal = send_product_request_all_of_action_product_items_convertToJSON(product_itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(product_items, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections_parseFromJSON(cJSON *send_product_request_all_of_action_sectionsJSON){ - - send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections_local_var = NULL; - - // define the local list for send_product_request_all_of_action_sections->product_items - list_t *product_itemsList = NULL; - - // send_product_request_all_of_action_sections->title - cJSON *title = cJSON_GetObjectItemCaseSensitive(send_product_request_all_of_action_sectionsJSON, "title"); - if (title) { - if(!cJSON_IsString(title) && !cJSON_IsNull(title)) - { - goto end; //String - } - } - - // send_product_request_all_of_action_sections->product_items - cJSON *product_items = cJSON_GetObjectItemCaseSensitive(send_product_request_all_of_action_sectionsJSON, "product_items"); - if (product_items) { - cJSON *product_items_local_nonprimitive = NULL; - if(!cJSON_IsArray(product_items)){ - goto end; //nonprimitive container - } - - product_itemsList = list_createList(); - - cJSON_ArrayForEach(product_items_local_nonprimitive,product_items ) - { - if(!cJSON_IsObject(product_items_local_nonprimitive)){ - goto end; - } - send_product_request_all_of_action_product_items_t *product_itemsItem = send_product_request_all_of_action_product_items_parseFromJSON(product_items_local_nonprimitive); - - list_addElement(product_itemsList, product_itemsItem); - } - } - - - send_product_request_all_of_action_sections_local_var = send_product_request_all_of_action_sections_create ( - title && !cJSON_IsNull(title) ? strdup(title->valuestring) : NULL, - product_items ? product_itemsList : NULL - ); - - return send_product_request_all_of_action_sections_local_var; -end: - if (product_itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, product_itemsList) { - send_product_request_all_of_action_product_items_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(product_itemsList); - product_itemsList = NULL; - } - return NULL; - -} diff --git a/c/model/send_product_request_all_of_action_sections.h b/c/model/send_product_request_all_of_action_sections.h deleted file mode 100644 index b80d544..0000000 --- a/c/model/send_product_request_all_of_action_sections.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * send_product_request_all_of_action_sections.h - * - * - */ - -#ifndef _send_product_request_all_of_action_sections_H_ -#define _send_product_request_all_of_action_sections_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_product_request_all_of_action_sections_t send_product_request_all_of_action_sections_t; - -#include "send_product_request_all_of_action_product_items.h" - - - -typedef struct send_product_request_all_of_action_sections_t { - char *title; // string - list_t *product_items; //nonprimitive container - -} send_product_request_all_of_action_sections_t; - -send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections_create( - char *title, - list_t *product_items -); - -void send_product_request_all_of_action_sections_free(send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections); - -send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections_parseFromJSON(cJSON *send_product_request_all_of_action_sectionsJSON); - -cJSON *send_product_request_all_of_action_sections_convertToJSON(send_product_request_all_of_action_sections_t *send_product_request_all_of_action_sections); - -#endif /* _send_product_request_all_of_action_sections_H_ */ - diff --git a/c/model/send_template_request.c b/c/model/send_template_request.c deleted file mode 100644 index 5a9d598..0000000 --- a/c/model/send_template_request.c +++ /dev/null @@ -1,249 +0,0 @@ -#include -#include -#include -#include "send_template_request.h" - - - -send_template_request_t *send_template_request_create( - char *_namespace, - char *chat_id, - int phone, - char *_template, - send_template_request_all_of_language_t *language, - list_t *params - ) { - send_template_request_t *send_template_request_local_var = malloc(sizeof(send_template_request_t)); - if (!send_template_request_local_var) { - return NULL; - } - send_template_request_local_var->_namespace = _namespace; - send_template_request_local_var->chat_id = chat_id; - send_template_request_local_var->phone = phone; - send_template_request_local_var->_template = _template; - send_template_request_local_var->language = language; - send_template_request_local_var->params = params; - - return send_template_request_local_var; -} - - -void send_template_request_free(send_template_request_t *send_template_request) { - if(NULL == send_template_request){ - return ; - } - listEntry_t *listEntry; - if (send_template_request->_namespace) { - free(send_template_request->_namespace); - send_template_request->_namespace = NULL; - } - if (send_template_request->chat_id) { - free(send_template_request->chat_id); - send_template_request->chat_id = NULL; - } - if (send_template_request->_template) { - free(send_template_request->_template); - send_template_request->_template = NULL; - } - if (send_template_request->language) { - send_template_request_all_of_language_free(send_template_request->language); - send_template_request->language = NULL; - } - if (send_template_request->params) { - list_ForEach(listEntry, send_template_request->params) { - send_template_request_all_of_params_free(listEntry->data); - } - list_freeList(send_template_request->params); - send_template_request->params = NULL; - } - free(send_template_request); -} - -cJSON *send_template_request_convertToJSON(send_template_request_t *send_template_request) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request->_namespace - if (!send_template_request->_namespace) { - goto fail; - } - if(cJSON_AddStringToObject(item, "namespace", send_template_request->_namespace) == NULL) { - goto fail; //String - } - - - // send_template_request->chat_id - if(send_template_request->chat_id) { - if(cJSON_AddStringToObject(item, "chatId", send_template_request->chat_id) == NULL) { - goto fail; //String - } - } - - - // send_template_request->phone - if(send_template_request->phone) { - if(cJSON_AddNumberToObject(item, "phone", send_template_request->phone) == NULL) { - goto fail; //Numeric - } - } - - - // send_template_request->_template - if (!send_template_request->_template) { - goto fail; - } - if(cJSON_AddStringToObject(item, "template", send_template_request->_template) == NULL) { - goto fail; //String - } - - - // send_template_request->language - if (!send_template_request->language) { - goto fail; - } - cJSON *language_local_JSON = send_template_request_all_of_language_convertToJSON(send_template_request->language); - if(language_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "language", language_local_JSON); - if(item->child == NULL) { - goto fail; - } - - - // send_template_request->params - if(send_template_request->params) { - cJSON *params = cJSON_AddArrayToObject(item, "params"); - if(params == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *paramsListEntry; - if (send_template_request->params) { - list_ForEach(paramsListEntry, send_template_request->params) { - cJSON *itemLocal = send_template_request_all_of_params_convertToJSON(paramsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(params, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_t *send_template_request_parseFromJSON(cJSON *send_template_requestJSON){ - - send_template_request_t *send_template_request_local_var = NULL; - - // define the local variable for send_template_request->language - send_template_request_all_of_language_t *language_local_nonprim = NULL; - - // define the local list for send_template_request->params - list_t *paramsList = NULL; - - // send_template_request->_namespace - cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(send_template_requestJSON, "namespace"); - if (!_namespace) { - goto end; - } - - - if(!cJSON_IsString(_namespace)) - { - goto end; //String - } - - // send_template_request->chat_id - cJSON *chat_id = cJSON_GetObjectItemCaseSensitive(send_template_requestJSON, "chatId"); - if (chat_id) { - if(!cJSON_IsString(chat_id) && !cJSON_IsNull(chat_id)) - { - goto end; //String - } - } - - // send_template_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(send_template_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsNumber(phone)) - { - goto end; //Numeric - } - } - - // send_template_request->_template - cJSON *_template = cJSON_GetObjectItemCaseSensitive(send_template_requestJSON, "template"); - if (!_template) { - goto end; - } - - - if(!cJSON_IsString(_template)) - { - goto end; //String - } - - // send_template_request->language - cJSON *language = cJSON_GetObjectItemCaseSensitive(send_template_requestJSON, "language"); - if (!language) { - goto end; - } - - - language_local_nonprim = send_template_request_all_of_language_parseFromJSON(language); //nonprimitive - - // send_template_request->params - cJSON *params = cJSON_GetObjectItemCaseSensitive(send_template_requestJSON, "params"); - if (params) { - cJSON *params_local_nonprimitive = NULL; - if(!cJSON_IsArray(params)){ - goto end; //nonprimitive container - } - - paramsList = list_createList(); - - cJSON_ArrayForEach(params_local_nonprimitive,params ) - { - if(!cJSON_IsObject(params_local_nonprimitive)){ - goto end; - } - send_template_request_all_of_params_t *paramsItem = send_template_request_all_of_params_parseFromJSON(params_local_nonprimitive); - - list_addElement(paramsList, paramsItem); - } - } - - - send_template_request_local_var = send_template_request_create ( - strdup(_namespace->valuestring), - chat_id && !cJSON_IsNull(chat_id) ? strdup(chat_id->valuestring) : NULL, - phone ? phone->valuedouble : 0, - strdup(_template->valuestring), - language_local_nonprim, - params ? paramsList : NULL - ); - - return send_template_request_local_var; -end: - if (language_local_nonprim) { - send_template_request_all_of_language_free(language_local_nonprim); - language_local_nonprim = NULL; - } - if (paramsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, paramsList) { - send_template_request_all_of_params_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(paramsList); - paramsList = NULL; - } - return NULL; - -} diff --git a/c/model/send_template_request.h b/c/model/send_template_request.h deleted file mode 100644 index 0aa4ee1..0000000 --- a/c/model/send_template_request.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * send_template_request.h - * - * - */ - -#ifndef _send_template_request_H_ -#define _send_template_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_t send_template_request_t; - -#include "send_template_request_all_of_language.h" -#include "send_template_request_all_of_params.h" - - - -typedef struct send_template_request_t { - char *_namespace; // string - char *chat_id; // string - int phone; //numeric - char *_template; // string - struct send_template_request_all_of_language_t *language; //model - list_t *params; //nonprimitive container - -} send_template_request_t; - -send_template_request_t *send_template_request_create( - char *_namespace, - char *chat_id, - int phone, - char *_template, - send_template_request_all_of_language_t *language, - list_t *params -); - -void send_template_request_free(send_template_request_t *send_template_request); - -send_template_request_t *send_template_request_parseFromJSON(cJSON *send_template_requestJSON); - -cJSON *send_template_request_convertToJSON(send_template_request_t *send_template_request); - -#endif /* _send_template_request_H_ */ - diff --git a/c/model/send_template_request_all_of_currency.c b/c/model/send_template_request_all_of_currency.c deleted file mode 100644 index 7f4a7a0..0000000 --- a/c/model/send_template_request_all_of_currency.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include -#include "send_template_request_all_of_currency.h" - - - -send_template_request_all_of_currency_t *send_template_request_all_of_currency_create( - char *currency_code, - int amount_1000 - ) { - send_template_request_all_of_currency_t *send_template_request_all_of_currency_local_var = malloc(sizeof(send_template_request_all_of_currency_t)); - if (!send_template_request_all_of_currency_local_var) { - return NULL; - } - send_template_request_all_of_currency_local_var->currency_code = currency_code; - send_template_request_all_of_currency_local_var->amount_1000 = amount_1000; - - return send_template_request_all_of_currency_local_var; -} - - -void send_template_request_all_of_currency_free(send_template_request_all_of_currency_t *send_template_request_all_of_currency) { - if(NULL == send_template_request_all_of_currency){ - return ; - } - listEntry_t *listEntry; - if (send_template_request_all_of_currency->currency_code) { - free(send_template_request_all_of_currency->currency_code); - send_template_request_all_of_currency->currency_code = NULL; - } - free(send_template_request_all_of_currency); -} - -cJSON *send_template_request_all_of_currency_convertToJSON(send_template_request_all_of_currency_t *send_template_request_all_of_currency) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request_all_of_currency->currency_code - if(send_template_request_all_of_currency->currency_code) { - if(cJSON_AddStringToObject(item, "currency_code", send_template_request_all_of_currency->currency_code) == NULL) { - goto fail; //String - } - } - - - // send_template_request_all_of_currency->amount_1000 - if(send_template_request_all_of_currency->amount_1000) { - if(cJSON_AddNumberToObject(item, "amount_1000", send_template_request_all_of_currency->amount_1000) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_all_of_currency_t *send_template_request_all_of_currency_parseFromJSON(cJSON *send_template_request_all_of_currencyJSON){ - - send_template_request_all_of_currency_t *send_template_request_all_of_currency_local_var = NULL; - - // send_template_request_all_of_currency->currency_code - cJSON *currency_code = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_currencyJSON, "currency_code"); - if (currency_code) { - if(!cJSON_IsString(currency_code) && !cJSON_IsNull(currency_code)) - { - goto end; //String - } - } - - // send_template_request_all_of_currency->amount_1000 - cJSON *amount_1000 = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_currencyJSON, "amount_1000"); - if (amount_1000) { - if(!cJSON_IsNumber(amount_1000)) - { - goto end; //Numeric - } - } - - - send_template_request_all_of_currency_local_var = send_template_request_all_of_currency_create ( - currency_code && !cJSON_IsNull(currency_code) ? strdup(currency_code->valuestring) : NULL, - amount_1000 ? amount_1000->valuedouble : 0 - ); - - return send_template_request_all_of_currency_local_var; -end: - return NULL; - -} diff --git a/c/model/send_template_request_all_of_currency.h b/c/model/send_template_request_all_of_currency.h deleted file mode 100644 index 6fafc25..0000000 --- a/c/model/send_template_request_all_of_currency.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * send_template_request_all_of_currency.h - * - * - */ - -#ifndef _send_template_request_all_of_currency_H_ -#define _send_template_request_all_of_currency_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_all_of_currency_t send_template_request_all_of_currency_t; - - - - -typedef struct send_template_request_all_of_currency_t { - char *currency_code; // string - int amount_1000; //numeric - -} send_template_request_all_of_currency_t; - -send_template_request_all_of_currency_t *send_template_request_all_of_currency_create( - char *currency_code, - int amount_1000 -); - -void send_template_request_all_of_currency_free(send_template_request_all_of_currency_t *send_template_request_all_of_currency); - -send_template_request_all_of_currency_t *send_template_request_all_of_currency_parseFromJSON(cJSON *send_template_request_all_of_currencyJSON); - -cJSON *send_template_request_all_of_currency_convertToJSON(send_template_request_all_of_currency_t *send_template_request_all_of_currency); - -#endif /* _send_template_request_all_of_currency_H_ */ - diff --git a/c/model/send_template_request_all_of_date_time.c b/c/model/send_template_request_all_of_date_time.c deleted file mode 100644 index 257e199..0000000 --- a/c/model/send_template_request_all_of_date_time.c +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include -#include -#include "send_template_request_all_of_date_time.h" - - - -send_template_request_all_of_date_time_t *send_template_request_all_of_date_time_create( - send_template_request_all_of_date_time_component_t *component, - send_template_request_all_of_date_time_unix_epoch_t *unix_epoch - ) { - send_template_request_all_of_date_time_t *send_template_request_all_of_date_time_local_var = malloc(sizeof(send_template_request_all_of_date_time_t)); - if (!send_template_request_all_of_date_time_local_var) { - return NULL; - } - send_template_request_all_of_date_time_local_var->component = component; - send_template_request_all_of_date_time_local_var->unix_epoch = unix_epoch; - - return send_template_request_all_of_date_time_local_var; -} - - -void send_template_request_all_of_date_time_free(send_template_request_all_of_date_time_t *send_template_request_all_of_date_time) { - if(NULL == send_template_request_all_of_date_time){ - return ; - } - listEntry_t *listEntry; - if (send_template_request_all_of_date_time->component) { - send_template_request_all_of_date_time_component_free(send_template_request_all_of_date_time->component); - send_template_request_all_of_date_time->component = NULL; - } - if (send_template_request_all_of_date_time->unix_epoch) { - send_template_request_all_of_date_time_unix_epoch_free(send_template_request_all_of_date_time->unix_epoch); - send_template_request_all_of_date_time->unix_epoch = NULL; - } - free(send_template_request_all_of_date_time); -} - -cJSON *send_template_request_all_of_date_time_convertToJSON(send_template_request_all_of_date_time_t *send_template_request_all_of_date_time) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request_all_of_date_time->component - if(send_template_request_all_of_date_time->component) { - cJSON *component_local_JSON = send_template_request_all_of_date_time_component_convertToJSON(send_template_request_all_of_date_time->component); - if(component_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "component", component_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // send_template_request_all_of_date_time->unix_epoch - if(send_template_request_all_of_date_time->unix_epoch) { - cJSON *unix_epoch_local_JSON = send_template_request_all_of_date_time_unix_epoch_convertToJSON(send_template_request_all_of_date_time->unix_epoch); - if(unix_epoch_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "unix_epoch", unix_epoch_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_all_of_date_time_t *send_template_request_all_of_date_time_parseFromJSON(cJSON *send_template_request_all_of_date_timeJSON){ - - send_template_request_all_of_date_time_t *send_template_request_all_of_date_time_local_var = NULL; - - // define the local variable for send_template_request_all_of_date_time->component - send_template_request_all_of_date_time_component_t *component_local_nonprim = NULL; - - // define the local variable for send_template_request_all_of_date_time->unix_epoch - send_template_request_all_of_date_time_unix_epoch_t *unix_epoch_local_nonprim = NULL; - - // send_template_request_all_of_date_time->component - cJSON *component = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_timeJSON, "component"); - if (component) { - component_local_nonprim = send_template_request_all_of_date_time_component_parseFromJSON(component); //nonprimitive - } - - // send_template_request_all_of_date_time->unix_epoch - cJSON *unix_epoch = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_timeJSON, "unix_epoch"); - if (unix_epoch) { - unix_epoch_local_nonprim = send_template_request_all_of_date_time_unix_epoch_parseFromJSON(unix_epoch); //nonprimitive - } - - - send_template_request_all_of_date_time_local_var = send_template_request_all_of_date_time_create ( - component ? component_local_nonprim : NULL, - unix_epoch ? unix_epoch_local_nonprim : NULL - ); - - return send_template_request_all_of_date_time_local_var; -end: - if (component_local_nonprim) { - send_template_request_all_of_date_time_component_free(component_local_nonprim); - component_local_nonprim = NULL; - } - if (unix_epoch_local_nonprim) { - send_template_request_all_of_date_time_unix_epoch_free(unix_epoch_local_nonprim); - unix_epoch_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/send_template_request_all_of_date_time.h b/c/model/send_template_request_all_of_date_time.h deleted file mode 100644 index b854f93..0000000 --- a/c/model/send_template_request_all_of_date_time.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * send_template_request_all_of_date_time.h - * - * - */ - -#ifndef _send_template_request_all_of_date_time_H_ -#define _send_template_request_all_of_date_time_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_all_of_date_time_t send_template_request_all_of_date_time_t; - -#include "send_template_request_all_of_date_time_component.h" -#include "send_template_request_all_of_date_time_unix_epoch.h" - - - -typedef struct send_template_request_all_of_date_time_t { - struct send_template_request_all_of_date_time_component_t *component; //model - struct send_template_request_all_of_date_time_unix_epoch_t *unix_epoch; //model - -} send_template_request_all_of_date_time_t; - -send_template_request_all_of_date_time_t *send_template_request_all_of_date_time_create( - send_template_request_all_of_date_time_component_t *component, - send_template_request_all_of_date_time_unix_epoch_t *unix_epoch -); - -void send_template_request_all_of_date_time_free(send_template_request_all_of_date_time_t *send_template_request_all_of_date_time); - -send_template_request_all_of_date_time_t *send_template_request_all_of_date_time_parseFromJSON(cJSON *send_template_request_all_of_date_timeJSON); - -cJSON *send_template_request_all_of_date_time_convertToJSON(send_template_request_all_of_date_time_t *send_template_request_all_of_date_time); - -#endif /* _send_template_request_all_of_date_time_H_ */ - diff --git a/c/model/send_template_request_all_of_date_time_component.c b/c/model/send_template_request_all_of_date_time_component.c deleted file mode 100644 index 5333c4d..0000000 --- a/c/model/send_template_request_all_of_date_time_component.c +++ /dev/null @@ -1,229 +0,0 @@ -#include -#include -#include -#include "send_template_request_all_of_date_time_component.h" - - -char* day_of_weeksend_template_request_all_of_date_time_component_ToString(one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_week) { - char* day_of_weekArray[] = { "NULL", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY", "1", "2", "3", "4", "5", "6", "7" }; - return day_of_weekArray[day_of_week]; -} - -one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_weeksend_template_request_all_of_date_time_component_FromString(char* day_of_week){ - int stringToReturn = 0; - char *day_of_weekArray[] = { "NULL", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY", "1", "2", "3", "4", "5", "6", "7" }; - size_t sizeofArray = sizeof(day_of_weekArray) / sizeof(day_of_weekArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(day_of_week, day_of_weekArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} -char* calendarsend_template_request_all_of_date_time_component_ToString(one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendar) { - char* calendarArray[] = { "NULL", "GREGORIAN", "SOLAR_HIJRI" }; - return calendarArray[calendar]; -} - -one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendarsend_template_request_all_of_date_time_component_FromString(char* calendar){ - int stringToReturn = 0; - char *calendarArray[] = { "NULL", "GREGORIAN", "SOLAR_HIJRI" }; - size_t sizeofArray = sizeof(calendarArray) / sizeof(calendarArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(calendar, calendarArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component_create( - one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_week, - int year, - int month, - int day_of_month, - int hour, - int minute, - one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendar - ) { - send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component_local_var = malloc(sizeof(send_template_request_all_of_date_time_component_t)); - if (!send_template_request_all_of_date_time_component_local_var) { - return NULL; - } - send_template_request_all_of_date_time_component_local_var->day_of_week = day_of_week; - send_template_request_all_of_date_time_component_local_var->year = year; - send_template_request_all_of_date_time_component_local_var->month = month; - send_template_request_all_of_date_time_component_local_var->day_of_month = day_of_month; - send_template_request_all_of_date_time_component_local_var->hour = hour; - send_template_request_all_of_date_time_component_local_var->minute = minute; - send_template_request_all_of_date_time_component_local_var->calendar = calendar; - - return send_template_request_all_of_date_time_component_local_var; -} - - -void send_template_request_all_of_date_time_component_free(send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component) { - if(NULL == send_template_request_all_of_date_time_component){ - return ; - } - listEntry_t *listEntry; - free(send_template_request_all_of_date_time_component); -} - -cJSON *send_template_request_all_of_date_time_component_convertToJSON(send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request_all_of_date_time_component->day_of_week - if(send_template_request_all_of_date_time_component->day_of_week != one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_NULL) { - if(cJSON_AddStringToObject(item, "day_of_week", day_of_weeksend_template_request_all_of_date_time_component_ToString(send_template_request_all_of_date_time_component->day_of_week)) == NULL) - { - goto fail; //Enum - } - } - - - // send_template_request_all_of_date_time_component->year - if(send_template_request_all_of_date_time_component->year) { - if(cJSON_AddNumberToObject(item, "year", send_template_request_all_of_date_time_component->year) == NULL) { - goto fail; //Numeric - } - } - - - // send_template_request_all_of_date_time_component->month - if(send_template_request_all_of_date_time_component->month) { - if(cJSON_AddNumberToObject(item, "month", send_template_request_all_of_date_time_component->month) == NULL) { - goto fail; //Numeric - } - } - - - // send_template_request_all_of_date_time_component->day_of_month - if(send_template_request_all_of_date_time_component->day_of_month) { - if(cJSON_AddNumberToObject(item, "day_of_month", send_template_request_all_of_date_time_component->day_of_month) == NULL) { - goto fail; //Numeric - } - } - - - // send_template_request_all_of_date_time_component->hour - if(send_template_request_all_of_date_time_component->hour) { - if(cJSON_AddNumberToObject(item, "hour", send_template_request_all_of_date_time_component->hour) == NULL) { - goto fail; //Numeric - } - } - - - // send_template_request_all_of_date_time_component->minute - if(send_template_request_all_of_date_time_component->minute) { - if(cJSON_AddNumberToObject(item, "minute", send_template_request_all_of_date_time_component->minute) == NULL) { - goto fail; //Numeric - } - } - - - // send_template_request_all_of_date_time_component->calendar - if(send_template_request_all_of_date_time_component->calendar != one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_NULL) { - if(cJSON_AddStringToObject(item, "calendar", calendarsend_template_request_all_of_date_time_component_ToString(send_template_request_all_of_date_time_component->calendar)) == NULL) - { - goto fail; //Enum - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component_parseFromJSON(cJSON *send_template_request_all_of_date_time_componentJSON){ - - send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component_local_var = NULL; - - // send_template_request_all_of_date_time_component->day_of_week - cJSON *day_of_week = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "day_of_week"); - one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_weekVariable; - if (day_of_week) { - if(!cJSON_IsString(day_of_week)) - { - goto end; //Enum - } - day_of_weekVariable = day_of_weeksend_template_request_all_of_date_time_component_FromString(day_of_week->valuestring); - } - - // send_template_request_all_of_date_time_component->year - cJSON *year = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "year"); - if (year) { - if(!cJSON_IsNumber(year)) - { - goto end; //Numeric - } - } - - // send_template_request_all_of_date_time_component->month - cJSON *month = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "month"); - if (month) { - if(!cJSON_IsNumber(month)) - { - goto end; //Numeric - } - } - - // send_template_request_all_of_date_time_component->day_of_month - cJSON *day_of_month = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "day_of_month"); - if (day_of_month) { - if(!cJSON_IsNumber(day_of_month)) - { - goto end; //Numeric - } - } - - // send_template_request_all_of_date_time_component->hour - cJSON *hour = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "hour"); - if (hour) { - if(!cJSON_IsNumber(hour)) - { - goto end; //Numeric - } - } - - // send_template_request_all_of_date_time_component->minute - cJSON *minute = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "minute"); - if (minute) { - if(!cJSON_IsNumber(minute)) - { - goto end; //Numeric - } - } - - // send_template_request_all_of_date_time_component->calendar - cJSON *calendar = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_componentJSON, "calendar"); - one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendarVariable; - if (calendar) { - if(!cJSON_IsString(calendar)) - { - goto end; //Enum - } - calendarVariable = calendarsend_template_request_all_of_date_time_component_FromString(calendar->valuestring); - } - - - send_template_request_all_of_date_time_component_local_var = send_template_request_all_of_date_time_component_create ( - day_of_week ? day_of_weekVariable : -1, - year ? year->valuedouble : 0, - month ? month->valuedouble : 0, - day_of_month ? day_of_month->valuedouble : 0, - hour ? hour->valuedouble : 0, - minute ? minute->valuedouble : 0, - calendar ? calendarVariable : -1 - ); - - return send_template_request_all_of_date_time_component_local_var; -end: - return NULL; - -} diff --git a/c/model/send_template_request_all_of_date_time_component.h b/c/model/send_template_request_all_of_date_time_component.h deleted file mode 100644 index a2a6e75..0000000 --- a/c/model/send_template_request_all_of_date_time_component.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * send_template_request_all_of_date_time_component.h - * - * - */ - -#ifndef _send_template_request_all_of_date_time_component_H_ -#define _send_template_request_all_of_date_time_component_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_all_of_date_time_component_t send_template_request_all_of_date_time_component_t; - - -// Enum DAYOFWEEK for send_template_request_all_of_date_time_component - -typedef enum { one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_NULL = 0, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_MONDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_TUESDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_WEDNESDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_THURSDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_FRIDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_SATURDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_SUNDAY, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__1, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__2, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__3, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__4, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__5, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__6, one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK__7 } one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e; - -char* send_template_request_all_of_date_time_component_day_of_week_ToString(one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_week); - -one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e send_template_request_all_of_date_time_component_day_of_week_FromString(char* day_of_week); - -// Enum CALENDAR for send_template_request_all_of_date_time_component - -typedef enum { one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_NULL = 0, one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_GREGORIAN, one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_SOLAR_HIJRI } one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e; - -char* send_template_request_all_of_date_time_component_calendar_ToString(one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendar); - -one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e send_template_request_all_of_date_time_component_calendar_FromString(char* calendar); - - - -typedef struct send_template_request_all_of_date_time_component_t { - one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_week; //enum - int year; //numeric - int month; //numeric - int day_of_month; //numeric - int hour; //numeric - int minute; //numeric - one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendar; //enum - -} send_template_request_all_of_date_time_component_t; - -send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component_create( - one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_e day_of_week, - int year, - int month, - int day_of_month, - int hour, - int minute, - one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_e calendar -); - -void send_template_request_all_of_date_time_component_free(send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component); - -send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component_parseFromJSON(cJSON *send_template_request_all_of_date_time_componentJSON); - -cJSON *send_template_request_all_of_date_time_component_convertToJSON(send_template_request_all_of_date_time_component_t *send_template_request_all_of_date_time_component); - -#endif /* _send_template_request_all_of_date_time_component_H_ */ - diff --git a/c/model/send_template_request_all_of_date_time_unix_epoch.c b/c/model/send_template_request_all_of_date_time_unix_epoch.c deleted file mode 100644 index 29bd9b8..0000000 --- a/c/model/send_template_request_all_of_date_time_unix_epoch.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include -#include -#include "send_template_request_all_of_date_time_unix_epoch.h" - - - -send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch_create( - int timestamp - ) { - send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch_local_var = malloc(sizeof(send_template_request_all_of_date_time_unix_epoch_t)); - if (!send_template_request_all_of_date_time_unix_epoch_local_var) { - return NULL; - } - send_template_request_all_of_date_time_unix_epoch_local_var->timestamp = timestamp; - - return send_template_request_all_of_date_time_unix_epoch_local_var; -} - - -void send_template_request_all_of_date_time_unix_epoch_free(send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch) { - if(NULL == send_template_request_all_of_date_time_unix_epoch){ - return ; - } - listEntry_t *listEntry; - free(send_template_request_all_of_date_time_unix_epoch); -} - -cJSON *send_template_request_all_of_date_time_unix_epoch_convertToJSON(send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request_all_of_date_time_unix_epoch->timestamp - if(send_template_request_all_of_date_time_unix_epoch->timestamp) { - if(cJSON_AddNumberToObject(item, "timestamp", send_template_request_all_of_date_time_unix_epoch->timestamp) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch_parseFromJSON(cJSON *send_template_request_all_of_date_time_unix_epochJSON){ - - send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch_local_var = NULL; - - // send_template_request_all_of_date_time_unix_epoch->timestamp - cJSON *timestamp = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_date_time_unix_epochJSON, "timestamp"); - if (timestamp) { - if(!cJSON_IsNumber(timestamp)) - { - goto end; //Numeric - } - } - - - send_template_request_all_of_date_time_unix_epoch_local_var = send_template_request_all_of_date_time_unix_epoch_create ( - timestamp ? timestamp->valuedouble : 0 - ); - - return send_template_request_all_of_date_time_unix_epoch_local_var; -end: - return NULL; - -} diff --git a/c/model/send_template_request_all_of_date_time_unix_epoch.h b/c/model/send_template_request_all_of_date_time_unix_epoch.h deleted file mode 100644 index 3e66476..0000000 --- a/c/model/send_template_request_all_of_date_time_unix_epoch.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * send_template_request_all_of_date_time_unix_epoch.h - * - * - */ - -#ifndef _send_template_request_all_of_date_time_unix_epoch_H_ -#define _send_template_request_all_of_date_time_unix_epoch_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_all_of_date_time_unix_epoch_t send_template_request_all_of_date_time_unix_epoch_t; - - - - -typedef struct send_template_request_all_of_date_time_unix_epoch_t { - int timestamp; //numeric - -} send_template_request_all_of_date_time_unix_epoch_t; - -send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch_create( - int timestamp -); - -void send_template_request_all_of_date_time_unix_epoch_free(send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch); - -send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch_parseFromJSON(cJSON *send_template_request_all_of_date_time_unix_epochJSON); - -cJSON *send_template_request_all_of_date_time_unix_epoch_convertToJSON(send_template_request_all_of_date_time_unix_epoch_t *send_template_request_all_of_date_time_unix_epoch); - -#endif /* _send_template_request_all_of_date_time_unix_epoch_H_ */ - diff --git a/c/model/send_template_request_all_of_language.c b/c/model/send_template_request_all_of_language.c deleted file mode 100644 index 626c977..0000000 --- a/c/model/send_template_request_all_of_language.c +++ /dev/null @@ -1,139 +0,0 @@ -#include -#include -#include -#include "send_template_request_all_of_language.h" - - -char* policysend_template_request_all_of_language_ToString(one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policy) { - char* policyArray[] = { "NULL", "deterministic" }; - return policyArray[policy]; -} - -one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policysend_template_request_all_of_language_FromString(char* policy){ - int stringToReturn = 0; - char *policyArray[] = { "NULL", "deterministic" }; - size_t sizeofArray = sizeof(policyArray) / sizeof(policyArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(policy, policyArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} -char* codesend_template_request_all_of_language_ToString(one_msg_waba_sdk_send_template_request_all_of_language__e code) { - char* codeArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - return codeArray[code]; -} - -one_msg_waba_sdk_send_template_request_all_of_language__e codesend_template_request_all_of_language_FromString(char* code){ - int stringToReturn = 0; - char *codeArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - size_t sizeofArray = sizeof(codeArray) / sizeof(codeArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(code, codeArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -send_template_request_all_of_language_t *send_template_request_all_of_language_create( - one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policy, - template_language_prop_t *code - ) { - send_template_request_all_of_language_t *send_template_request_all_of_language_local_var = malloc(sizeof(send_template_request_all_of_language_t)); - if (!send_template_request_all_of_language_local_var) { - return NULL; - } - send_template_request_all_of_language_local_var->policy = policy; - send_template_request_all_of_language_local_var->code = code; - - return send_template_request_all_of_language_local_var; -} - - -void send_template_request_all_of_language_free(send_template_request_all_of_language_t *send_template_request_all_of_language) { - if(NULL == send_template_request_all_of_language){ - return ; - } - listEntry_t *listEntry; - if (send_template_request_all_of_language->code) { - template_language_prop_free(send_template_request_all_of_language->code); - send_template_request_all_of_language->code = NULL; - } - free(send_template_request_all_of_language); -} - -cJSON *send_template_request_all_of_language_convertToJSON(send_template_request_all_of_language_t *send_template_request_all_of_language) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request_all_of_language->policy - if(send_template_request_all_of_language->policy != one_msg_waba_sdk_send_template_request_all_of_language_POLICY_NULL) { - if(cJSON_AddStringToObject(item, "policy", policysend_template_request_all_of_language_ToString(send_template_request_all_of_language->policy)) == NULL) - { - goto fail; //Enum - } - } - - - // send_template_request_all_of_language->code - if(send_template_request_all_of_language->code != one_msg_waba_sdk_send_template_request_all_of_language__NULL) { - cJSON *code_local_JSON = template_language_prop_convertToJSON(send_template_request_all_of_language->code); - if(code_local_JSON == NULL) { - goto fail; // custom - } - cJSON_AddItemToObject(item, "code", code_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_all_of_language_t *send_template_request_all_of_language_parseFromJSON(cJSON *send_template_request_all_of_languageJSON){ - - send_template_request_all_of_language_t *send_template_request_all_of_language_local_var = NULL; - - // define the local variable for send_template_request_all_of_language->code - template_language_prop_t *code_local_nonprim = NULL; - - // send_template_request_all_of_language->policy - cJSON *policy = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_languageJSON, "policy"); - one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policyVariable; - if (policy) { - if(!cJSON_IsString(policy)) - { - goto end; //Enum - } - policyVariable = policysend_template_request_all_of_language_FromString(policy->valuestring); - } - - // send_template_request_all_of_language->code - cJSON *code = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_languageJSON, "code"); - if (code) { - code_local_nonprim = template_language_prop_parseFromJSON(code); //custom - } - - - send_template_request_all_of_language_local_var = send_template_request_all_of_language_create ( - policy ? policyVariable : -1, - code ? code_local_nonprim : NULL - ); - - return send_template_request_all_of_language_local_var; -end: - if (code_local_nonprim) { - template_language_prop_free(code_local_nonprim); - code_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/send_template_request_all_of_language.h b/c/model/send_template_request_all_of_language.h deleted file mode 100644 index eb84155..0000000 --- a/c/model/send_template_request_all_of_language.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * send_template_request_all_of_language.h - * - * Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - */ - -#ifndef _send_template_request_all_of_language_H_ -#define _send_template_request_all_of_language_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_all_of_language_t send_template_request_all_of_language_t; - -#include "template_language_prop.h" - -// Enum POLICY for send_template_request_all_of_language - -typedef enum { one_msg_waba_sdk_send_template_request_all_of_language_POLICY_NULL = 0, one_msg_waba_sdk_send_template_request_all_of_language_POLICY_deterministic } one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e; - -char* send_template_request_all_of_language_policy_ToString(one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policy); - -one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e send_template_request_all_of_language_policy_FromString(char* policy); - -// Enum for send_template_request_all_of_language - -typedef enum { one_msg_waba_sdk_send_template_request_all_of_language__NULL = 0, one_msg_waba_sdk_send_template_request_all_of_language__af, one_msg_waba_sdk_send_template_request_all_of_language__sq, one_msg_waba_sdk_send_template_request_all_of_language__ar, one_msg_waba_sdk_send_template_request_all_of_language__az, one_msg_waba_sdk_send_template_request_all_of_language__bn, one_msg_waba_sdk_send_template_request_all_of_language__bg, one_msg_waba_sdk_send_template_request_all_of_language__ca, one_msg_waba_sdk_send_template_request_all_of_language__zh_CN, one_msg_waba_sdk_send_template_request_all_of_language__zh_HK, one_msg_waba_sdk_send_template_request_all_of_language__zh_TW, one_msg_waba_sdk_send_template_request_all_of_language__hr, one_msg_waba_sdk_send_template_request_all_of_language__cs, one_msg_waba_sdk_send_template_request_all_of_language__da, one_msg_waba_sdk_send_template_request_all_of_language__nl, one_msg_waba_sdk_send_template_request_all_of_language__en, one_msg_waba_sdk_send_template_request_all_of_language__en_GB, one_msg_waba_sdk_send_template_request_all_of_language__en_US, one_msg_waba_sdk_send_template_request_all_of_language__et, one_msg_waba_sdk_send_template_request_all_of_language__fil, one_msg_waba_sdk_send_template_request_all_of_language__fi, one_msg_waba_sdk_send_template_request_all_of_language__fr, one_msg_waba_sdk_send_template_request_all_of_language__de, one_msg_waba_sdk_send_template_request_all_of_language__el, one_msg_waba_sdk_send_template_request_all_of_language__gu, one_msg_waba_sdk_send_template_request_all_of_language__he, one_msg_waba_sdk_send_template_request_all_of_language__hi, one_msg_waba_sdk_send_template_request_all_of_language__hu, one_msg_waba_sdk_send_template_request_all_of_language__id, one_msg_waba_sdk_send_template_request_all_of_language__ga, one_msg_waba_sdk_send_template_request_all_of_language__it, one_msg_waba_sdk_send_template_request_all_of_language__ja, one_msg_waba_sdk_send_template_request_all_of_language__kn, one_msg_waba_sdk_send_template_request_all_of_language__kk, one_msg_waba_sdk_send_template_request_all_of_language__ko, one_msg_waba_sdk_send_template_request_all_of_language__lo, one_msg_waba_sdk_send_template_request_all_of_language__lv, one_msg_waba_sdk_send_template_request_all_of_language__lt, one_msg_waba_sdk_send_template_request_all_of_language__mk, one_msg_waba_sdk_send_template_request_all_of_language__ms, one_msg_waba_sdk_send_template_request_all_of_language__mr, one_msg_waba_sdk_send_template_request_all_of_language__nb, one_msg_waba_sdk_send_template_request_all_of_language__fa, one_msg_waba_sdk_send_template_request_all_of_language__pl, one_msg_waba_sdk_send_template_request_all_of_language__pt_BR, one_msg_waba_sdk_send_template_request_all_of_language__pt_PT, one_msg_waba_sdk_send_template_request_all_of_language__pa, one_msg_waba_sdk_send_template_request_all_of_language__ro, one_msg_waba_sdk_send_template_request_all_of_language__ru, one_msg_waba_sdk_send_template_request_all_of_language__sr, one_msg_waba_sdk_send_template_request_all_of_language__sk, one_msg_waba_sdk_send_template_request_all_of_language__sl, one_msg_waba_sdk_send_template_request_all_of_language__es, one_msg_waba_sdk_send_template_request_all_of_language__es_AR, one_msg_waba_sdk_send_template_request_all_of_language__es_ES, one_msg_waba_sdk_send_template_request_all_of_language__es_MX, one_msg_waba_sdk_send_template_request_all_of_language__sw, one_msg_waba_sdk_send_template_request_all_of_language__sv, one_msg_waba_sdk_send_template_request_all_of_language__ta, one_msg_waba_sdk_send_template_request_all_of_language__te, one_msg_waba_sdk_send_template_request_all_of_language__th, one_msg_waba_sdk_send_template_request_all_of_language__tr, one_msg_waba_sdk_send_template_request_all_of_language__uk, one_msg_waba_sdk_send_template_request_all_of_language__ur, one_msg_waba_sdk_send_template_request_all_of_language__uz, one_msg_waba_sdk_send_template_request_all_of_language__vi } one_msg_waba_sdk_send_template_request_all_of_language__e; - -char* send_template_request_all_of_language_code_ToString(one_msg_waba_sdk_send_template_request_all_of_language__e code); - -one_msg_waba_sdk_send_template_request_all_of_language__e send_template_request_all_of_language_code_FromString(char* code); - - - -typedef struct send_template_request_all_of_language_t { - one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policy; //enum - template_language_prop_t *code; // custom - -} send_template_request_all_of_language_t; - -send_template_request_all_of_language_t *send_template_request_all_of_language_create( - one_msg_waba_sdk_send_template_request_all_of_language_POLICY_e policy, - template_language_prop_t *code -); - -void send_template_request_all_of_language_free(send_template_request_all_of_language_t *send_template_request_all_of_language); - -send_template_request_all_of_language_t *send_template_request_all_of_language_parseFromJSON(cJSON *send_template_request_all_of_languageJSON); - -cJSON *send_template_request_all_of_language_convertToJSON(send_template_request_all_of_language_t *send_template_request_all_of_language); - -#endif /* _send_template_request_all_of_language_H_ */ - diff --git a/c/model/send_template_request_all_of_params.c b/c/model/send_template_request_all_of_params.c deleted file mode 100644 index d838047..0000000 --- a/c/model/send_template_request_all_of_params.c +++ /dev/null @@ -1,139 +0,0 @@ -#include -#include -#include -#include "send_template_request_all_of_params.h" - - - -send_template_request_all_of_params_t *send_template_request_all_of_params_create( - char *_default, - send_template_request_all_of_currency_t *currency, - send_template_request_all_of_date_time_t *date_time - ) { - send_template_request_all_of_params_t *send_template_request_all_of_params_local_var = malloc(sizeof(send_template_request_all_of_params_t)); - if (!send_template_request_all_of_params_local_var) { - return NULL; - } - send_template_request_all_of_params_local_var->_default = _default; - send_template_request_all_of_params_local_var->currency = currency; - send_template_request_all_of_params_local_var->date_time = date_time; - - return send_template_request_all_of_params_local_var; -} - - -void send_template_request_all_of_params_free(send_template_request_all_of_params_t *send_template_request_all_of_params) { - if(NULL == send_template_request_all_of_params){ - return ; - } - listEntry_t *listEntry; - if (send_template_request_all_of_params->_default) { - free(send_template_request_all_of_params->_default); - send_template_request_all_of_params->_default = NULL; - } - if (send_template_request_all_of_params->currency) { - send_template_request_all_of_currency_free(send_template_request_all_of_params->currency); - send_template_request_all_of_params->currency = NULL; - } - if (send_template_request_all_of_params->date_time) { - send_template_request_all_of_date_time_free(send_template_request_all_of_params->date_time); - send_template_request_all_of_params->date_time = NULL; - } - free(send_template_request_all_of_params); -} - -cJSON *send_template_request_all_of_params_convertToJSON(send_template_request_all_of_params_t *send_template_request_all_of_params) { - cJSON *item = cJSON_CreateObject(); - - // send_template_request_all_of_params->_default - if(send_template_request_all_of_params->_default) { - if(cJSON_AddStringToObject(item, "default", send_template_request_all_of_params->_default) == NULL) { - goto fail; //String - } - } - - - // send_template_request_all_of_params->currency - if(send_template_request_all_of_params->currency) { - cJSON *currency_local_JSON = send_template_request_all_of_currency_convertToJSON(send_template_request_all_of_params->currency); - if(currency_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "currency", currency_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // send_template_request_all_of_params->date_time - if(send_template_request_all_of_params->date_time) { - cJSON *date_time_local_JSON = send_template_request_all_of_date_time_convertToJSON(send_template_request_all_of_params->date_time); - if(date_time_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "date_time", date_time_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -send_template_request_all_of_params_t *send_template_request_all_of_params_parseFromJSON(cJSON *send_template_request_all_of_paramsJSON){ - - send_template_request_all_of_params_t *send_template_request_all_of_params_local_var = NULL; - - // define the local variable for send_template_request_all_of_params->currency - send_template_request_all_of_currency_t *currency_local_nonprim = NULL; - - // define the local variable for send_template_request_all_of_params->date_time - send_template_request_all_of_date_time_t *date_time_local_nonprim = NULL; - - // send_template_request_all_of_params->_default - cJSON *_default = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_paramsJSON, "default"); - if (_default) { - if(!cJSON_IsString(_default) && !cJSON_IsNull(_default)) - { - goto end; //String - } - } - - // send_template_request_all_of_params->currency - cJSON *currency = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_paramsJSON, "currency"); - if (currency) { - currency_local_nonprim = send_template_request_all_of_currency_parseFromJSON(currency); //nonprimitive - } - - // send_template_request_all_of_params->date_time - cJSON *date_time = cJSON_GetObjectItemCaseSensitive(send_template_request_all_of_paramsJSON, "date_time"); - if (date_time) { - date_time_local_nonprim = send_template_request_all_of_date_time_parseFromJSON(date_time); //nonprimitive - } - - - send_template_request_all_of_params_local_var = send_template_request_all_of_params_create ( - _default && !cJSON_IsNull(_default) ? strdup(_default->valuestring) : NULL, - currency ? currency_local_nonprim : NULL, - date_time ? date_time_local_nonprim : NULL - ); - - return send_template_request_all_of_params_local_var; -end: - if (currency_local_nonprim) { - send_template_request_all_of_currency_free(currency_local_nonprim); - currency_local_nonprim = NULL; - } - if (date_time_local_nonprim) { - send_template_request_all_of_date_time_free(date_time_local_nonprim); - date_time_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/send_template_request_all_of_params.h b/c/model/send_template_request_all_of_params.h deleted file mode 100644 index 57bea2b..0000000 --- a/c/model/send_template_request_all_of_params.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * send_template_request_all_of_params.h - * - * - */ - -#ifndef _send_template_request_all_of_params_H_ -#define _send_template_request_all_of_params_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct send_template_request_all_of_params_t send_template_request_all_of_params_t; - -#include "send_template_request_all_of_currency.h" -#include "send_template_request_all_of_date_time.h" - - - -typedef struct send_template_request_all_of_params_t { - char *_default; // string - struct send_template_request_all_of_currency_t *currency; //model - struct send_template_request_all_of_date_time_t *date_time; //model - -} send_template_request_all_of_params_t; - -send_template_request_all_of_params_t *send_template_request_all_of_params_create( - char *_default, - send_template_request_all_of_currency_t *currency, - send_template_request_all_of_date_time_t *date_time -); - -void send_template_request_all_of_params_free(send_template_request_all_of_params_t *send_template_request_all_of_params); - -send_template_request_all_of_params_t *send_template_request_all_of_params_parseFromJSON(cJSON *send_template_request_all_of_paramsJSON); - -cJSON *send_template_request_all_of_params_convertToJSON(send_template_request_all_of_params_t *send_template_request_all_of_params); - -#endif /* _send_template_request_all_of_params_H_ */ - diff --git a/c/model/set_commerce.c b/c/model/set_commerce.c deleted file mode 100644 index e6e036e..0000000 --- a/c/model/set_commerce.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include -#include -#include "set_commerce.h" - - - -set_commerce_t *set_commerce_create( - int success - ) { - set_commerce_t *set_commerce_local_var = malloc(sizeof(set_commerce_t)); - if (!set_commerce_local_var) { - return NULL; - } - set_commerce_local_var->success = success; - - return set_commerce_local_var; -} - - -void set_commerce_free(set_commerce_t *set_commerce) { - if(NULL == set_commerce){ - return ; - } - listEntry_t *listEntry; - free(set_commerce); -} - -cJSON *set_commerce_convertToJSON(set_commerce_t *set_commerce) { - cJSON *item = cJSON_CreateObject(); - - // set_commerce->success - if(set_commerce->success) { - if(cJSON_AddBoolToObject(item, "success", set_commerce->success) == NULL) { - goto fail; //Bool - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -set_commerce_t *set_commerce_parseFromJSON(cJSON *set_commerceJSON){ - - set_commerce_t *set_commerce_local_var = NULL; - - // set_commerce->success - cJSON *success = cJSON_GetObjectItemCaseSensitive(set_commerceJSON, "success"); - if (success) { - if(!cJSON_IsBool(success)) - { - goto end; //Bool - } - } - - - set_commerce_local_var = set_commerce_create ( - success ? success->valueint : 0 - ); - - return set_commerce_local_var; -end: - return NULL; - -} diff --git a/c/model/set_commerce.h b/c/model/set_commerce.h deleted file mode 100644 index d441a4f..0000000 --- a/c/model/set_commerce.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * set_commerce.h - * - * - */ - -#ifndef _set_commerce_H_ -#define _set_commerce_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct set_commerce_t set_commerce_t; - - - - -typedef struct set_commerce_t { - int success; //boolean - -} set_commerce_t; - -set_commerce_t *set_commerce_create( - int success -); - -void set_commerce_free(set_commerce_t *set_commerce); - -set_commerce_t *set_commerce_parseFromJSON(cJSON *set_commerceJSON); - -cJSON *set_commerce_convertToJSON(set_commerce_t *set_commerce); - -#endif /* _set_commerce_H_ */ - diff --git a/c/model/set_me.c b/c/model/set_me.c deleted file mode 100644 index 8677642..0000000 --- a/c/model/set_me.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "set_me.h" - - - -set_me_t *set_me_create( - char *result - ) { - set_me_t *set_me_local_var = malloc(sizeof(set_me_t)); - if (!set_me_local_var) { - return NULL; - } - set_me_local_var->result = result; - - return set_me_local_var; -} - - -void set_me_free(set_me_t *set_me) { - if(NULL == set_me){ - return ; - } - listEntry_t *listEntry; - if (set_me->result) { - free(set_me->result); - set_me->result = NULL; - } - free(set_me); -} - -cJSON *set_me_convertToJSON(set_me_t *set_me) { - cJSON *item = cJSON_CreateObject(); - - // set_me->result - if(set_me->result) { - if(cJSON_AddStringToObject(item, "result", set_me->result) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -set_me_t *set_me_parseFromJSON(cJSON *set_meJSON){ - - set_me_t *set_me_local_var = NULL; - - // set_me->result - cJSON *result = cJSON_GetObjectItemCaseSensitive(set_meJSON, "result"); - if (result) { - if(!cJSON_IsString(result) && !cJSON_IsNull(result)) - { - goto end; //String - } - } - - - set_me_local_var = set_me_create ( - result && !cJSON_IsNull(result) ? strdup(result->valuestring) : NULL - ); - - return set_me_local_var; -end: - return NULL; - -} diff --git a/c/model/set_me.h b/c/model/set_me.h deleted file mode 100644 index bee2801..0000000 --- a/c/model/set_me.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * set_me.h - * - * - */ - -#ifndef _set_me_H_ -#define _set_me_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct set_me_t set_me_t; - - - - -typedef struct set_me_t { - char *result; // string - -} set_me_t; - -set_me_t *set_me_create( - char *result -); - -void set_me_free(set_me_t *set_me); - -set_me_t *set_me_parseFromJSON(cJSON *set_meJSON); - -cJSON *set_me_convertToJSON(set_me_t *set_me); - -#endif /* _set_me_H_ */ - diff --git a/c/model/set_me_request.c b/c/model/set_me_request.c deleted file mode 100644 index d68bf24..0000000 --- a/c/model/set_me_request.c +++ /dev/null @@ -1,233 +0,0 @@ -#include -#include -#include -#include "set_me_request.h" - - -char* verticalset_me_request_ToString(one_msg_waba_sdk_set_me_request_VERTICAL_e vertical) { - char* verticalArray[] = { "NULL", "Automotive", "Beauty, Spa and Salon", "Clothing and Apparel", "Education", "Entertainment", "Event Planning and Service", "Finance and Banking", "Food and Grocery", "Public Service", "Hotel and Lodging", "Medical and Health", "Non-profit", "Professional Services", "Shopping and Retail", "Travel and Transportation", "Restaurant", "Other", "" }; - return verticalArray[vertical]; -} - -one_msg_waba_sdk_set_me_request_VERTICAL_e verticalset_me_request_FromString(char* vertical){ - int stringToReturn = 0; - char *verticalArray[] = { "NULL", "Automotive", "Beauty, Spa and Salon", "Clothing and Apparel", "Education", "Entertainment", "Event Planning and Service", "Finance and Banking", "Food and Grocery", "Public Service", "Hotel and Lodging", "Medical and Health", "Non-profit", "Professional Services", "Shopping and Retail", "Travel and Transportation", "Restaurant", "Other", "" }; - size_t sizeofArray = sizeof(verticalArray) / sizeof(verticalArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(vertical, verticalArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -set_me_request_t *set_me_request_create( - char *about, - char *address, - char *description, - char *email, - char *phone, - one_msg_waba_sdk_set_me_request_VERTICAL_e vertical, - char *photo - ) { - set_me_request_t *set_me_request_local_var = malloc(sizeof(set_me_request_t)); - if (!set_me_request_local_var) { - return NULL; - } - set_me_request_local_var->about = about; - set_me_request_local_var->address = address; - set_me_request_local_var->description = description; - set_me_request_local_var->email = email; - set_me_request_local_var->phone = phone; - set_me_request_local_var->vertical = vertical; - set_me_request_local_var->photo = photo; - - return set_me_request_local_var; -} - - -void set_me_request_free(set_me_request_t *set_me_request) { - if(NULL == set_me_request){ - return ; - } - listEntry_t *listEntry; - if (set_me_request->about) { - free(set_me_request->about); - set_me_request->about = NULL; - } - if (set_me_request->address) { - free(set_me_request->address); - set_me_request->address = NULL; - } - if (set_me_request->description) { - free(set_me_request->description); - set_me_request->description = NULL; - } - if (set_me_request->email) { - free(set_me_request->email); - set_me_request->email = NULL; - } - if (set_me_request->phone) { - free(set_me_request->phone); - set_me_request->phone = NULL; - } - if (set_me_request->photo) { - free(set_me_request->photo); - set_me_request->photo = NULL; - } - free(set_me_request); -} - -cJSON *set_me_request_convertToJSON(set_me_request_t *set_me_request) { - cJSON *item = cJSON_CreateObject(); - - // set_me_request->about - if(set_me_request->about) { - if(cJSON_AddStringToObject(item, "about", set_me_request->about) == NULL) { - goto fail; //String - } - } - - - // set_me_request->address - if(set_me_request->address) { - if(cJSON_AddStringToObject(item, "address", set_me_request->address) == NULL) { - goto fail; //String - } - } - - - // set_me_request->description - if(set_me_request->description) { - if(cJSON_AddStringToObject(item, "description", set_me_request->description) == NULL) { - goto fail; //String - } - } - - - // set_me_request->email - if(set_me_request->email) { - if(cJSON_AddStringToObject(item, "email", set_me_request->email) == NULL) { - goto fail; //String - } - } - - - // set_me_request->phone - if(set_me_request->phone) { - if(cJSON_AddStringToObject(item, "phone", set_me_request->phone) == NULL) { - goto fail; //String - } - } - - - // set_me_request->vertical - if(set_me_request->vertical != one_msg_waba_sdk_set_me_request_VERTICAL_NULL) { - if(cJSON_AddStringToObject(item, "vertical", verticalset_me_request_ToString(set_me_request->vertical)) == NULL) - { - goto fail; //Enum - } - } - - - // set_me_request->photo - if(set_me_request->photo) { - if(cJSON_AddStringToObject(item, "photo", set_me_request->photo) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -set_me_request_t *set_me_request_parseFromJSON(cJSON *set_me_requestJSON){ - - set_me_request_t *set_me_request_local_var = NULL; - - // set_me_request->about - cJSON *about = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "about"); - if (about) { - if(!cJSON_IsString(about) && !cJSON_IsNull(about)) - { - goto end; //String - } - } - - // set_me_request->address - cJSON *address = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "address"); - if (address) { - if(!cJSON_IsString(address) && !cJSON_IsNull(address)) - { - goto end; //String - } - } - - // set_me_request->description - cJSON *description = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "description"); - if (description) { - if(!cJSON_IsString(description) && !cJSON_IsNull(description)) - { - goto end; //String - } - } - - // set_me_request->email - cJSON *email = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "email"); - if (email) { - if(!cJSON_IsString(email) && !cJSON_IsNull(email)) - { - goto end; //String - } - } - - // set_me_request->phone - cJSON *phone = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "phone"); - if (phone) { - if(!cJSON_IsString(phone) && !cJSON_IsNull(phone)) - { - goto end; //String - } - } - - // set_me_request->vertical - cJSON *vertical = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "vertical"); - one_msg_waba_sdk_set_me_request_VERTICAL_e verticalVariable; - if (vertical) { - if(!cJSON_IsString(vertical)) - { - goto end; //Enum - } - verticalVariable = verticalset_me_request_FromString(vertical->valuestring); - } - - // set_me_request->photo - cJSON *photo = cJSON_GetObjectItemCaseSensitive(set_me_requestJSON, "photo"); - if (photo) { - if(!cJSON_IsString(photo) && !cJSON_IsNull(photo)) - { - goto end; //String - } - } - - - set_me_request_local_var = set_me_request_create ( - about && !cJSON_IsNull(about) ? strdup(about->valuestring) : NULL, - address && !cJSON_IsNull(address) ? strdup(address->valuestring) : NULL, - description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL, - email && !cJSON_IsNull(email) ? strdup(email->valuestring) : NULL, - phone && !cJSON_IsNull(phone) ? strdup(phone->valuestring) : NULL, - vertical ? verticalVariable : -1, - photo && !cJSON_IsNull(photo) ? strdup(photo->valuestring) : NULL - ); - - return set_me_request_local_var; -end: - return NULL; - -} diff --git a/c/model/set_me_request.h b/c/model/set_me_request.h deleted file mode 100644 index 9bb2072..0000000 --- a/c/model/set_me_request.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * set_me_request.h - * - * - */ - -#ifndef _set_me_request_H_ -#define _set_me_request_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct set_me_request_t set_me_request_t; - - -// Enum VERTICAL for set_me_request - -typedef enum { one_msg_waba_sdk_set_me_request_VERTICAL_NULL = 0, one_msg_waba_sdk_set_me_request_VERTICAL_Automotive, one_msg_waba_sdk_set_me_request_VERTICAL_Beauty, Spa and Salon, one_msg_waba_sdk_set_me_request_VERTICAL_Clothing and Apparel, one_msg_waba_sdk_set_me_request_VERTICAL_Education, one_msg_waba_sdk_set_me_request_VERTICAL_Entertainment, one_msg_waba_sdk_set_me_request_VERTICAL_Event Planning and Service, one_msg_waba_sdk_set_me_request_VERTICAL_Finance and Banking, one_msg_waba_sdk_set_me_request_VERTICAL_Food and Grocery, one_msg_waba_sdk_set_me_request_VERTICAL_Public Service, one_msg_waba_sdk_set_me_request_VERTICAL_Hotel and Lodging, one_msg_waba_sdk_set_me_request_VERTICAL_Medical and Health, one_msg_waba_sdk_set_me_request_VERTICAL_Non_profit, one_msg_waba_sdk_set_me_request_VERTICAL_Professional Services, one_msg_waba_sdk_set_me_request_VERTICAL_Shopping and Retail, one_msg_waba_sdk_set_me_request_VERTICAL_Travel and Transportation, one_msg_waba_sdk_set_me_request_VERTICAL_Restaurant, one_msg_waba_sdk_set_me_request_VERTICAL_Other, one_msg_waba_sdk_set_me_request_VERTICAL_ } one_msg_waba_sdk_set_me_request_VERTICAL_e; - -char* set_me_request_vertical_ToString(one_msg_waba_sdk_set_me_request_VERTICAL_e vertical); - -one_msg_waba_sdk_set_me_request_VERTICAL_e set_me_request_vertical_FromString(char* vertical); - - - -typedef struct set_me_request_t { - char *about; // string - char *address; // string - char *description; // string - char *email; // string - char *phone; // string - one_msg_waba_sdk_set_me_request_VERTICAL_e vertical; //enum - char *photo; // string - -} set_me_request_t; - -set_me_request_t *set_me_request_create( - char *about, - char *address, - char *description, - char *email, - char *phone, - one_msg_waba_sdk_set_me_request_VERTICAL_e vertical, - char *photo -); - -void set_me_request_free(set_me_request_t *set_me_request); - -set_me_request_t *set_me_request_parseFromJSON(cJSON *set_me_requestJSON); - -cJSON *set_me_request_convertToJSON(set_me_request_t *set_me_request); - -#endif /* _set_me_request_H_ */ - diff --git a/c/model/set_settings_200_response.c b/c/model/set_settings_200_response.c deleted file mode 100644 index 020d354..0000000 --- a/c/model/set_settings_200_response.c +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include -#include -#include "set_settings_200_response.h" - - - -set_settings_200_response_t *set_settings_200_response_create( - char *webhook_url, - set_settings_200_response_all_of_update_t *update - ) { - set_settings_200_response_t *set_settings_200_response_local_var = malloc(sizeof(set_settings_200_response_t)); - if (!set_settings_200_response_local_var) { - return NULL; - } - set_settings_200_response_local_var->webhook_url = webhook_url; - set_settings_200_response_local_var->update = update; - - return set_settings_200_response_local_var; -} - - -void set_settings_200_response_free(set_settings_200_response_t *set_settings_200_response) { - if(NULL == set_settings_200_response){ - return ; - } - listEntry_t *listEntry; - if (set_settings_200_response->webhook_url) { - free(set_settings_200_response->webhook_url); - set_settings_200_response->webhook_url = NULL; - } - if (set_settings_200_response->update) { - set_settings_200_response_all_of_update_free(set_settings_200_response->update); - set_settings_200_response->update = NULL; - } - free(set_settings_200_response); -} - -cJSON *set_settings_200_response_convertToJSON(set_settings_200_response_t *set_settings_200_response) { - cJSON *item = cJSON_CreateObject(); - - // set_settings_200_response->webhook_url - if(set_settings_200_response->webhook_url) { - if(cJSON_AddStringToObject(item, "webhookUrl", set_settings_200_response->webhook_url) == NULL) { - goto fail; //String - } - } - - - // set_settings_200_response->update - if (!set_settings_200_response->update) { - goto fail; - } - cJSON *update_local_JSON = set_settings_200_response_all_of_update_convertToJSON(set_settings_200_response->update); - if(update_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "update", update_local_JSON); - if(item->child == NULL) { - goto fail; - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -set_settings_200_response_t *set_settings_200_response_parseFromJSON(cJSON *set_settings_200_responseJSON){ - - set_settings_200_response_t *set_settings_200_response_local_var = NULL; - - // define the local variable for set_settings_200_response->update - set_settings_200_response_all_of_update_t *update_local_nonprim = NULL; - - // set_settings_200_response->webhook_url - cJSON *webhook_url = cJSON_GetObjectItemCaseSensitive(set_settings_200_responseJSON, "webhookUrl"); - if (webhook_url) { - if(!cJSON_IsString(webhook_url) && !cJSON_IsNull(webhook_url)) - { - goto end; //String - } - } - - // set_settings_200_response->update - cJSON *update = cJSON_GetObjectItemCaseSensitive(set_settings_200_responseJSON, "update"); - if (!update) { - goto end; - } - - - update_local_nonprim = set_settings_200_response_all_of_update_parseFromJSON(update); //nonprimitive - - - set_settings_200_response_local_var = set_settings_200_response_create ( - webhook_url && !cJSON_IsNull(webhook_url) ? strdup(webhook_url->valuestring) : NULL, - update_local_nonprim - ); - - return set_settings_200_response_local_var; -end: - if (update_local_nonprim) { - set_settings_200_response_all_of_update_free(update_local_nonprim); - update_local_nonprim = NULL; - } - return NULL; - -} diff --git a/c/model/set_settings_200_response.h b/c/model/set_settings_200_response.h deleted file mode 100644 index 3312753..0000000 --- a/c/model/set_settings_200_response.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * set_settings_200_response.h - * - * - */ - -#ifndef _set_settings_200_response_H_ -#define _set_settings_200_response_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct set_settings_200_response_t set_settings_200_response_t; - -#include "set_settings_200_response_all_of_update.h" - - - -typedef struct set_settings_200_response_t { - char *webhook_url; // string - struct set_settings_200_response_all_of_update_t *update; //model - -} set_settings_200_response_t; - -set_settings_200_response_t *set_settings_200_response_create( - char *webhook_url, - set_settings_200_response_all_of_update_t *update -); - -void set_settings_200_response_free(set_settings_200_response_t *set_settings_200_response); - -set_settings_200_response_t *set_settings_200_response_parseFromJSON(cJSON *set_settings_200_responseJSON); - -cJSON *set_settings_200_response_convertToJSON(set_settings_200_response_t *set_settings_200_response); - -#endif /* _set_settings_200_response_H_ */ - diff --git a/c/model/set_settings_200_response_all_of_update.c b/c/model/set_settings_200_response_all_of_update.c deleted file mode 100644 index 7b85b21..0000000 --- a/c/model/set_settings_200_response_all_of_update.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "set_settings_200_response_all_of_update.h" - - - -set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update_create( - char *webhook_url - ) { - set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update_local_var = malloc(sizeof(set_settings_200_response_all_of_update_t)); - if (!set_settings_200_response_all_of_update_local_var) { - return NULL; - } - set_settings_200_response_all_of_update_local_var->webhook_url = webhook_url; - - return set_settings_200_response_all_of_update_local_var; -} - - -void set_settings_200_response_all_of_update_free(set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update) { - if(NULL == set_settings_200_response_all_of_update){ - return ; - } - listEntry_t *listEntry; - if (set_settings_200_response_all_of_update->webhook_url) { - free(set_settings_200_response_all_of_update->webhook_url); - set_settings_200_response_all_of_update->webhook_url = NULL; - } - free(set_settings_200_response_all_of_update); -} - -cJSON *set_settings_200_response_all_of_update_convertToJSON(set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update) { - cJSON *item = cJSON_CreateObject(); - - // set_settings_200_response_all_of_update->webhook_url - if(set_settings_200_response_all_of_update->webhook_url) { - if(cJSON_AddStringToObject(item, "webhookUrl", set_settings_200_response_all_of_update->webhook_url) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update_parseFromJSON(cJSON *set_settings_200_response_all_of_updateJSON){ - - set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update_local_var = NULL; - - // set_settings_200_response_all_of_update->webhook_url - cJSON *webhook_url = cJSON_GetObjectItemCaseSensitive(set_settings_200_response_all_of_updateJSON, "webhookUrl"); - if (webhook_url) { - if(!cJSON_IsString(webhook_url) && !cJSON_IsNull(webhook_url)) - { - goto end; //String - } - } - - - set_settings_200_response_all_of_update_local_var = set_settings_200_response_all_of_update_create ( - webhook_url && !cJSON_IsNull(webhook_url) ? strdup(webhook_url->valuestring) : NULL - ); - - return set_settings_200_response_all_of_update_local_var; -end: - return NULL; - -} diff --git a/c/model/set_settings_200_response_all_of_update.h b/c/model/set_settings_200_response_all_of_update.h deleted file mode 100644 index 8e24b44..0000000 --- a/c/model/set_settings_200_response_all_of_update.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * set_settings_200_response_all_of_update.h - * - * - */ - -#ifndef _set_settings_200_response_all_of_update_H_ -#define _set_settings_200_response_all_of_update_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct set_settings_200_response_all_of_update_t set_settings_200_response_all_of_update_t; - - - - -typedef struct set_settings_200_response_all_of_update_t { - char *webhook_url; // string - -} set_settings_200_response_all_of_update_t; - -set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update_create( - char *webhook_url -); - -void set_settings_200_response_all_of_update_free(set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update); - -set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update_parseFromJSON(cJSON *set_settings_200_response_all_of_updateJSON); - -cJSON *set_settings_200_response_all_of_update_convertToJSON(set_settings_200_response_all_of_update_t *set_settings_200_response_all_of_update); - -#endif /* _set_settings_200_response_all_of_update_H_ */ - diff --git a/c/model/set_webhook_status.c b/c/model/set_webhook_status.c deleted file mode 100644 index e84755e..0000000 --- a/c/model/set_webhook_status.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include -#include "set_webhook_status.h" - - - -set_webhook_status_t *set_webhook_status_create( - int set, - char *message - ) { - set_webhook_status_t *set_webhook_status_local_var = malloc(sizeof(set_webhook_status_t)); - if (!set_webhook_status_local_var) { - return NULL; - } - set_webhook_status_local_var->set = set; - set_webhook_status_local_var->message = message; - - return set_webhook_status_local_var; -} - - -void set_webhook_status_free(set_webhook_status_t *set_webhook_status) { - if(NULL == set_webhook_status){ - return ; - } - listEntry_t *listEntry; - if (set_webhook_status->message) { - free(set_webhook_status->message); - set_webhook_status->message = NULL; - } - free(set_webhook_status); -} - -cJSON *set_webhook_status_convertToJSON(set_webhook_status_t *set_webhook_status) { - cJSON *item = cJSON_CreateObject(); - - // set_webhook_status->set - if(set_webhook_status->set) { - if(cJSON_AddBoolToObject(item, "set", set_webhook_status->set) == NULL) { - goto fail; //Bool - } - } - - - // set_webhook_status->message - if(set_webhook_status->message) { - if(cJSON_AddStringToObject(item, "message", set_webhook_status->message) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -set_webhook_status_t *set_webhook_status_parseFromJSON(cJSON *set_webhook_statusJSON){ - - set_webhook_status_t *set_webhook_status_local_var = NULL; - - // set_webhook_status->set - cJSON *set = cJSON_GetObjectItemCaseSensitive(set_webhook_statusJSON, "set"); - if (set) { - if(!cJSON_IsBool(set)) - { - goto end; //Bool - } - } - - // set_webhook_status->message - cJSON *message = cJSON_GetObjectItemCaseSensitive(set_webhook_statusJSON, "message"); - if (message) { - if(!cJSON_IsString(message) && !cJSON_IsNull(message)) - { - goto end; //String - } - } - - - set_webhook_status_local_var = set_webhook_status_create ( - set ? set->valueint : 0, - message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL - ); - - return set_webhook_status_local_var; -end: - return NULL; - -} diff --git a/c/model/set_webhook_status.h b/c/model/set_webhook_status.h deleted file mode 100644 index 06f39b4..0000000 --- a/c/model/set_webhook_status.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * set_webhook_status.h - * - * - */ - -#ifndef _set_webhook_status_H_ -#define _set_webhook_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct set_webhook_status_t set_webhook_status_t; - - - - -typedef struct set_webhook_status_t { - int set; //boolean - char *message; // string - -} set_webhook_status_t; - -set_webhook_status_t *set_webhook_status_create( - int set, - char *message -); - -void set_webhook_status_free(set_webhook_status_t *set_webhook_status); - -set_webhook_status_t *set_webhook_status_parseFromJSON(cJSON *set_webhook_statusJSON); - -cJSON *set_webhook_status_convertToJSON(set_webhook_status_t *set_webhook_status); - -#endif /* _set_webhook_status_H_ */ - diff --git a/c/model/settings.c b/c/model/settings.c deleted file mode 100644 index e3fa449..0000000 --- a/c/model/settings.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "settings.h" - - - -settings_t *settings_create( - char *webhook_url - ) { - settings_t *settings_local_var = malloc(sizeof(settings_t)); - if (!settings_local_var) { - return NULL; - } - settings_local_var->webhook_url = webhook_url; - - return settings_local_var; -} - - -void settings_free(settings_t *settings) { - if(NULL == settings){ - return ; - } - listEntry_t *listEntry; - if (settings->webhook_url) { - free(settings->webhook_url); - settings->webhook_url = NULL; - } - free(settings); -} - -cJSON *settings_convertToJSON(settings_t *settings) { - cJSON *item = cJSON_CreateObject(); - - // settings->webhook_url - if(settings->webhook_url) { - if(cJSON_AddStringToObject(item, "webhookUrl", settings->webhook_url) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -settings_t *settings_parseFromJSON(cJSON *settingsJSON){ - - settings_t *settings_local_var = NULL; - - // settings->webhook_url - cJSON *webhook_url = cJSON_GetObjectItemCaseSensitive(settingsJSON, "webhookUrl"); - if (webhook_url) { - if(!cJSON_IsString(webhook_url) && !cJSON_IsNull(webhook_url)) - { - goto end; //String - } - } - - - settings_local_var = settings_create ( - webhook_url && !cJSON_IsNull(webhook_url) ? strdup(webhook_url->valuestring) : NULL - ); - - return settings_local_var; -end: - return NULL; - -} diff --git a/c/model/settings.h b/c/model/settings.h deleted file mode 100644 index 450594a..0000000 --- a/c/model/settings.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * settings.h - * - * - */ - -#ifndef _settings_H_ -#define _settings_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct settings_t settings_t; - - - - -typedef struct settings_t { - char *webhook_url; // string - -} settings_t; - -settings_t *settings_create( - char *webhook_url -); - -void settings_free(settings_t *settings); - -settings_t *settings_parseFromJSON(cJSON *settingsJSON); - -cJSON *settings_convertToJSON(settings_t *settings); - -#endif /* _settings_H_ */ - diff --git a/c/model/template_category_prop.c b/c/model/template_category_prop.c deleted file mode 100644 index 0ab672d..0000000 --- a/c/model/template_category_prop.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include -#include "template_category_prop.h" - - -char* template_category_prop_template_category_prop_ToString(one_msg_waba_sdk_template_category_prop__e template_category_prop) { - char *template_category_propArray[] = { "NULL", "MARKETING", "TRANSACTIONAL", "OTP" }; - return template_category_propArray[template_category_prop]; -} - -one_msg_waba_sdk_template_category_prop__e template_category_prop_template_category_prop_FromString(char* template_category_prop) { - int stringToReturn = 0; - char *template_category_propArray[] = { "NULL", "MARKETING", "TRANSACTIONAL", "OTP" }; - size_t sizeofArray = sizeof(template_category_propArray) / sizeof(template_category_propArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(template_category_prop, template_category_propArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -cJSON *template_category_prop_template_category_prop_convertToJSON(one_msg_waba_sdk_template_category_prop__e template_category_prop) { - cJSON *item = cJSON_CreateObject(); - if(cJSON_AddStringToObject(item, "template_category_prop", template_category_prop_template_category_prop_ToString(template_category_prop)) == NULL) { - goto fail; - } - return item; -fail: - cJSON_Delete(item); - return NULL; -} - -one_msg_waba_sdk_template_category_prop__e template_category_prop_template_category_prop_parseFromJSON(cJSON *template_category_propJSON) { - one_msg_waba_sdk_template_category_prop__e *template_category_prop = NULL; - one_msg_waba_sdk_template_category_prop__e template_category_propVariable; - cJSON *template_category_propVar = cJSON_GetObjectItemCaseSensitive(template_category_propJSON, "template_category_prop"); - if(!cJSON_IsString(template_category_propVar) || (template_category_propVar->valuestring == NULL)){ - goto end; - } - template_category_propVariable = template_category_prop_template_category_prop_FromString(template_category_propVar->valuestring); - return template_category_propVariable; -end: - return 0; -} diff --git a/c/model/template_category_prop.h b/c/model/template_category_prop.h deleted file mode 100644 index ca66298..0000000 --- a/c/model/template_category_prop.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * template_category_prop.h - * - * Template category - */ - -#ifndef _template_category_prop_H_ -#define _template_category_prop_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct template_category_prop_t template_category_prop_t; - - -// Enum for template_category_prop - -typedef enum { one_msg_waba_sdk_template_category_prop__NULL = 0, one_msg_waba_sdk_template_category_prop__MARKETING, one_msg_waba_sdk_template_category_prop__TRANSACTIONAL, one_msg_waba_sdk_template_category_prop__OTP } one_msg_waba_sdk_template_category_prop__e; - -char* template_category_prop_template_category_prop_ToString(one_msg_waba_sdk_template_category_prop__e template_category_prop); - -one_msg_waba_sdk_template_category_prop__e template_category_prop_template_category_prop_FromString(char* template_category_prop); - -//cJSON *template_category_prop_template_category_prop_convertToJSON(one_msg_waba_sdk_template_category_prop__e template_category_prop); - -//one_msg_waba_sdk_template_category_prop__e template_category_prop_template_category_prop_parseFromJSON(cJSON *template_category_propJSON); - -#endif /* _template_category_prop_H_ */ - diff --git a/c/model/template_components_prop.c b/c/model/template_components_prop.c deleted file mode 100644 index f3cd53d..0000000 --- a/c/model/template_components_prop.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include -#include "template_components_prop.h" - - - -template_components_prop_t *template_components_prop_create( - ) { - template_components_prop_t *template_components_prop_local_var = malloc(sizeof(template_components_prop_t)); - if (!template_components_prop_local_var) { - return NULL; - } - - return template_components_prop_local_var; -} - - -void template_components_prop_free(template_components_prop_t *template_components_prop) { - if(NULL == template_components_prop){ - return ; - } - listEntry_t *listEntry; - free(template_components_prop); -} - -cJSON *template_components_prop_convertToJSON(template_components_prop_t *template_components_prop) { - cJSON *item = cJSON_CreateObject(); - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -template_components_prop_t *template_components_prop_parseFromJSON(cJSON *template_components_propJSON){ - - template_components_prop_t *template_components_prop_local_var = NULL; - - - template_components_prop_local_var = template_components_prop_create ( - ); - - return template_components_prop_local_var; -end: - return NULL; - -} diff --git a/c/model/template_components_prop.h b/c/model/template_components_prop.h deleted file mode 100644 index bcd3fd7..0000000 --- a/c/model/template_components_prop.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * template_components_prop.h - * - * Array of template components - */ - -#ifndef _template_components_prop_H_ -#define _template_components_prop_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct template_components_prop_t template_components_prop_t; - -#include "template_components_prop_inner.h" - - - -typedef struct template_components_prop_t { - -} template_components_prop_t; - -template_components_prop_t *template_components_prop_create( -); - -void template_components_prop_free(template_components_prop_t *template_components_prop); - -template_components_prop_t *template_components_prop_parseFromJSON(cJSON *template_components_propJSON); - -cJSON *template_components_prop_convertToJSON(template_components_prop_t *template_components_prop); - -#endif /* _template_components_prop_H_ */ - diff --git a/c/model/template_components_prop_inner.c b/c/model/template_components_prop_inner.c deleted file mode 100644 index 2a6c639..0000000 --- a/c/model/template_components_prop_inner.c +++ /dev/null @@ -1,243 +0,0 @@ -#include -#include -#include -#include "template_components_prop_inner.h" - - -char* typetemplate_components_prop_inner_ToString(one_msg_waba_sdk_template_components_prop_inner_TYPE_e type) { - char* typeArray[] = { "NULL", "BODY", "HEADER", "FOOTER", "BUTTONS" }; - return typeArray[type]; -} - -one_msg_waba_sdk_template_components_prop_inner_TYPE_e typetemplate_components_prop_inner_FromString(char* type){ - int stringToReturn = 0; - char *typeArray[] = { "NULL", "BODY", "HEADER", "FOOTER", "BUTTONS" }; - size_t sizeofArray = sizeof(typeArray) / sizeof(typeArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(type, typeArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} -char* formattemplate_components_prop_inner_ToString(one_msg_waba_sdk_template_components_prop_inner_FORMAT_e format) { - char* formatArray[] = { "NULL", "TEXT", "IMAGE", "DOCUMENT", "VIDEO" }; - return formatArray[format]; -} - -one_msg_waba_sdk_template_components_prop_inner_FORMAT_e formattemplate_components_prop_inner_FromString(char* format){ - int stringToReturn = 0; - char *formatArray[] = { "NULL", "TEXT", "IMAGE", "DOCUMENT", "VIDEO" }; - size_t sizeofArray = sizeof(formatArray) / sizeof(formatArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(format, formatArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -template_components_prop_inner_t *template_components_prop_inner_create( - one_msg_waba_sdk_template_components_prop_inner_TYPE_e type, - one_msg_waba_sdk_template_components_prop_inner_FORMAT_e format, - char *text, - object_t *example, - list_t *buttons - ) { - template_components_prop_inner_t *template_components_prop_inner_local_var = malloc(sizeof(template_components_prop_inner_t)); - if (!template_components_prop_inner_local_var) { - return NULL; - } - template_components_prop_inner_local_var->type = type; - template_components_prop_inner_local_var->format = format; - template_components_prop_inner_local_var->text = text; - template_components_prop_inner_local_var->example = example; - template_components_prop_inner_local_var->buttons = buttons; - - return template_components_prop_inner_local_var; -} - - -void template_components_prop_inner_free(template_components_prop_inner_t *template_components_prop_inner) { - if(NULL == template_components_prop_inner){ - return ; - } - listEntry_t *listEntry; - if (template_components_prop_inner->text) { - free(template_components_prop_inner->text); - template_components_prop_inner->text = NULL; - } - if (template_components_prop_inner->example) { - object_free(template_components_prop_inner->example); - template_components_prop_inner->example = NULL; - } - if (template_components_prop_inner->buttons) { - list_ForEach(listEntry, template_components_prop_inner->buttons) { - template_components_prop_inner_buttons_inner_free(listEntry->data); - } - list_freeList(template_components_prop_inner->buttons); - template_components_prop_inner->buttons = NULL; - } - free(template_components_prop_inner); -} - -cJSON *template_components_prop_inner_convertToJSON(template_components_prop_inner_t *template_components_prop_inner) { - cJSON *item = cJSON_CreateObject(); - - // template_components_prop_inner->type - if(template_components_prop_inner->type != one_msg_waba_sdk_template_components_prop_inner_TYPE_NULL) { - if(cJSON_AddStringToObject(item, "type", typetemplate_components_prop_inner_ToString(template_components_prop_inner->type)) == NULL) - { - goto fail; //Enum - } - } - - - // template_components_prop_inner->format - if(template_components_prop_inner->format != one_msg_waba_sdk_template_components_prop_inner_FORMAT_NULL) { - if(cJSON_AddStringToObject(item, "format", formattemplate_components_prop_inner_ToString(template_components_prop_inner->format)) == NULL) - { - goto fail; //Enum - } - } - - - // template_components_prop_inner->text - if(template_components_prop_inner->text) { - if(cJSON_AddStringToObject(item, "text", template_components_prop_inner->text) == NULL) { - goto fail; //String - } - } - - - // template_components_prop_inner->example - if(template_components_prop_inner->example) { - cJSON *example_object = object_convertToJSON(template_components_prop_inner->example); - if(example_object == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "example", example_object); - if(item->child == NULL) { - goto fail; - } - } - - - // template_components_prop_inner->buttons - if(template_components_prop_inner->buttons) { - cJSON *buttons = cJSON_AddArrayToObject(item, "buttons"); - if(buttons == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *buttonsListEntry; - if (template_components_prop_inner->buttons) { - list_ForEach(buttonsListEntry, template_components_prop_inner->buttons) { - cJSON *itemLocal = template_components_prop_inner_buttons_inner_convertToJSON(buttonsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(buttons, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -template_components_prop_inner_t *template_components_prop_inner_parseFromJSON(cJSON *template_components_prop_innerJSON){ - - template_components_prop_inner_t *template_components_prop_inner_local_var = NULL; - - // define the local list for template_components_prop_inner->buttons - list_t *buttonsList = NULL; - - // template_components_prop_inner->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(template_components_prop_innerJSON, "type"); - one_msg_waba_sdk_template_components_prop_inner_TYPE_e typeVariable; - if (type) { - if(!cJSON_IsString(type)) - { - goto end; //Enum - } - typeVariable = typetemplate_components_prop_inner_FromString(type->valuestring); - } - - // template_components_prop_inner->format - cJSON *format = cJSON_GetObjectItemCaseSensitive(template_components_prop_innerJSON, "format"); - one_msg_waba_sdk_template_components_prop_inner_FORMAT_e formatVariable; - if (format) { - if(!cJSON_IsString(format)) - { - goto end; //Enum - } - formatVariable = formattemplate_components_prop_inner_FromString(format->valuestring); - } - - // template_components_prop_inner->text - cJSON *text = cJSON_GetObjectItemCaseSensitive(template_components_prop_innerJSON, "text"); - if (text) { - if(!cJSON_IsString(text) && !cJSON_IsNull(text)) - { - goto end; //String - } - } - - // template_components_prop_inner->example - cJSON *example = cJSON_GetObjectItemCaseSensitive(template_components_prop_innerJSON, "example"); - object_t *example_local_object = NULL; - if (example) { - example_local_object = object_parseFromJSON(example); //object - } - - // template_components_prop_inner->buttons - cJSON *buttons = cJSON_GetObjectItemCaseSensitive(template_components_prop_innerJSON, "buttons"); - if (buttons) { - cJSON *buttons_local_nonprimitive = NULL; - if(!cJSON_IsArray(buttons)){ - goto end; //nonprimitive container - } - - buttonsList = list_createList(); - - cJSON_ArrayForEach(buttons_local_nonprimitive,buttons ) - { - if(!cJSON_IsObject(buttons_local_nonprimitive)){ - goto end; - } - template_components_prop_inner_buttons_inner_t *buttonsItem = template_components_prop_inner_buttons_inner_parseFromJSON(buttons_local_nonprimitive); - - list_addElement(buttonsList, buttonsItem); - } - } - - - template_components_prop_inner_local_var = template_components_prop_inner_create ( - type ? typeVariable : -1, - format ? formatVariable : -1, - text && !cJSON_IsNull(text) ? strdup(text->valuestring) : NULL, - example ? example_local_object : NULL, - buttons ? buttonsList : NULL - ); - - return template_components_prop_inner_local_var; -end: - if (buttonsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, buttonsList) { - template_components_prop_inner_buttons_inner_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(buttonsList); - buttonsList = NULL; - } - return NULL; - -} diff --git a/c/model/template_components_prop_inner.h b/c/model/template_components_prop_inner.h deleted file mode 100644 index 5db3c5e..0000000 --- a/c/model/template_components_prop_inner.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * template_components_prop_inner.h - * - * - */ - -#ifndef _template_components_prop_inner_H_ -#define _template_components_prop_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct template_components_prop_inner_t template_components_prop_inner_t; - -#include "object.h" -#include "template_components_prop_inner_buttons_inner.h" - -// Enum TYPE for template_components_prop_inner - -typedef enum { one_msg_waba_sdk_template_components_prop_inner_TYPE_NULL = 0, one_msg_waba_sdk_template_components_prop_inner_TYPE_BODY, one_msg_waba_sdk_template_components_prop_inner_TYPE_HEADER, one_msg_waba_sdk_template_components_prop_inner_TYPE_FOOTER, one_msg_waba_sdk_template_components_prop_inner_TYPE_BUTTONS } one_msg_waba_sdk_template_components_prop_inner_TYPE_e; - -char* template_components_prop_inner_type_ToString(one_msg_waba_sdk_template_components_prop_inner_TYPE_e type); - -one_msg_waba_sdk_template_components_prop_inner_TYPE_e template_components_prop_inner_type_FromString(char* type); - -// Enum FORMAT for template_components_prop_inner - -typedef enum { one_msg_waba_sdk_template_components_prop_inner_FORMAT_NULL = 0, one_msg_waba_sdk_template_components_prop_inner_FORMAT_TEXT, one_msg_waba_sdk_template_components_prop_inner_FORMAT_IMAGE, one_msg_waba_sdk_template_components_prop_inner_FORMAT_DOCUMENT, one_msg_waba_sdk_template_components_prop_inner_FORMAT_VIDEO } one_msg_waba_sdk_template_components_prop_inner_FORMAT_e; - -char* template_components_prop_inner_format_ToString(one_msg_waba_sdk_template_components_prop_inner_FORMAT_e format); - -one_msg_waba_sdk_template_components_prop_inner_FORMAT_e template_components_prop_inner_format_FromString(char* format); - - - -typedef struct template_components_prop_inner_t { - one_msg_waba_sdk_template_components_prop_inner_TYPE_e type; //enum - one_msg_waba_sdk_template_components_prop_inner_FORMAT_e format; //enum - char *text; // string - object_t *example; //object - list_t *buttons; //nonprimitive container - -} template_components_prop_inner_t; - -template_components_prop_inner_t *template_components_prop_inner_create( - one_msg_waba_sdk_template_components_prop_inner_TYPE_e type, - one_msg_waba_sdk_template_components_prop_inner_FORMAT_e format, - char *text, - object_t *example, - list_t *buttons -); - -void template_components_prop_inner_free(template_components_prop_inner_t *template_components_prop_inner); - -template_components_prop_inner_t *template_components_prop_inner_parseFromJSON(cJSON *template_components_prop_innerJSON); - -cJSON *template_components_prop_inner_convertToJSON(template_components_prop_inner_t *template_components_prop_inner); - -#endif /* _template_components_prop_inner_H_ */ - diff --git a/c/model/template_components_prop_inner_buttons_inner.c b/c/model/template_components_prop_inner_buttons_inner.c deleted file mode 100644 index db1332e..0000000 --- a/c/model/template_components_prop_inner_buttons_inner.c +++ /dev/null @@ -1,224 +0,0 @@ -#include -#include -#include -#include "template_components_prop_inner_buttons_inner.h" - - -char* typetemplate_components_prop_inner_buttons_inner_ToString(one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e type) { - char* typeArray[] = { "NULL", "PHONE_NUMBER", "URL", "QUICK_REPLY" }; - return typeArray[type]; -} - -one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e typetemplate_components_prop_inner_buttons_inner_FromString(char* type){ - int stringToReturn = 0; - char *typeArray[] = { "NULL", "PHONE_NUMBER", "URL", "QUICK_REPLY" }; - size_t sizeofArray = sizeof(typeArray) / sizeof(typeArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(type, typeArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner_create( - one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e type, - char *text, - char *url, - char *phone_number, - list_t *example - ) { - template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner_local_var = malloc(sizeof(template_components_prop_inner_buttons_inner_t)); - if (!template_components_prop_inner_buttons_inner_local_var) { - return NULL; - } - template_components_prop_inner_buttons_inner_local_var->type = type; - template_components_prop_inner_buttons_inner_local_var->text = text; - template_components_prop_inner_buttons_inner_local_var->url = url; - template_components_prop_inner_buttons_inner_local_var->phone_number = phone_number; - template_components_prop_inner_buttons_inner_local_var->example = example; - - return template_components_prop_inner_buttons_inner_local_var; -} - - -void template_components_prop_inner_buttons_inner_free(template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner) { - if(NULL == template_components_prop_inner_buttons_inner){ - return ; - } - listEntry_t *listEntry; - if (template_components_prop_inner_buttons_inner->text) { - free(template_components_prop_inner_buttons_inner->text); - template_components_prop_inner_buttons_inner->text = NULL; - } - if (template_components_prop_inner_buttons_inner->url) { - free(template_components_prop_inner_buttons_inner->url); - template_components_prop_inner_buttons_inner->url = NULL; - } - if (template_components_prop_inner_buttons_inner->phone_number) { - free(template_components_prop_inner_buttons_inner->phone_number); - template_components_prop_inner_buttons_inner->phone_number = NULL; - } - if (template_components_prop_inner_buttons_inner->example) { - list_ForEach(listEntry, template_components_prop_inner_buttons_inner->example) { - any_type_free(listEntry->data); - } - list_freeList(template_components_prop_inner_buttons_inner->example); - template_components_prop_inner_buttons_inner->example = NULL; - } - free(template_components_prop_inner_buttons_inner); -} - -cJSON *template_components_prop_inner_buttons_inner_convertToJSON(template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner) { - cJSON *item = cJSON_CreateObject(); - - // template_components_prop_inner_buttons_inner->type - if(template_components_prop_inner_buttons_inner->type != one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_NULL) { - if(cJSON_AddStringToObject(item, "type", typetemplate_components_prop_inner_buttons_inner_ToString(template_components_prop_inner_buttons_inner->type)) == NULL) - { - goto fail; //Enum - } - } - - - // template_components_prop_inner_buttons_inner->text - if(template_components_prop_inner_buttons_inner->text) { - if(cJSON_AddStringToObject(item, "text", template_components_prop_inner_buttons_inner->text) == NULL) { - goto fail; //String - } - } - - - // template_components_prop_inner_buttons_inner->url - if(template_components_prop_inner_buttons_inner->url) { - if(cJSON_AddStringToObject(item, "url", template_components_prop_inner_buttons_inner->url) == NULL) { - goto fail; //String - } - } - - - // template_components_prop_inner_buttons_inner->phone_number - if(template_components_prop_inner_buttons_inner->phone_number) { - if(cJSON_AddStringToObject(item, "phone_number", template_components_prop_inner_buttons_inner->phone_number) == NULL) { - goto fail; //String - } - } - - - // template_components_prop_inner_buttons_inner->example - if(template_components_prop_inner_buttons_inner->example) { - cJSON *example = cJSON_AddArrayToObject(item, "example"); - if(example == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *exampleListEntry; - if (template_components_prop_inner_buttons_inner->example) { - list_ForEach(exampleListEntry, template_components_prop_inner_buttons_inner->example) { - cJSON *itemLocal = any_type_convertToJSON(exampleListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(example, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner_parseFromJSON(cJSON *template_components_prop_inner_buttons_innerJSON){ - - template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner_local_var = NULL; - - // define the local list for template_components_prop_inner_buttons_inner->example - list_t *exampleList = NULL; - - // template_components_prop_inner_buttons_inner->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(template_components_prop_inner_buttons_innerJSON, "type"); - one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e typeVariable; - if (type) { - if(!cJSON_IsString(type)) - { - goto end; //Enum - } - typeVariable = typetemplate_components_prop_inner_buttons_inner_FromString(type->valuestring); - } - - // template_components_prop_inner_buttons_inner->text - cJSON *text = cJSON_GetObjectItemCaseSensitive(template_components_prop_inner_buttons_innerJSON, "text"); - if (text) { - if(!cJSON_IsString(text) && !cJSON_IsNull(text)) - { - goto end; //String - } - } - - // template_components_prop_inner_buttons_inner->url - cJSON *url = cJSON_GetObjectItemCaseSensitive(template_components_prop_inner_buttons_innerJSON, "url"); - if (url) { - if(!cJSON_IsString(url) && !cJSON_IsNull(url)) - { - goto end; //String - } - } - - // template_components_prop_inner_buttons_inner->phone_number - cJSON *phone_number = cJSON_GetObjectItemCaseSensitive(template_components_prop_inner_buttons_innerJSON, "phone_number"); - if (phone_number) { - if(!cJSON_IsString(phone_number) && !cJSON_IsNull(phone_number)) - { - goto end; //String - } - } - - // template_components_prop_inner_buttons_inner->example - cJSON *example = cJSON_GetObjectItemCaseSensitive(template_components_prop_inner_buttons_innerJSON, "example"); - if (example) { - cJSON *example_local_nonprimitive = NULL; - if(!cJSON_IsArray(example)){ - goto end; //nonprimitive container - } - - exampleList = list_createList(); - - cJSON_ArrayForEach(example_local_nonprimitive,example ) - { - if(!cJSON_IsObject(example_local_nonprimitive)){ - goto end; - } - any_type_t *exampleItem = any_type_parseFromJSON(example_local_nonprimitive); - - list_addElement(exampleList, exampleItem); - } - } - - - template_components_prop_inner_buttons_inner_local_var = template_components_prop_inner_buttons_inner_create ( - type ? typeVariable : -1, - text && !cJSON_IsNull(text) ? strdup(text->valuestring) : NULL, - url && !cJSON_IsNull(url) ? strdup(url->valuestring) : NULL, - phone_number && !cJSON_IsNull(phone_number) ? strdup(phone_number->valuestring) : NULL, - example ? exampleList : NULL - ); - - return template_components_prop_inner_buttons_inner_local_var; -end: - if (exampleList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, exampleList) { - any_type_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(exampleList); - exampleList = NULL; - } - return NULL; - -} diff --git a/c/model/template_components_prop_inner_buttons_inner.h b/c/model/template_components_prop_inner_buttons_inner.h deleted file mode 100644 index 312b4d8..0000000 --- a/c/model/template_components_prop_inner_buttons_inner.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * template_components_prop_inner_buttons_inner.h - * - * - */ - -#ifndef _template_components_prop_inner_buttons_inner_H_ -#define _template_components_prop_inner_buttons_inner_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct template_components_prop_inner_buttons_inner_t template_components_prop_inner_buttons_inner_t; - -#include "any_type.h" - -// Enum TYPE for template_components_prop_inner_buttons_inner - -typedef enum { one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_NULL = 0, one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_PHONE_NUMBER, one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_URL, one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_QUICK_REPLY } one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e; - -char* template_components_prop_inner_buttons_inner_type_ToString(one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e type); - -one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e template_components_prop_inner_buttons_inner_type_FromString(char* type); - - - -typedef struct template_components_prop_inner_buttons_inner_t { - one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e type; //enum - char *text; // string - char *url; // string - char *phone_number; // string - list_t *example; //nonprimitive container - -} template_components_prop_inner_buttons_inner_t; - -template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner_create( - one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_e type, - char *text, - char *url, - char *phone_number, - list_t *example -); - -void template_components_prop_inner_buttons_inner_free(template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner); - -template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner_parseFromJSON(cJSON *template_components_prop_inner_buttons_innerJSON); - -cJSON *template_components_prop_inner_buttons_inner_convertToJSON(template_components_prop_inner_buttons_inner_t *template_components_prop_inner_buttons_inner); - -#endif /* _template_components_prop_inner_buttons_inner_H_ */ - diff --git a/c/model/template_language_prop.c b/c/model/template_language_prop.c deleted file mode 100644 index f8131b3..0000000 --- a/c/model/template_language_prop.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include -#include "template_language_prop.h" - - -char* template_language_prop_template_language_prop_ToString(one_msg_waba_sdk_template_language_prop__e template_language_prop) { - char *template_language_propArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - return template_language_propArray[template_language_prop]; -} - -one_msg_waba_sdk_template_language_prop__e template_language_prop_template_language_prop_FromString(char* template_language_prop) { - int stringToReturn = 0; - char *template_language_propArray[] = { "NULL", "af", "sq", "ar", "az", "bn", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "nl", "en", "en_GB", "en_US", "et", "fil", "fi", "fr", "de", "el", "gu", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "ko", "lo", "lv", "lt", "mk", "ms", "mr", "nb", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "sk", "sl", "es", "es_AR", "es_ES", "es_MX", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi" }; - size_t sizeofArray = sizeof(template_language_propArray) / sizeof(template_language_propArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(template_language_prop, template_language_propArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -cJSON *template_language_prop_template_language_prop_convertToJSON(one_msg_waba_sdk_template_language_prop__e template_language_prop) { - cJSON *item = cJSON_CreateObject(); - if(cJSON_AddStringToObject(item, "template_language_prop", template_language_prop_template_language_prop_ToString(template_language_prop)) == NULL) { - goto fail; - } - return item; -fail: - cJSON_Delete(item); - return NULL; -} - -one_msg_waba_sdk_template_language_prop__e template_language_prop_template_language_prop_parseFromJSON(cJSON *template_language_propJSON) { - one_msg_waba_sdk_template_language_prop__e *template_language_prop = NULL; - one_msg_waba_sdk_template_language_prop__e template_language_propVariable; - cJSON *template_language_propVar = cJSON_GetObjectItemCaseSensitive(template_language_propJSON, "template_language_prop"); - if(!cJSON_IsString(template_language_propVar) || (template_language_propVar->valuestring == NULL)){ - goto end; - } - template_language_propVariable = template_language_prop_template_language_prop_FromString(template_language_propVar->valuestring); - return template_language_propVariable; -end: - return 0; -} diff --git a/c/model/template_language_prop.h b/c/model/template_language_prop.h deleted file mode 100644 index 7dfc0eb..0000000 --- a/c/model/template_language_prop.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * template_language_prop.h - * - * Template language - */ - -#ifndef _template_language_prop_H_ -#define _template_language_prop_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct template_language_prop_t template_language_prop_t; - - -// Enum for template_language_prop - -typedef enum { one_msg_waba_sdk_template_language_prop__NULL = 0, one_msg_waba_sdk_template_language_prop__af, one_msg_waba_sdk_template_language_prop__sq, one_msg_waba_sdk_template_language_prop__ar, one_msg_waba_sdk_template_language_prop__az, one_msg_waba_sdk_template_language_prop__bn, one_msg_waba_sdk_template_language_prop__bg, one_msg_waba_sdk_template_language_prop__ca, one_msg_waba_sdk_template_language_prop__zh_CN, one_msg_waba_sdk_template_language_prop__zh_HK, one_msg_waba_sdk_template_language_prop__zh_TW, one_msg_waba_sdk_template_language_prop__hr, one_msg_waba_sdk_template_language_prop__cs, one_msg_waba_sdk_template_language_prop__da, one_msg_waba_sdk_template_language_prop__nl, one_msg_waba_sdk_template_language_prop__en, one_msg_waba_sdk_template_language_prop__en_GB, one_msg_waba_sdk_template_language_prop__en_US, one_msg_waba_sdk_template_language_prop__et, one_msg_waba_sdk_template_language_prop__fil, one_msg_waba_sdk_template_language_prop__fi, one_msg_waba_sdk_template_language_prop__fr, one_msg_waba_sdk_template_language_prop__de, one_msg_waba_sdk_template_language_prop__el, one_msg_waba_sdk_template_language_prop__gu, one_msg_waba_sdk_template_language_prop__he, one_msg_waba_sdk_template_language_prop__hi, one_msg_waba_sdk_template_language_prop__hu, one_msg_waba_sdk_template_language_prop__id, one_msg_waba_sdk_template_language_prop__ga, one_msg_waba_sdk_template_language_prop__it, one_msg_waba_sdk_template_language_prop__ja, one_msg_waba_sdk_template_language_prop__kn, one_msg_waba_sdk_template_language_prop__kk, one_msg_waba_sdk_template_language_prop__ko, one_msg_waba_sdk_template_language_prop__lo, one_msg_waba_sdk_template_language_prop__lv, one_msg_waba_sdk_template_language_prop__lt, one_msg_waba_sdk_template_language_prop__mk, one_msg_waba_sdk_template_language_prop__ms, one_msg_waba_sdk_template_language_prop__mr, one_msg_waba_sdk_template_language_prop__nb, one_msg_waba_sdk_template_language_prop__fa, one_msg_waba_sdk_template_language_prop__pl, one_msg_waba_sdk_template_language_prop__pt_BR, one_msg_waba_sdk_template_language_prop__pt_PT, one_msg_waba_sdk_template_language_prop__pa, one_msg_waba_sdk_template_language_prop__ro, one_msg_waba_sdk_template_language_prop__ru, one_msg_waba_sdk_template_language_prop__sr, one_msg_waba_sdk_template_language_prop__sk, one_msg_waba_sdk_template_language_prop__sl, one_msg_waba_sdk_template_language_prop__es, one_msg_waba_sdk_template_language_prop__es_AR, one_msg_waba_sdk_template_language_prop__es_ES, one_msg_waba_sdk_template_language_prop__es_MX, one_msg_waba_sdk_template_language_prop__sw, one_msg_waba_sdk_template_language_prop__sv, one_msg_waba_sdk_template_language_prop__ta, one_msg_waba_sdk_template_language_prop__te, one_msg_waba_sdk_template_language_prop__th, one_msg_waba_sdk_template_language_prop__tr, one_msg_waba_sdk_template_language_prop__uk, one_msg_waba_sdk_template_language_prop__ur, one_msg_waba_sdk_template_language_prop__uz, one_msg_waba_sdk_template_language_prop__vi } one_msg_waba_sdk_template_language_prop__e; - -char* template_language_prop_template_language_prop_ToString(one_msg_waba_sdk_template_language_prop__e template_language_prop); - -one_msg_waba_sdk_template_language_prop__e template_language_prop_template_language_prop_FromString(char* template_language_prop); - -//cJSON *template_language_prop_template_language_prop_convertToJSON(one_msg_waba_sdk_template_language_prop__e template_language_prop); - -//one_msg_waba_sdk_template_language_prop__e template_language_prop_template_language_prop_parseFromJSON(cJSON *template_language_propJSON); - -#endif /* _template_language_prop_H_ */ - diff --git a/c/model/template_namespace_field.c b/c/model/template_namespace_field.c deleted file mode 100644 index eb2a74a..0000000 --- a/c/model/template_namespace_field.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include "template_namespace_field.h" - - - -template_namespace_field_t *template_namespace_field_create( - char *_namespace - ) { - template_namespace_field_t *template_namespace_field_local_var = malloc(sizeof(template_namespace_field_t)); - if (!template_namespace_field_local_var) { - return NULL; - } - template_namespace_field_local_var->_namespace = _namespace; - - return template_namespace_field_local_var; -} - - -void template_namespace_field_free(template_namespace_field_t *template_namespace_field) { - if(NULL == template_namespace_field){ - return ; - } - listEntry_t *listEntry; - if (template_namespace_field->_namespace) { - free(template_namespace_field->_namespace); - template_namespace_field->_namespace = NULL; - } - free(template_namespace_field); -} - -cJSON *template_namespace_field_convertToJSON(template_namespace_field_t *template_namespace_field) { - cJSON *item = cJSON_CreateObject(); - - // template_namespace_field->_namespace - if(template_namespace_field->_namespace) { - if(cJSON_AddStringToObject(item, "namespace", template_namespace_field->_namespace) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -template_namespace_field_t *template_namespace_field_parseFromJSON(cJSON *template_namespace_fieldJSON){ - - template_namespace_field_t *template_namespace_field_local_var = NULL; - - // template_namespace_field->_namespace - cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(template_namespace_fieldJSON, "namespace"); - if (_namespace) { - if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) - { - goto end; //String - } - } - - - template_namespace_field_local_var = template_namespace_field_create ( - _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL - ); - - return template_namespace_field_local_var; -end: - return NULL; - -} diff --git a/c/model/template_namespace_field.h b/c/model/template_namespace_field.h deleted file mode 100644 index 302591f..0000000 --- a/c/model/template_namespace_field.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * template_namespace_field.h - * - * - */ - -#ifndef _template_namespace_field_H_ -#define _template_namespace_field_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct template_namespace_field_t template_namespace_field_t; - - - - -typedef struct template_namespace_field_t { - char *_namespace; // string - -} template_namespace_field_t; - -template_namespace_field_t *template_namespace_field_create( - char *_namespace -); - -void template_namespace_field_free(template_namespace_field_t *template_namespace_field); - -template_namespace_field_t *template_namespace_field_parseFromJSON(cJSON *template_namespace_fieldJSON); - -cJSON *template_namespace_field_convertToJSON(template_namespace_field_t *template_namespace_field); - -#endif /* _template_namespace_field_H_ */ - diff --git a/c/model/upload_media.c b/c/model/upload_media.c deleted file mode 100644 index d40c4d1..0000000 --- a/c/model/upload_media.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "upload_media.h" - - - -upload_media_t *upload_media_create( - char *body - ) { - upload_media_t *upload_media_local_var = malloc(sizeof(upload_media_t)); - if (!upload_media_local_var) { - return NULL; - } - upload_media_local_var->body = body; - - return upload_media_local_var; -} - - -void upload_media_free(upload_media_t *upload_media) { - if(NULL == upload_media){ - return ; - } - listEntry_t *listEntry; - if (upload_media->body) { - free(upload_media->body); - upload_media->body = NULL; - } - free(upload_media); -} - -cJSON *upload_media_convertToJSON(upload_media_t *upload_media) { - cJSON *item = cJSON_CreateObject(); - - // upload_media->body - if (!upload_media->body) { - goto fail; - } - if(cJSON_AddStringToObject(item, "body", upload_media->body) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -upload_media_t *upload_media_parseFromJSON(cJSON *upload_mediaJSON){ - - upload_media_t *upload_media_local_var = NULL; - - // upload_media->body - cJSON *body = cJSON_GetObjectItemCaseSensitive(upload_mediaJSON, "body"); - if (!body) { - goto end; - } - - - if(!cJSON_IsString(body)) - { - goto end; //String - } - - - upload_media_local_var = upload_media_create ( - strdup(body->valuestring) - ); - - return upload_media_local_var; -end: - return NULL; - -} diff --git a/c/model/upload_media.h b/c/model/upload_media.h deleted file mode 100644 index 1841e95..0000000 --- a/c/model/upload_media.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * upload_media.h - * - * - */ - -#ifndef _upload_media_H_ -#define _upload_media_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct upload_media_t upload_media_t; - - - - -typedef struct upload_media_t { - char *body; // string - -} upload_media_t; - -upload_media_t *upload_media_create( - char *body -); - -void upload_media_free(upload_media_t *upload_media); - -upload_media_t *upload_media_parseFromJSON(cJSON *upload_mediaJSON); - -cJSON *upload_media_convertToJSON(upload_media_t *upload_media); - -#endif /* _upload_media_H_ */ - diff --git a/c/model/webhook_url.c b/c/model/webhook_url.c deleted file mode 100644 index 62ea415..0000000 --- a/c/model/webhook_url.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "webhook_url.h" - - - -webhook_url_t *webhook_url_create( - char *webhook_url - ) { - webhook_url_t *webhook_url_local_var = malloc(sizeof(webhook_url_t)); - if (!webhook_url_local_var) { - return NULL; - } - webhook_url_local_var->webhook_url = webhook_url; - - return webhook_url_local_var; -} - - -void webhook_url_free(webhook_url_t *webhook_url) { - if(NULL == webhook_url){ - return ; - } - listEntry_t *listEntry; - if (webhook_url->webhook_url) { - free(webhook_url->webhook_url); - webhook_url->webhook_url = NULL; - } - free(webhook_url); -} - -cJSON *webhook_url_convertToJSON(webhook_url_t *webhook_url) { - cJSON *item = cJSON_CreateObject(); - - // webhook_url->webhook_url - if (!webhook_url->webhook_url) { - goto fail; - } - if(cJSON_AddStringToObject(item, "webhookUrl", webhook_url->webhook_url) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -webhook_url_t *webhook_url_parseFromJSON(cJSON *webhook_urlJSON){ - - webhook_url_t *webhook_url_local_var = NULL; - - // webhook_url->webhook_url - cJSON *webhook_url = cJSON_GetObjectItemCaseSensitive(webhook_urlJSON, "webhookUrl"); - if (!webhook_url) { - goto end; - } - - - if(!cJSON_IsString(webhook_url)) - { - goto end; //String - } - - - webhook_url_local_var = webhook_url_create ( - strdup(webhook_url->valuestring) - ); - - return webhook_url_local_var; -end: - return NULL; - -} diff --git a/c/model/webhook_url.h b/c/model/webhook_url.h deleted file mode 100644 index 1f95f4e..0000000 --- a/c/model/webhook_url.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * webhook_url.h - * - * - */ - -#ifndef _webhook_url_H_ -#define _webhook_url_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct webhook_url_t webhook_url_t; - - - - -typedef struct webhook_url_t { - char *webhook_url; // string - -} webhook_url_t; - -webhook_url_t *webhook_url_create( - char *webhook_url -); - -void webhook_url_free(webhook_url_t *webhook_url); - -webhook_url_t *webhook_url_parseFromJSON(cJSON *webhook_urlJSON); - -cJSON *webhook_url_convertToJSON(webhook_url_t *webhook_url); - -#endif /* _webhook_url_H_ */ - diff --git a/c/src/apiClient.c b/c/src/apiClient.c deleted file mode 100644 index f5c41c0..0000000 --- a/c/src/apiClient.c +++ /dev/null @@ -1,534 +0,0 @@ -#include -#include -#include -#include -#include "../include/apiClient.h" - -size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp); - -apiClient_t *apiClient_create() { - apiClient_t *apiClient = malloc(sizeof(apiClient_t)); - apiClient->basePath = strdup("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - apiClient->sslConfig = NULL; - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - apiClient->data_callback_func = NULL; - apiClient->progress_func = NULL; - apiClient->progress_data = NULL; - apiClient->response_code = 0; - apiClient->apiKeys_token = NULL; - - return apiClient; -} - -apiClient_t *apiClient_create_with_base_path(const char *basePath -, sslConfig_t *sslConfig -, list_t *apiKeys_token -) { - apiClient_t *apiClient = malloc(sizeof(apiClient_t)); - if(basePath){ - apiClient->basePath = strdup(basePath); - }else{ - apiClient->basePath = strdup("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - } - - if(sslConfig){ - apiClient->sslConfig = sslConfig; - }else{ - apiClient->sslConfig = NULL; - } - - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - apiClient->data_callback_func = NULL; - apiClient->progress_func = NULL; - apiClient->progress_data = NULL; - apiClient->response_code = 0; - if(apiKeys_token!= NULL) { - apiClient->apiKeys_token = list_createList(); - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, apiKeys_token) { - keyValuePair_t *pair = listEntry->data; - keyValuePair_t *pairDup = keyValuePair_create(strdup(pair->key), strdup(pair->value)); - list_addElement(apiClient->apiKeys_token, pairDup); - } - }else{ - apiClient->apiKeys_token = NULL; - } - - return apiClient; -} - -void apiClient_free(apiClient_t *apiClient) { - if(apiClient->basePath) { - free(apiClient->basePath); - } - apiClient->data_callback_func = NULL; - apiClient->progress_func = NULL; - apiClient->progress_data = NULL; - if(apiClient->apiKeys_token) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, apiClient->apiKeys_token) { - keyValuePair_t *pair = listEntry->data; - if(pair->key){ - free(pair->key); - } - if(pair->value){ - free(pair->value); - } - keyValuePair_free(pair); - } - list_freeList(apiClient->apiKeys_token); - } - free(apiClient); -} - -sslConfig_t *sslConfig_create(const char *clientCertFile, const char *clientKeyFile, const char *CACertFile, int insecureSkipTlsVerify) { - sslConfig_t *sslConfig = calloc(1, sizeof(sslConfig_t)); - if ( clientCertFile ) { - sslConfig->clientCertFile = strdup(clientCertFile); - } - if ( clientKeyFile ) { - sslConfig->clientKeyFile = strdup(clientKeyFile); - } - if ( CACertFile ) { - sslConfig->CACertFile = strdup(CACertFile); - } - sslConfig->insecureSkipTlsVerify = insecureSkipTlsVerify; - return sslConfig; -} - -void sslConfig_free(sslConfig_t *sslConfig) { - if ( sslConfig->clientCertFile ) { - free(sslConfig->clientCertFile); - } - if ( sslConfig->clientKeyFile ) { - free(sslConfig->clientKeyFile); - } - if ( sslConfig->CACertFile ){ - free(sslConfig->CACertFile); - } - free(sslConfig); -} - -void replaceSpaceWithPlus(char *stringToProcess) { - for(int i = 0; i < strlen(stringToProcess); i++) { - if(stringToProcess[i] == ' ') { - stringToProcess[i] = '+'; - } - } -} - -char *assembleTargetUrl(const char *basePath, - const char *operationParameter, - list_t *queryParameters) { - int neededBufferSizeForQueryParameters = 0; - listEntry_t *listEntry; - - if(queryParameters != NULL) { - list_ForEach(listEntry, queryParameters) { - keyValuePair_t *pair = listEntry->data; - neededBufferSizeForQueryParameters += - strlen(pair->key) + strlen(pair->value); - } - - neededBufferSizeForQueryParameters += - (queryParameters->count * 2); // each keyValuePair is separated by a = and a & except the last, but this makes up for the ? at the beginning - } - - int operationParameterLength = 0; - int basePathLength = strlen(basePath); - - if(operationParameter != NULL) { - operationParameterLength = (1 + strlen(operationParameter)); - } - - char *targetUrl = - malloc( - neededBufferSizeForQueryParameters + basePathLength + operationParameterLength + - 1); - - strcpy(targetUrl, basePath); - - if(operationParameter != NULL) { - strcat(targetUrl, operationParameter); - } - - if(queryParameters != NULL) { - strcat(targetUrl, "?"); - list_ForEach(listEntry, queryParameters) { - keyValuePair_t *pair = listEntry->data; - replaceSpaceWithPlus(pair->key); - strcat(targetUrl, pair->key); - strcat(targetUrl, "="); - replaceSpaceWithPlus(pair->value); - strcat(targetUrl, pair->value); - if(listEntry->nextListEntry != NULL) { - strcat(targetUrl, "&"); - } - } - } - - return targetUrl; -} - -char *assembleHeaderField(char *key, char *value) { - char *header = malloc(strlen(key) + strlen(value) + 3); - - strcpy(header, key), - strcat(header, ": "); - strcat(header, value); - - return header; -} - -void postData(CURL *handle, const char *bodyParameters) { - curl_easy_setopt(handle, CURLOPT_POSTFIELDS, bodyParameters); - curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE_LARGE, - (curl_off_t)strlen(bodyParameters)); -} - -int lengthOfKeyPair(keyValuePair_t *keyPair) { - long length = 0; - if((keyPair->key != NULL) && - (keyPair->value != NULL) ) - { - length = strlen(keyPair->key) + strlen(keyPair->value); - return length; - } - return 0; -} - - -void apiClient_invoke(apiClient_t *apiClient, - const char *operationParameter, - list_t *queryParameters, - list_t *headerParameters, - list_t *formParameters, - list_t *headerType, - list_t *contentType, - const char *bodyParameters, - const char *requestType) { - CURL *handle = curl_easy_init(); - CURLcode res; - - if(handle) { - listEntry_t *listEntry; - curl_mime *mime = NULL; - struct curl_slist *headers = NULL; - char *buffContent = NULL; - char *buffHeader = NULL; - binary_t *fileVar = NULL; - char *formString = NULL; - - if(headerType != NULL) { - list_ForEach(listEntry, headerType) { - if(strstr((char *) listEntry->data, - "xml") == NULL) - { - buffHeader = malloc(strlen( - "Accept: ") + - strlen((char *) - listEntry-> - data) + 1); - sprintf(buffHeader, "%s%s", "Accept: ", - (char *) listEntry->data); - headers = curl_slist_append(headers, - buffHeader); - free(buffHeader); - } - } - } - if(contentType != NULL) { - list_ForEach(listEntry, contentType) { - if(strstr((char *) listEntry->data, - "xml") == NULL) - { - buffContent = - malloc(strlen( - "Content-Type: ") + strlen( - (char *) - listEntry->data) + - 1); - sprintf(buffContent, "%s%s", - "Content-Type: ", - (char *) listEntry->data); - headers = curl_slist_append(headers, - buffContent); - free(buffContent); - buffContent = NULL; - } - } - } else { - headers = curl_slist_append(headers, - "Content-Type: application/json"); - } - - if(requestType != NULL) { - curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, - requestType); - } - - if(formParameters != NULL) { - if(contentType && - findStrInStrList(contentType, "application/x-www-form-urlencoded") != NULL) - { - long parameterLength = 0; - long keyPairLength = 0; - list_ForEach(listEntry, formParameters) { - keyValuePair_t *keyPair = - listEntry->data; - - keyPairLength = - lengthOfKeyPair(keyPair) + 1; - - if(listEntry->nextListEntry != NULL) { - parameterLength++; - } - parameterLength = parameterLength + - keyPairLength; - } - - formString = malloc(parameterLength + 1); - memset(formString, 0, parameterLength + 1); - - list_ForEach(listEntry, formParameters) { - keyValuePair_t *keyPair = - listEntry->data; - if((keyPair->key != NULL) && - (keyPair->value != NULL) ) - { - strcat(formString, - keyPair->key); - strcat(formString, "="); - strcat(formString, - keyPair->value); - if(listEntry->nextListEntry != - NULL) - { - strcat(formString, "&"); - } - } - } - curl_easy_setopt(handle, CURLOPT_POSTFIELDS, - formString); - } - if(contentType && - findStrInStrList(contentType, "multipart/form-data") != NULL) { - mime = curl_mime_init(handle); - list_ForEach(listEntry, formParameters) { - keyValuePair_t *keyValuePair = - listEntry->data; - - if((keyValuePair->key != NULL) && - (keyValuePair->value != NULL) ) - { - curl_mimepart *part = - curl_mime_addpart(mime); - - curl_mime_name(part, - keyValuePair->key); - - - if(strcmp(keyValuePair->key, - "file") == 0) - { - memcpy(&fileVar, - keyValuePair->value, - sizeof(fileVar)); - curl_mime_data(part, - fileVar->data, - fileVar->len); - curl_mime_filename(part, - "image.png"); - } else { - curl_mime_data(part, - keyValuePair->value, - CURL_ZERO_TERMINATED); - } - } - } - curl_easy_setopt(handle, CURLOPT_MIMEPOST, - mime); - } - } - - list_ForEach(listEntry, headerParameters) { - keyValuePair_t *keyValuePair = listEntry->data; - if((keyValuePair->key != NULL) && - (keyValuePair->value != NULL) ) - { - char *headerValueToWrite = assembleHeaderField( - keyValuePair->key, keyValuePair->value); - curl_slist_append(headers, headerValueToWrite); - free(headerValueToWrite); - } - } - - if ( strstr(apiClient->basePath, "https") != NULL ) { - if ( apiClient->sslConfig ) { - if( apiClient->sslConfig->clientCertFile ) { - curl_easy_setopt(handle, CURLOPT_SSLCERT, apiClient->sslConfig->clientCertFile); - } - if( apiClient->sslConfig->clientKeyFile ) { - curl_easy_setopt(handle, CURLOPT_SSLKEY, apiClient->sslConfig->clientKeyFile); - } - if( apiClient->sslConfig->CACertFile ) { - curl_easy_setopt(handle, CURLOPT_CAINFO, apiClient->sslConfig->CACertFile); - } - if ( 1 == apiClient->sslConfig->insecureSkipTlsVerify ) { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); - } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); - } - } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); - } - } - - if (apiClient->progress_func != NULL) { - curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION, apiClient->progress_func); - if (apiClient->progress_data != NULL) { - curl_easy_setopt(handle, CURLOPT_XFERINFODATA, apiClient->progress_data); - } - curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0L); - } - - // this would only be generated for apiKey authentication - if (apiClient->apiKeys_token != NULL) - { - list_ForEach(listEntry, apiClient->apiKeys_token) { - keyValuePair_t *apiKey = listEntry->data; - if((apiKey->key != NULL) && - (apiKey->value != NULL) ) - { - char *headerValueToWrite = assembleHeaderField( - apiKey->key, apiKey->value); - curl_slist_append(headers, headerValueToWrite); - free(headerValueToWrite); - } - } - } - - char *targetUrl = - assembleTargetUrl(apiClient->basePath, - operationParameter, - queryParameters); - - curl_easy_setopt(handle, CURLOPT_URL, targetUrl); - curl_easy_setopt(handle, - CURLOPT_WRITEFUNCTION, - writeDataCallback); - curl_easy_setopt(handle, - CURLOPT_WRITEDATA, - apiClient); - curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); - curl_easy_setopt(handle, CURLOPT_VERBOSE, 0); // to get curl debug msg 0: to disable, 1L:to enable - - - if(bodyParameters != NULL) { - postData(handle, bodyParameters); - } - - res = curl_easy_perform(handle); - - curl_slist_free_all(headers); - - free(targetUrl); - - if(res == CURLE_OK) { - curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &apiClient->response_code); - } else { - char *url,*ip,*scheme; - long port; - curl_easy_getinfo(handle, CURLINFO_EFFECTIVE_URL, &url); - curl_easy_getinfo(handle, CURLINFO_PRIMARY_IP, &ip); - curl_easy_getinfo(handle, CURLINFO_PRIMARY_PORT, &port); - curl_easy_getinfo(handle, CURLINFO_SCHEME, &scheme); - fprintf(stderr, "curl_easy_perform() failed\n\nURL: %s\nIP: %s\nPORT: %li\nSCHEME: %s\nStrERROR: %s\n",url,ip,port,scheme, - curl_easy_strerror(res)); - } - - curl_easy_cleanup(handle); - if(formParameters != NULL) { - free(formString); - curl_mime_free(mime); - } - } -} - -size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) { - size_t size_this_time = nmemb * size; - apiClient_t *apiClient = (apiClient_t *)userp; - apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1); - memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time); - apiClient->dataReceivedLen += size_this_time; - ((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1 - if (apiClient->data_callback_func) { - apiClient->data_callback_func(&apiClient->dataReceived, &apiClient->dataReceivedLen); - } - return size_this_time; -} - -char *strReplace(char *orig, char *rep, char *with) { - char *result; // the return string - char *ins; // the next insert point - char *tmp; // varies - int lenRep; // length of rep (the string to remove) - int lenWith; // length of with (the string to replace rep with) - int lenFront; // distance between rep and end of last rep - int count; // number of replacements - - // sanity checks and initialization - if(!orig || !rep) - { - return NULL; - } - lenRep = strlen(rep); - if(lenRep == 0) { - return NULL; // empty rep causes infinite loop during count - } - if(!with) { - with = ""; - } - lenWith = strlen(with); - - // count the number of replacements needed - ins = orig; - for(count = 0; tmp = strstr(ins, rep); ++count) { - ins = tmp + lenRep; - } - - tmp = result = malloc(strlen(orig) + (lenWith - lenRep) * count + 1); - - if(!result) { - return NULL; - } - char *originalPointer = orig; // copying original pointer to free the memory - // first time through the loop, all the variable are set correctly - // from here on, - // tmp points to the end of the result string - // ins points to the next occurrence of rep in orig - // orig points to the remainder of orig after "end of rep" - while(count--) { - ins = strstr(orig, rep); - lenFront = ins - orig; - tmp = strncpy(tmp, orig, lenFront) + lenFront; - tmp = strcpy(tmp, with) + lenWith; - orig += lenFront + lenRep; // move to next "end of rep" - } - strcpy(tmp, orig); - free(originalPointer); - return result; -} - -void apiClient_setupGlobalEnv() { - curl_global_init(CURL_GLOBAL_ALL); -} - -void apiClient_unsetupGlobalEnv() { - curl_global_cleanup(); -} diff --git a/c/src/apiKey.c b/c/src/apiKey.c deleted file mode 100644 index eae9b75..0000000 --- a/c/src/apiKey.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include "../include/keyValuePair.h" - -keyValuePair_t *keyValuePair_create(char *key, void *value) { - keyValuePair_t *keyValuePair = malloc(sizeof(keyValuePair_t)); - keyValuePair->key = key; - keyValuePair->value = value; - return keyValuePair; -} - -keyValuePair_t* keyValuePair_create_allocate(char* key, double value) { - double* boolpointer = malloc(sizeof(value)); - memcpy(boolpointer, &value, sizeof(value)); - return keyValuePair_create(key, boolpointer); -} - -void keyValuePair_free(keyValuePair_t *keyValuePair) { - free(keyValuePair); -} diff --git a/c/src/binary.c b/c/src/binary.c deleted file mode 100644 index ddd162a..0000000 --- a/c/src/binary.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include "../include/binary.h" -#ifdef OPENSSL -#include "openssl/pem.h" -#endif - -binary_t* instantiate_binary_t(char* data, int len) { - binary_t* ret = malloc(sizeof(struct binary_t)); - ret->len=len; - ret->data = malloc(len); - memcpy(ret->data, data, len); - return ret; -} - -char *base64encode (const void *b64_encode_this, int encode_this_many_bytes){ -#ifdef OPENSSL - BIO *b64_bio, *mem_bio; //Declares two OpenSSL BIOs: a base64 filter and a memory BIO. - BUF_MEM *mem_bio_mem_ptr; //Pointer to a "memory BIO" structure holding our base64 data. - b64_bio = BIO_new(BIO_f_base64()); //Initialize our base64 filter BIO. - mem_bio = BIO_new(BIO_s_mem()); //Initialize our memory sink BIO. - BIO_push(b64_bio, mem_bio); //Link the BIOs by creating a filter-sink BIO chain. - BIO_set_flags(b64_bio, BIO_FLAGS_BASE64_NO_NL); //No newlines every 64 characters or less. - BIO_write(b64_bio, b64_encode_this, encode_this_many_bytes); //Records base64 encoded data. - BIO_flush(b64_bio); //Flush data. Necessary for b64 encoding, because of pad characters. - BIO_get_mem_ptr(mem_bio, &mem_bio_mem_ptr); //Store address of mem_bio's memory structure. - BIO_set_close(mem_bio, BIO_NOCLOSE); //Permit access to mem_ptr after BIOs are destroyed. - BIO_free_all(b64_bio); //Destroys all BIOs in chain, starting with b64 (i.e. the 1st one). - BUF_MEM_grow(mem_bio_mem_ptr, (*mem_bio_mem_ptr).length + 1); //Makes space for end null. - (*mem_bio_mem_ptr).data[(*mem_bio_mem_ptr).length] = '\0'; //Adds null-terminator to tail. - return (*mem_bio_mem_ptr).data; //Returns base-64 encoded data. (See: "buf_mem_st" struct). -#else // OPENSSL -#warning Data will not be encoded. If you want to use function "base64encode", please define "-DOPENSSL" when building the library. - return NULL; -#endif // OPENSSL -} - -char *base64decode (const void *b64_decode_this, int decode_this_many_bytes, int *decoded_bytes){ -#ifdef OPENSSL - BIO *b64_bio, *mem_bio; //Declares two OpenSSL BIOs: a base64 filter and a memory BIO. - char *base64_decoded = calloc( (decode_this_many_bytes*3)/4+1, sizeof(char) ); //+1 = null. - b64_bio = BIO_new(BIO_f_base64()); //Initialize our base64 filter BIO. - mem_bio = BIO_new(BIO_s_mem()); //Initialize our memory source BIO. - BIO_write(mem_bio, b64_decode_this, decode_this_many_bytes); //Base64 data saved in source. - BIO_push(b64_bio, mem_bio); //Link the BIOs by creating a filter-source BIO chain. - BIO_set_flags(b64_bio, BIO_FLAGS_BASE64_NO_NL); //Don't require trailing newlines. - int decoded_byte_index = 0; //Index where the next base64_decoded byte should be written. - while ( 0 < BIO_read(b64_bio, base64_decoded+decoded_byte_index, 1) ){ //Read byte-by-byte. - decoded_byte_index++; //Increment the index until read of BIO decoded data is complete. - } //Once we're done reading decoded data, BIO_read returns -1 even though there's no error. - BIO_free_all(b64_bio); //Destroys all BIOs in chain, starting with b64 (i.e. the 1st one). - *decoded_bytes = decoded_byte_index; - return base64_decoded; //Returns base-64 decoded data with trailing null terminator. -#else // OPENSSL -#warning Data will not be decoded. If you want to use function "base64decode", please define "-DOPENSSL" when building the library. - return NULL; -#endif // OPENSSL -} diff --git a/c/src/list.c b/c/src/list.c deleted file mode 100644 index 7868121..0000000 --- a/c/src/list.c +++ /dev/null @@ -1,200 +0,0 @@ -#include -#include -#include -#include - -#include "../include/list.h" -static listEntry_t *listEntry_create(void *data) { - listEntry_t *createdListEntry = malloc(sizeof(listEntry_t)); - if(createdListEntry == NULL) { - // TODO Malloc Failure - return NULL; - } - createdListEntry->data = data; - - return createdListEntry; -} - -void listEntry_free(listEntry_t *listEntry, void *additionalData) { - free(listEntry); -} - -void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) { - printf("%i\n", *((int *) (listEntry->data))); -} - -list_t *list_createList() { - list_t *createdList = malloc(sizeof(list_t)); - if(createdList == NULL) { - // TODO Malloc Failure - return NULL; - } - createdList->firstEntry = NULL; - createdList->lastEntry = NULL; - createdList->count = 0; - - return createdList; -} - -void list_iterateThroughListForward(list_t *list, - void (*operationToPerform)( - listEntry_t *, - void *callbackFunctionUsedData), - void *additionalDataNeededForCallbackFunction) -{ - listEntry_t *currentListEntry = list->firstEntry; - listEntry_t *nextListEntry; - - if(currentListEntry == NULL) { - return; - } - - nextListEntry = currentListEntry->nextListEntry; - - operationToPerform(currentListEntry, - additionalDataNeededForCallbackFunction); - currentListEntry = nextListEntry; - - while(currentListEntry != NULL) { - nextListEntry = currentListEntry->nextListEntry; - operationToPerform(currentListEntry, - additionalDataNeededForCallbackFunction); - currentListEntry = nextListEntry; - } -} - -void list_iterateThroughListBackward(list_t *list, - void (*operationToPerform)( - listEntry_t *, - void *callbackFunctionUsedData), - void *additionalDataNeededForCallbackFunction) -{ - listEntry_t *currentListEntry = list->lastEntry; - listEntry_t *nextListEntry = currentListEntry->prevListEntry; - - if(currentListEntry == NULL) { - return; - } - - operationToPerform(currentListEntry, - additionalDataNeededForCallbackFunction); - currentListEntry = nextListEntry; - - while(currentListEntry != NULL) { - nextListEntry = currentListEntry->prevListEntry; - operationToPerform(currentListEntry, - additionalDataNeededForCallbackFunction); - currentListEntry = nextListEntry; - } -} - -void list_freeList(list_t *list) { - if(list){ - list_iterateThroughListForward(list, listEntry_free, NULL); - free(list); - } -} - -void list_addElement(list_t *list, void *dataToAddInList) { - listEntry_t *newListEntry = listEntry_create(dataToAddInList); - if(newListEntry == NULL) { - // TODO Malloc Failure - return; - } - if(list->firstEntry == NULL) { - list->firstEntry = newListEntry; - list->lastEntry = newListEntry; - - newListEntry->prevListEntry = NULL; - newListEntry->nextListEntry = NULL; - - list->count++; - - return; - } - - list->lastEntry->nextListEntry = newListEntry; - newListEntry->prevListEntry = list->lastEntry; - newListEntry->nextListEntry = NULL; - list->lastEntry = newListEntry; - - list->count++; -} - -void list_removeElement(list_t *list, listEntry_t *elementToRemove) { - listEntry_t *elementBeforeElementToRemove = - elementToRemove->prevListEntry; - listEntry_t *elementAfterElementToRemove = - elementToRemove->nextListEntry; - - if(elementBeforeElementToRemove != NULL) { - elementBeforeElementToRemove->nextListEntry = - elementAfterElementToRemove; - } else { - list->firstEntry = elementAfterElementToRemove; - } - - if(elementAfterElementToRemove != NULL) { - elementAfterElementToRemove->prevListEntry = - elementBeforeElementToRemove; - } else { - list->lastEntry = elementBeforeElementToRemove; - } - - listEntry_free(elementToRemove, NULL); - - list->count--; -} - -listEntry_t *list_getElementAt(list_t *list, long indexOfElement) { - listEntry_t *currentListEntry; - - if((list->count / 2) > indexOfElement) { - currentListEntry = list->firstEntry; - - for(int i = 0; i < indexOfElement; i++) { - currentListEntry = currentListEntry->nextListEntry; - } - - return currentListEntry; - } else { - currentListEntry = list->lastEntry; - - for(int i = 1; i < (list->count - indexOfElement); i++) { - currentListEntry = currentListEntry->prevListEntry; - } - - return currentListEntry; - } -} - -char* findStrInStrList(list_t *strList, const char *str) -{ - if (!strList || !str) { - return NULL; - } - - listEntry_t* listEntry = NULL; - list_ForEach(listEntry, strList) { - if (strstr((char*)listEntry->data, str) != NULL) { - return (char*)listEntry->data; - } - } - - return NULL; -} - -void clear_and_free_string_list(list_t *list) -{ - if (!list) { - return; - } - - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, list) { - char *list_item = listEntry->data; - free(list_item); - list_item = NULL; - } - list_freeList(list); -} \ No newline at end of file diff --git a/c/uncrustify-rules.cfg b/c/uncrustify-rules.cfg deleted file mode 100644 index fa6d5bf..0000000 --- a/c/uncrustify-rules.cfg +++ /dev/null @@ -1,210 +0,0 @@ -tok_split_gte=false -utf8_byte=false -utf8_force=true -indent_cmt_with_tabs=false -indent_align_string=false -indent_braces=false -indent_braces_no_func=false -indent_braces_no_class=false -indent_braces_no_struct=false -indent_brace_parent=false -indent_namespace=false -indent_extern=true -indent_class=false -indent_class_colon=false -indent_else_if=false -indent_var_def_cont=false -indent_func_call_param=false -indent_func_def_param=false -indent_func_proto_param=false -indent_func_class_param=false -indent_func_ctor_var_param=false -indent_template_param=false -indent_func_param_double=false -indent_relative_single_line_comments=false -indent_col1_comment=false -indent_access_spec_body=false -indent_paren_nl=false -indent_comma_paren=false -indent_bool_paren=false -indent_first_bool_expr=false -indent_square_nl=false -indent_preserve_sql=false -indent_align_assign=true -sp_balance_nested_parens=false -align_keep_tabs=false -align_with_tabs=true -align_on_tabstop=true -align_func_params=true -align_same_func_call_params=false -align_var_def_colon=false -align_var_def_attribute=false -align_var_def_inline=false -align_right_cmt_mix=false -align_on_operator=false -align_mix_var_proto=false -align_single_line_func=false -align_single_line_brace=false -align_nl_cont=false -align_left_shift=true -align_oc_decl_colon=false -nl_collapse_empty_body=true -nl_assign_leave_one_liners=false -nl_class_leave_one_liners=false -nl_enum_leave_one_liners=false -nl_getset_leave_one_liners=false -nl_func_leave_one_liners=false -nl_if_leave_one_liners=false -nl_multi_line_cond=true -nl_multi_line_define=false -nl_before_case=true -nl_after_case=true -nl_after_return=false -nl_after_semicolon=true -nl_after_brace_open=false -nl_after_brace_open_cmt=false -nl_after_vbrace_open=false -nl_after_vbrace_open_empty=false -nl_after_brace_close=false -nl_after_vbrace_close=false -nl_define_macro=false -nl_squeeze_ifdef=false -nl_ds_struct_enum_cmt=false -nl_ds_struct_enum_close_brace=false -nl_create_if_one_liner=false -nl_create_for_one_liner=false -nl_create_while_one_liner=false -ls_for_split_full=false -ls_func_split_full=false -nl_after_multiline_comment=false -eat_blanks_after_open_brace=true -eat_blanks_before_close_brace=true -mod_full_brace_if_chain=false -mod_pawn_semicolon=false -mod_full_paren_if_bool=true -mod_remove_extra_semicolon=true -mod_sort_import=true -mod_sort_using=false -mod_sort_include=false -mod_move_case_break=false -mod_remove_empty_return=true -cmt_indent_multi=true -cmt_c_group=false -cmt_c_nl_start=true -cmt_c_nl_end=true -cmt_cpp_group=false -cmt_cpp_nl_start=true -cmt_cpp_nl_end=true -cmt_cpp_to_c=false -cmt_star_cont=false -cmt_multi_check_last=true -cmt_insert_before_preproc=false -pp_indent_at_level=false -pp_region_indent_code=false -pp_if_indent_code=false -pp_define_at_level=false -align_var_def_star_style=1 -align_var_def_amp_style=0 -code_width=80 -indent_with_tabs=1 -sp_arith=force -sp_assign=force -sp_assign_default=force -sp_enum_assign=force -sp_bool=force -sp_compare=force -sp_inside_paren=remove -sp_before_ptr_star=force -sp_before_unnamed_ptr_star=force -sp_between_ptr_star=remove -sp_after_ptr_star=remove -sp_before_sparen=remove -sp_inside_sparen=remove -sp_sparen_brace=force -sp_before_semi=remove -sp_before_semi_for_empty=force -sp_after_semi=force -sp_after_semi_for=force -sp_after_semi_for_empty=force -sp_before_square=remove -sp_before_squares=remove -sp_inside_square=remove -sp_after_comma=force -sp_before_comma=remove -sp_paren_comma=force -sp_before_case_colon=remove -sp_after_cast=force -sp_inside_paren_cast=remove -sp_sizeof_paren=remove -sp_inside_braces_struct=force -sp_type_func=remove -sp_func_proto_paren=remove -sp_func_def_paren=remove -sp_inside_fparens=remove -sp_inside_fparen=remove -sp_square_fparen=remove -sp_fparen_brace=force -sp_func_call_paren=remove -sp_attribute_paren=remove -sp_defined_paren=remove -sp_macro=force -sp_macro_func=force -sp_else_brace=force -sp_brace_else=force -sp_brace_typedef=force -sp_not=remove -sp_inv=remove -sp_addr=remove -sp_member=remove -sp_deref=remove -sp_sign=remove -sp_incdec=remove -sp_before_nl_cont=force -sp_cond_colon=force -sp_cond_question=force -sp_case_label=force -sp_cmt_cpp_start=force -sp_endif_cmt=force -sp_before_tr_emb_cmt=force -nl_start_of_file=remove -nl_end_of_file=add -nl_assign_brace=remove -nl_enum_brace=remove -nl_struct_brace=remove -nl_union_brace=remove -nl_if_brace=remove -nl_brace_else=remove -nl_elseif_brace=remove -nl_else_brace=remove -nl_else_if=remove -nl_brace_finally=remove -nl_finally_brace=remove -nl_try_brace=remove -nl_for_brace=remove -nl_catch_brace=remove -nl_brace_catch=remove -nl_while_brace=remove -nl_do_brace=remove -nl_brace_while=remove -nl_switch_brace=remove -nl_class_brace=remove -nl_func_type_name=remove -nl_func_proto_type_name=remove -nl_func_paren=remove -nl_func_def_paren=remove -nl_func_decl_start=remove -nl_func_def_start=remove -nl_func_decl_args=remove -nl_func_def_args=remove -nl_func_decl_end=remove -nl_func_def_end=remove -nl_func_decl_empty=remove -nl_func_def_empty=remove -nl_fdef_brace=remove -nl_return_expr=remove -pos_bool=trail_break -mod_full_brace_do=force -mod_full_brace_for=force -mod_full_brace_if=force -mod_full_brace_while=force -mod_paren_on_return=remove \ No newline at end of file diff --git a/c/unit-test/test_ack.c b/c/unit-test/test_ack.c deleted file mode 100644 index 66eb27e..0000000 --- a/c/unit-test/test_ack.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef ack_TEST -#define ack_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define ack_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/ack.h" -ack_t* instantiate_ack(int include_optional); - - - -ack_t* instantiate_ack(int include_optional) { - ack_t* ack = NULL; - if (include_optional) { - ack = ack_create( - "true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F", - "12020721369@c.us", - one_msg_waba_sdk_ack_STATUS_"viewed" - ); - } else { - ack = ack_create( - "true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F", - "12020721369@c.us", - one_msg_waba_sdk_ack_STATUS_"viewed" - ); - } - - return ack; -} - - -#ifdef ack_MAIN - -void test_ack(int include_optional) { - ack_t* ack_1 = instantiate_ack(include_optional); - - cJSON* jsonack_1 = ack_convertToJSON(ack_1); - printf("ack :\n%s\n", cJSON_Print(jsonack_1)); - ack_t* ack_2 = ack_parseFromJSON(jsonack_1); - cJSON* jsonack_2 = ack_convertToJSON(ack_2); - printf("repeating ack:\n%s\n", cJSON_Print(jsonack_2)); -} - -int main() { - test_ack(1); - test_ack(0); - - printf("Hello world \n"); - return 0; -} - -#endif // ack_MAIN -#endif // ack_TEST diff --git a/c/unit-test/test_add_template_request.c b/c/unit-test/test_add_template_request.c deleted file mode 100644 index c825666..0000000 --- a/c/unit-test/test_add_template_request.c +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef add_template_request_TEST -#define add_template_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define add_template_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/add_template_request.h" -add_template_request_t* instantiate_add_template_request(int include_optional); - - - -add_template_request_t* instantiate_add_template_request(int include_optional) { - add_template_request_t* add_template_request = NULL; - if (include_optional) { - add_template_request = add_template_request_create( - "start", - one_msg_waba_sdk_add_template_request__"MARKETING", - list_createList(), - one_msg_waba_sdk_add_template_request__"en" - ); - } else { - add_template_request = add_template_request_create( - "start", - one_msg_waba_sdk_add_template_request__"MARKETING", - list_createList(), - one_msg_waba_sdk_add_template_request__"en" - ); - } - - return add_template_request; -} - - -#ifdef add_template_request_MAIN - -void test_add_template_request(int include_optional) { - add_template_request_t* add_template_request_1 = instantiate_add_template_request(include_optional); - - cJSON* jsonadd_template_request_1 = add_template_request_convertToJSON(add_template_request_1); - printf("add_template_request :\n%s\n", cJSON_Print(jsonadd_template_request_1)); - add_template_request_t* add_template_request_2 = add_template_request_parseFromJSON(jsonadd_template_request_1); - cJSON* jsonadd_template_request_2 = add_template_request_convertToJSON(add_template_request_2); - printf("repeating add_template_request:\n%s\n", cJSON_Print(jsonadd_template_request_2)); -} - -int main() { - test_add_template_request(1); - test_add_template_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // add_template_request_MAIN -#endif // add_template_request_TEST diff --git a/c/unit-test/test_channel_extended_statistics.c b/c/unit-test/test_channel_extended_statistics.c deleted file mode 100644 index 2414674..0000000 --- a/c/unit-test/test_channel_extended_statistics.c +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef channel_extended_statistics_TEST -#define channel_extended_statistics_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define channel_extended_statistics_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/channel_extended_statistics.h" -channel_extended_statistics_t* instantiate_channel_extended_statistics(int include_optional); - - - -channel_extended_statistics_t* instantiate_channel_extended_statistics(int include_optional) { - channel_extended_statistics_t* channel_extended_statistics = NULL; - if (include_optional) { - channel_extended_statistics = channel_extended_statistics_create( - ); - } else { - channel_extended_statistics = channel_extended_statistics_create( - ); - } - - return channel_extended_statistics; -} - - -#ifdef channel_extended_statistics_MAIN - -void test_channel_extended_statistics(int include_optional) { - channel_extended_statistics_t* channel_extended_statistics_1 = instantiate_channel_extended_statistics(include_optional); - - cJSON* jsonchannel_extended_statistics_1 = channel_extended_statistics_convertToJSON(channel_extended_statistics_1); - printf("channel_extended_statistics :\n%s\n", cJSON_Print(jsonchannel_extended_statistics_1)); - channel_extended_statistics_t* channel_extended_statistics_2 = channel_extended_statistics_parseFromJSON(jsonchannel_extended_statistics_1); - cJSON* jsonchannel_extended_statistics_2 = channel_extended_statistics_convertToJSON(channel_extended_statistics_2); - printf("repeating channel_extended_statistics:\n%s\n", cJSON_Print(jsonchannel_extended_statistics_2)); -} - -int main() { - test_channel_extended_statistics(1); - test_channel_extended_statistics(0); - - printf("Hello world \n"); - return 0; -} - -#endif // channel_extended_statistics_MAIN -#endif // channel_extended_statistics_TEST diff --git a/c/unit-test/test_channel_extended_statistics_inner.c b/c/unit-test/test_channel_extended_statistics_inner.c deleted file mode 100644 index c9326ef..0000000 --- a/c/unit-test/test_channel_extended_statistics_inner.c +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef channel_extended_statistics_inner_TEST -#define channel_extended_statistics_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define channel_extended_statistics_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/channel_extended_statistics_inner.h" -channel_extended_statistics_inner_t* instantiate_channel_extended_statistics_inner(int include_optional); - - - -channel_extended_statistics_inner_t* instantiate_channel_extended_statistics_inner(int include_optional) { - channel_extended_statistics_inner_t* channel_extended_statistics_inner = NULL; - if (include_optional) { - channel_extended_statistics_inner = channel_extended_statistics_inner_create( - 1, - 0.0691, - 2, - 0, - 1, - 1, - 1, - "2022-11-01T00:00:00Z", - 2, - 0.0691, - 1, - 0.0691, - 2 - ); - } else { - channel_extended_statistics_inner = channel_extended_statistics_inner_create( - 1, - 0.0691, - 2, - 0, - 1, - 1, - 1, - "2022-11-01T00:00:00Z", - 2, - 0.0691, - 1, - 0.0691, - 2 - ); - } - - return channel_extended_statistics_inner; -} - - -#ifdef channel_extended_statistics_inner_MAIN - -void test_channel_extended_statistics_inner(int include_optional) { - channel_extended_statistics_inner_t* channel_extended_statistics_inner_1 = instantiate_channel_extended_statistics_inner(include_optional); - - cJSON* jsonchannel_extended_statistics_inner_1 = channel_extended_statistics_inner_convertToJSON(channel_extended_statistics_inner_1); - printf("channel_extended_statistics_inner :\n%s\n", cJSON_Print(jsonchannel_extended_statistics_inner_1)); - channel_extended_statistics_inner_t* channel_extended_statistics_inner_2 = channel_extended_statistics_inner_parseFromJSON(jsonchannel_extended_statistics_inner_1); - cJSON* jsonchannel_extended_statistics_inner_2 = channel_extended_statistics_inner_convertToJSON(channel_extended_statistics_inner_2); - printf("repeating channel_extended_statistics_inner:\n%s\n", cJSON_Print(jsonchannel_extended_statistics_inner_2)); -} - -int main() { - test_channel_extended_statistics_inner(1); - test_channel_extended_statistics_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // channel_extended_statistics_inner_MAIN -#endif // channel_extended_statistics_inner_TEST diff --git a/c/unit-test/test_channel_statistics.c b/c/unit-test/test_channel_statistics.c deleted file mode 100644 index 801ce97..0000000 --- a/c/unit-test/test_channel_statistics.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef channel_statistics_TEST -#define channel_statistics_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define channel_statistics_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/channel_statistics.h" -channel_statistics_t* instantiate_channel_statistics(int include_optional); - - - -channel_statistics_t* instantiate_channel_statistics(int include_optional) { - channel_statistics_t* channel_statistics = NULL; - if (include_optional) { - channel_statistics = channel_statistics_create( - "03.2022", - 400.0313 - ); - } else { - channel_statistics = channel_statistics_create( - "03.2022", - 400.0313 - ); - } - - return channel_statistics; -} - - -#ifdef channel_statistics_MAIN - -void test_channel_statistics(int include_optional) { - channel_statistics_t* channel_statistics_1 = instantiate_channel_statistics(include_optional); - - cJSON* jsonchannel_statistics_1 = channel_statistics_convertToJSON(channel_statistics_1); - printf("channel_statistics :\n%s\n", cJSON_Print(jsonchannel_statistics_1)); - channel_statistics_t* channel_statistics_2 = channel_statistics_parseFromJSON(jsonchannel_statistics_1); - cJSON* jsonchannel_statistics_2 = channel_statistics_convertToJSON(channel_statistics_2); - printf("repeating channel_statistics:\n%s\n", cJSON_Print(jsonchannel_statistics_2)); -} - -int main() { - test_channel_statistics(1); - test_channel_statistics(0); - - printf("Hello world \n"); - return 0; -} - -#endif // channel_statistics_MAIN -#endif // channel_statistics_TEST diff --git a/c/unit-test/test_channel_status.c b/c/unit-test/test_channel_status.c deleted file mode 100644 index 0022ff0..0000000 --- a/c/unit-test/test_channel_status.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef channel_status_TEST -#define channel_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define channel_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/channel_status.h" -channel_status_t* instantiate_channel_status(int include_optional); - - - -channel_status_t* instantiate_channel_status(int include_optional) { - channel_status_t* channel_status = NULL; - if (include_optional) { - channel_status = channel_status_create( - one_msg_waba_sdk_channel_status_STATUS_"connected" - ); - } else { - channel_status = channel_status_create( - one_msg_waba_sdk_channel_status_STATUS_"connected" - ); - } - - return channel_status; -} - - -#ifdef channel_status_MAIN - -void test_channel_status(int include_optional) { - channel_status_t* channel_status_1 = instantiate_channel_status(include_optional); - - cJSON* jsonchannel_status_1 = channel_status_convertToJSON(channel_status_1); - printf("channel_status :\n%s\n", cJSON_Print(jsonchannel_status_1)); - channel_status_t* channel_status_2 = channel_status_parseFromJSON(jsonchannel_status_1); - cJSON* jsonchannel_status_2 = channel_status_convertToJSON(channel_status_2); - printf("repeating channel_status:\n%s\n", cJSON_Print(jsonchannel_status_2)); -} - -int main() { - test_channel_status(1); - test_channel_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // channel_status_MAIN -#endif // channel_status_TEST diff --git a/c/unit-test/test_chat_id_prop.c b/c/unit-test/test_chat_id_prop.c deleted file mode 100644 index ac64ebe..0000000 --- a/c/unit-test/test_chat_id_prop.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef chat_id_prop_TEST -#define chat_id_prop_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define chat_id_prop_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/chat_id_prop.h" -chat_id_prop_t* instantiate_chat_id_prop(int include_optional); - - - -chat_id_prop_t* instantiate_chat_id_prop(int include_optional) { - chat_id_prop_t* chat_id_prop = NULL; - if (include_optional) { - chat_id_prop = chat_id_prop_create( - "12020721369@c.us" - ); - } else { - chat_id_prop = chat_id_prop_create( - "12020721369@c.us" - ); - } - - return chat_id_prop; -} - - -#ifdef chat_id_prop_MAIN - -void test_chat_id_prop(int include_optional) { - chat_id_prop_t* chat_id_prop_1 = instantiate_chat_id_prop(include_optional); - - cJSON* jsonchat_id_prop_1 = chat_id_prop_convertToJSON(chat_id_prop_1); - printf("chat_id_prop :\n%s\n", cJSON_Print(jsonchat_id_prop_1)); - chat_id_prop_t* chat_id_prop_2 = chat_id_prop_parseFromJSON(jsonchat_id_prop_1); - cJSON* jsonchat_id_prop_2 = chat_id_prop_convertToJSON(chat_id_prop_2); - printf("repeating chat_id_prop:\n%s\n", cJSON_Print(jsonchat_id_prop_2)); -} - -int main() { - test_chat_id_prop(1); - test_chat_id_prop(0); - - printf("Hello world \n"); - return 0; -} - -#endif // chat_id_prop_MAIN -#endif // chat_id_prop_TEST diff --git a/c/unit-test/test_commerce.c b/c/unit-test/test_commerce.c deleted file mode 100644 index 9fe12ae..0000000 --- a/c/unit-test/test_commerce.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef commerce_TEST -#define commerce_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define commerce_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/commerce.h" -commerce_t* instantiate_commerce(int include_optional); - -#include "test_commerce_params.c" - - -commerce_t* instantiate_commerce(int include_optional) { - commerce_t* commerce = NULL; - if (include_optional) { - commerce = commerce_create( - // false, not to have infinite recursion - instantiate_commerce_params(0) - ); - } else { - commerce = commerce_create( - NULL - ); - } - - return commerce; -} - - -#ifdef commerce_MAIN - -void test_commerce(int include_optional) { - commerce_t* commerce_1 = instantiate_commerce(include_optional); - - cJSON* jsoncommerce_1 = commerce_convertToJSON(commerce_1); - printf("commerce :\n%s\n", cJSON_Print(jsoncommerce_1)); - commerce_t* commerce_2 = commerce_parseFromJSON(jsoncommerce_1); - cJSON* jsoncommerce_2 = commerce_convertToJSON(commerce_2); - printf("repeating commerce:\n%s\n", cJSON_Print(jsoncommerce_2)); -} - -int main() { - test_commerce(1); - test_commerce(0); - - printf("Hello world \n"); - return 0; -} - -#endif // commerce_MAIN -#endif // commerce_TEST diff --git a/c/unit-test/test_commerce_params.c b/c/unit-test/test_commerce_params.c deleted file mode 100644 index b47a290..0000000 --- a/c/unit-test/test_commerce_params.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef commerce_params_TEST -#define commerce_params_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define commerce_params_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/commerce_params.h" -commerce_params_t* instantiate_commerce_params(int include_optional); - - - -commerce_params_t* instantiate_commerce_params(int include_optional) { - commerce_params_t* commerce_params = NULL; - if (include_optional) { - commerce_params = commerce_params_create( - true, - true - ); - } else { - commerce_params = commerce_params_create( - true, - true - ); - } - - return commerce_params; -} - - -#ifdef commerce_params_MAIN - -void test_commerce_params(int include_optional) { - commerce_params_t* commerce_params_1 = instantiate_commerce_params(include_optional); - - cJSON* jsoncommerce_params_1 = commerce_params_convertToJSON(commerce_params_1); - printf("commerce_params :\n%s\n", cJSON_Print(jsoncommerce_params_1)); - commerce_params_t* commerce_params_2 = commerce_params_parseFromJSON(jsoncommerce_params_1); - cJSON* jsoncommerce_params_2 = commerce_params_convertToJSON(commerce_params_2); - printf("repeating commerce_params:\n%s\n", cJSON_Print(jsoncommerce_params_2)); -} - -int main() { - test_commerce_params(1); - test_commerce_params(0); - - printf("Hello world \n"); - return 0; -} - -#endif // commerce_params_MAIN -#endif // commerce_params_TEST diff --git a/c/unit-test/test_contacts.c b/c/unit-test/test_contacts.c deleted file mode 100644 index 0fa99ca..0000000 --- a/c/unit-test/test_contacts.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef contacts_TEST -#define contacts_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define contacts_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/contacts.h" -contacts_t* instantiate_contacts(int include_optional); - - - -contacts_t* instantiate_contacts(int include_optional) { - contacts_t* contacts = NULL; - if (include_optional) { - contacts = contacts_create( - list_createList() - ); - } else { - contacts = contacts_create( - list_createList() - ); - } - - return contacts; -} - - -#ifdef contacts_MAIN - -void test_contacts(int include_optional) { - contacts_t* contacts_1 = instantiate_contacts(include_optional); - - cJSON* jsoncontacts_1 = contacts_convertToJSON(contacts_1); - printf("contacts :\n%s\n", cJSON_Print(jsoncontacts_1)); - contacts_t* contacts_2 = contacts_parseFromJSON(jsoncontacts_1); - cJSON* jsoncontacts_2 = contacts_convertToJSON(contacts_2); - printf("repeating contacts:\n%s\n", cJSON_Print(jsoncontacts_2)); -} - -int main() { - test_contacts(1); - test_contacts(0); - - printf("Hello world \n"); - return 0; -} - -#endif // contacts_MAIN -#endif // contacts_TEST diff --git a/c/unit-test/test_contacts_contacts_inner.c b/c/unit-test/test_contacts_contacts_inner.c deleted file mode 100644 index 35df07f..0000000 --- a/c/unit-test/test_contacts_contacts_inner.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef contacts_contacts_inner_TEST -#define contacts_contacts_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define contacts_contacts_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/contacts_contacts_inner.h" -contacts_contacts_inner_t* instantiate_contacts_contacts_inner(int include_optional); - - - -contacts_contacts_inner_t* instantiate_contacts_contacts_inner(int include_optional) { - contacts_contacts_inner_t* contacts_contacts_inner = NULL; - if (include_optional) { - contacts_contacts_inner = contacts_contacts_inner_create( - "16315551000", - "valid", - "16315551000" - ); - } else { - contacts_contacts_inner = contacts_contacts_inner_create( - "16315551000", - "valid", - "16315551000" - ); - } - - return contacts_contacts_inner; -} - - -#ifdef contacts_contacts_inner_MAIN - -void test_contacts_contacts_inner(int include_optional) { - contacts_contacts_inner_t* contacts_contacts_inner_1 = instantiate_contacts_contacts_inner(include_optional); - - cJSON* jsoncontacts_contacts_inner_1 = contacts_contacts_inner_convertToJSON(contacts_contacts_inner_1); - printf("contacts_contacts_inner :\n%s\n", cJSON_Print(jsoncontacts_contacts_inner_1)); - contacts_contacts_inner_t* contacts_contacts_inner_2 = contacts_contacts_inner_parseFromJSON(jsoncontacts_contacts_inner_1); - cJSON* jsoncontacts_contacts_inner_2 = contacts_contacts_inner_convertToJSON(contacts_contacts_inner_2); - printf("repeating contacts_contacts_inner:\n%s\n", cJSON_Print(jsoncontacts_contacts_inner_2)); -} - -int main() { - test_contacts_contacts_inner(1); - test_contacts_contacts_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // contacts_contacts_inner_MAIN -#endif // contacts_contacts_inner_TEST diff --git a/c/unit-test/test_contacts_request.c b/c/unit-test/test_contacts_request.c deleted file mode 100644 index d4e49ab..0000000 --- a/c/unit-test/test_contacts_request.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef contacts_request_TEST -#define contacts_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define contacts_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/contacts_request.h" -contacts_request_t* instantiate_contacts_request(int include_optional); - - - -contacts_request_t* instantiate_contacts_request(int include_optional) { - contacts_request_t* contacts_request = NULL; - if (include_optional) { - contacts_request = contacts_request_create( - "wait", - true, - ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - ); - } else { - contacts_request = contacts_request_create( - "wait", - true, - ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - ); - } - - return contacts_request; -} - - -#ifdef contacts_request_MAIN - -void test_contacts_request(int include_optional) { - contacts_request_t* contacts_request_1 = instantiate_contacts_request(include_optional); - - cJSON* jsoncontacts_request_1 = contacts_request_convertToJSON(contacts_request_1); - printf("contacts_request :\n%s\n", cJSON_Print(jsoncontacts_request_1)); - contacts_request_t* contacts_request_2 = contacts_request_parseFromJSON(jsoncontacts_request_1); - cJSON* jsoncontacts_request_2 = contacts_request_convertToJSON(contacts_request_2); - printf("repeating contacts_request:\n%s\n", cJSON_Print(jsoncontacts_request_2)); -} - -int main() { - test_contacts_request(1); - test_contacts_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // contacts_request_MAIN -#endif // contacts_request_TEST diff --git a/c/unit-test/test_get_ack_info.c b/c/unit-test/test_get_ack_info.c deleted file mode 100644 index 2bc96cc..0000000 --- a/c/unit-test/test_get_ack_info.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef get_ack_info_TEST -#define get_ack_info_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_ack_info_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_ack_info.h" -get_ack_info_t* instantiate_get_ack_info(int include_optional); - - - -get_ack_info_t* instantiate_get_ack_info(int include_optional) { - get_ack_info_t* get_ack_info = NULL; - if (include_optional) { - get_ack_info = get_ack_info_create( - list_createList() - ); - } else { - get_ack_info = get_ack_info_create( - list_createList() - ); - } - - return get_ack_info; -} - - -#ifdef get_ack_info_MAIN - -void test_get_ack_info(int include_optional) { - get_ack_info_t* get_ack_info_1 = instantiate_get_ack_info(include_optional); - - cJSON* jsonget_ack_info_1 = get_ack_info_convertToJSON(get_ack_info_1); - printf("get_ack_info :\n%s\n", cJSON_Print(jsonget_ack_info_1)); - get_ack_info_t* get_ack_info_2 = get_ack_info_parseFromJSON(jsonget_ack_info_1); - cJSON* jsonget_ack_info_2 = get_ack_info_convertToJSON(get_ack_info_2); - printf("repeating get_ack_info:\n%s\n", cJSON_Print(jsonget_ack_info_2)); -} - -int main() { - test_get_ack_info(1); - test_get_ack_info(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_ack_info_MAIN -#endif // get_ack_info_TEST diff --git a/c/unit-test/test_get_ack_info_hooks_inner.c b/c/unit-test/test_get_ack_info_hooks_inner.c deleted file mode 100644 index 8af7913..0000000 --- a/c/unit-test/test_get_ack_info_hooks_inner.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef get_ack_info_hooks_inner_TEST -#define get_ack_info_hooks_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_ack_info_hooks_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_ack_info_hooks_inner.h" -get_ack_info_hooks_inner_t* instantiate_get_ack_info_hooks_inner(int include_optional); - - - -get_ack_info_hooks_inner_t* instantiate_get_ack_info_hooks_inner(int include_optional) { - get_ack_info_hooks_inner_t* get_ack_info_hooks_inner = NULL; - if (include_optional) { - get_ack_info_hooks_inner = get_ack_info_hooks_inner_create( - "gBGGeSaGViBfAgnlzOSHEwK9O6F", - "message", - "sent", - {"billable":true,"category":"business_initiated","pricing_model":"CBP"}, - "1654864094", - {"id":"c1f5a3a1b9ff6f2e1c43fd31543137e0","origin":{"type":"business_initiated"},"expiration_timestamp":1654943940}, - "556123122026" - ); - } else { - get_ack_info_hooks_inner = get_ack_info_hooks_inner_create( - "gBGGeSaGViBfAgnlzOSHEwK9O6F", - "message", - "sent", - {"billable":true,"category":"business_initiated","pricing_model":"CBP"}, - "1654864094", - {"id":"c1f5a3a1b9ff6f2e1c43fd31543137e0","origin":{"type":"business_initiated"},"expiration_timestamp":1654943940}, - "556123122026" - ); - } - - return get_ack_info_hooks_inner; -} - - -#ifdef get_ack_info_hooks_inner_MAIN - -void test_get_ack_info_hooks_inner(int include_optional) { - get_ack_info_hooks_inner_t* get_ack_info_hooks_inner_1 = instantiate_get_ack_info_hooks_inner(include_optional); - - cJSON* jsonget_ack_info_hooks_inner_1 = get_ack_info_hooks_inner_convertToJSON(get_ack_info_hooks_inner_1); - printf("get_ack_info_hooks_inner :\n%s\n", cJSON_Print(jsonget_ack_info_hooks_inner_1)); - get_ack_info_hooks_inner_t* get_ack_info_hooks_inner_2 = get_ack_info_hooks_inner_parseFromJSON(jsonget_ack_info_hooks_inner_1); - cJSON* jsonget_ack_info_hooks_inner_2 = get_ack_info_hooks_inner_convertToJSON(get_ack_info_hooks_inner_2); - printf("repeating get_ack_info_hooks_inner:\n%s\n", cJSON_Print(jsonget_ack_info_hooks_inner_2)); -} - -int main() { - test_get_ack_info_hooks_inner(1); - test_get_ack_info_hooks_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_ack_info_hooks_inner_MAIN -#endif // get_ack_info_hooks_inner_TEST diff --git a/c/unit-test/test_get_commerce.c b/c/unit-test/test_get_commerce.c deleted file mode 100644 index 15ac7c9..0000000 --- a/c/unit-test/test_get_commerce.c +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef get_commerce_TEST -#define get_commerce_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_commerce_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_commerce.h" -get_commerce_t* instantiate_get_commerce(int include_optional); - - - -get_commerce_t* instantiate_get_commerce(int include_optional) { - get_commerce_t* get_commerce = NULL; - if (include_optional) { - get_commerce = get_commerce_create( - ); - } else { - get_commerce = get_commerce_create( - ); - } - - return get_commerce; -} - - -#ifdef get_commerce_MAIN - -void test_get_commerce(int include_optional) { - get_commerce_t* get_commerce_1 = instantiate_get_commerce(include_optional); - - cJSON* jsonget_commerce_1 = get_commerce_convertToJSON(get_commerce_1); - printf("get_commerce :\n%s\n", cJSON_Print(jsonget_commerce_1)); - get_commerce_t* get_commerce_2 = get_commerce_parseFromJSON(jsonget_commerce_1); - cJSON* jsonget_commerce_2 = get_commerce_convertToJSON(get_commerce_2); - printf("repeating get_commerce:\n%s\n", cJSON_Print(jsonget_commerce_2)); -} - -int main() { - test_get_commerce(1); - test_get_commerce(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_commerce_MAIN -#endif // get_commerce_TEST diff --git a/c/unit-test/test_get_commerce_inner.c b/c/unit-test/test_get_commerce_inner.c deleted file mode 100644 index 6d4372d..0000000 --- a/c/unit-test/test_get_commerce_inner.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef get_commerce_inner_TEST -#define get_commerce_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_commerce_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_commerce_inner.h" -get_commerce_inner_t* instantiate_get_commerce_inner(int include_optional); - - - -get_commerce_inner_t* instantiate_get_commerce_inner(int include_optional) { - get_commerce_inner_t* get_commerce_inner = NULL; - if (include_optional) { - get_commerce_inner = get_commerce_inner_create( - "789887292550821", - true, - true - ); - } else { - get_commerce_inner = get_commerce_inner_create( - "789887292550821", - true, - true - ); - } - - return get_commerce_inner; -} - - -#ifdef get_commerce_inner_MAIN - -void test_get_commerce_inner(int include_optional) { - get_commerce_inner_t* get_commerce_inner_1 = instantiate_get_commerce_inner(include_optional); - - cJSON* jsonget_commerce_inner_1 = get_commerce_inner_convertToJSON(get_commerce_inner_1); - printf("get_commerce_inner :\n%s\n", cJSON_Print(jsonget_commerce_inner_1)); - get_commerce_inner_t* get_commerce_inner_2 = get_commerce_inner_parseFromJSON(jsonget_commerce_inner_1); - cJSON* jsonget_commerce_inner_2 = get_commerce_inner_convertToJSON(get_commerce_inner_2); - printf("repeating get_commerce_inner:\n%s\n", cJSON_Print(jsonget_commerce_inner_2)); -} - -int main() { - test_get_commerce_inner(1); - test_get_commerce_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_commerce_inner_MAIN -#endif // get_commerce_inner_TEST diff --git a/c/unit-test/test_get_ip.c b/c/unit-test/test_get_ip.c deleted file mode 100644 index a156896..0000000 --- a/c/unit-test/test_get_ip.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef get_ip_TEST -#define get_ip_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_ip_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_ip.h" -get_ip_t* instantiate_get_ip(int include_optional); - - - -get_ip_t* instantiate_get_ip(int include_optional) { - get_ip_t* get_ip = NULL; - if (include_optional) { - get_ip = get_ip_create( - "213.74.84.72" - ); - } else { - get_ip = get_ip_create( - "213.74.84.72" - ); - } - - return get_ip; -} - - -#ifdef get_ip_MAIN - -void test_get_ip(int include_optional) { - get_ip_t* get_ip_1 = instantiate_get_ip(include_optional); - - cJSON* jsonget_ip_1 = get_ip_convertToJSON(get_ip_1); - printf("get_ip :\n%s\n", cJSON_Print(jsonget_ip_1)); - get_ip_t* get_ip_2 = get_ip_parseFromJSON(jsonget_ip_1); - cJSON* jsonget_ip_2 = get_ip_convertToJSON(get_ip_2); - printf("repeating get_ip:\n%s\n", cJSON_Print(jsonget_ip_2)); -} - -int main() { - test_get_ip(1); - test_get_ip(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_ip_MAIN -#endif // get_ip_TEST diff --git a/c/unit-test/test_get_me.c b/c/unit-test/test_get_me.c deleted file mode 100644 index 597b2eb..0000000 --- a/c/unit-test/test_get_me.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef get_me_TEST -#define get_me_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_me_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_me.h" -get_me_t* instantiate_get_me(int include_optional); - - - -get_me_t* instantiate_get_me(int include_optional) { - get_me_t* get_me = NULL; - if (include_optional) { - get_me = get_me_create( - "Some about info", - "Neverland, Unexpected st.", - "Some company description", - "john@neverland.play", - "12020721369", - one_msg_waba_sdk_get_me_VERTICAL_"Other", - "https://pps.whatsapp.net/sample.jpg" - ); - } else { - get_me = get_me_create( - "Some about info", - "Neverland, Unexpected st.", - "Some company description", - "john@neverland.play", - "12020721369", - one_msg_waba_sdk_get_me_VERTICAL_"Other", - "https://pps.whatsapp.net/sample.jpg" - ); - } - - return get_me; -} - - -#ifdef get_me_MAIN - -void test_get_me(int include_optional) { - get_me_t* get_me_1 = instantiate_get_me(include_optional); - - cJSON* jsonget_me_1 = get_me_convertToJSON(get_me_1); - printf("get_me :\n%s\n", cJSON_Print(jsonget_me_1)); - get_me_t* get_me_2 = get_me_parseFromJSON(jsonget_me_1); - cJSON* jsonget_me_2 = get_me_convertToJSON(get_me_2); - printf("repeating get_me:\n%s\n", cJSON_Print(jsonget_me_2)); -} - -int main() { - test_get_me(1); - test_get_me(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_me_MAIN -#endif // get_me_TEST diff --git a/c/unit-test/test_get_me_401_response.c b/c/unit-test/test_get_me_401_response.c deleted file mode 100644 index d312efc..0000000 --- a/c/unit-test/test_get_me_401_response.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef get_me_401_response_TEST -#define get_me_401_response_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_me_401_response_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_me_401_response.h" -get_me_401_response_t* instantiate_get_me_401_response(int include_optional); - - - -get_me_401_response_t* instantiate_get_me_401_response(int include_optional) { - get_me_401_response_t* get_me_401_response = NULL; - if (include_optional) { - get_me_401_response = get_me_401_response_create( - "Wrong token "xxx7i1crxjxpkxxx" for channel "123". Please provide token as a GET parameter." - ); - } else { - get_me_401_response = get_me_401_response_create( - "Wrong token "xxx7i1crxjxpkxxx" for channel "123". Please provide token as a GET parameter." - ); - } - - return get_me_401_response; -} - - -#ifdef get_me_401_response_MAIN - -void test_get_me_401_response(int include_optional) { - get_me_401_response_t* get_me_401_response_1 = instantiate_get_me_401_response(include_optional); - - cJSON* jsonget_me_401_response_1 = get_me_401_response_convertToJSON(get_me_401_response_1); - printf("get_me_401_response :\n%s\n", cJSON_Print(jsonget_me_401_response_1)); - get_me_401_response_t* get_me_401_response_2 = get_me_401_response_parseFromJSON(jsonget_me_401_response_1); - cJSON* jsonget_me_401_response_2 = get_me_401_response_convertToJSON(get_me_401_response_2); - printf("repeating get_me_401_response:\n%s\n", cJSON_Print(jsonget_me_401_response_2)); -} - -int main() { - test_get_me_401_response(1); - test_get_me_401_response(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_me_401_response_MAIN -#endif // get_me_401_response_TEST diff --git a/c/unit-test/test_get_messages.c b/c/unit-test/test_get_messages.c deleted file mode 100644 index 64e3287..0000000 --- a/c/unit-test/test_get_messages.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef get_messages_TEST -#define get_messages_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_messages_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_messages.h" -get_messages_t* instantiate_get_messages(int include_optional); - - - -get_messages_t* instantiate_get_messages(int include_optional) { - get_messages_t* get_messages = NULL; - if (include_optional) { - get_messages = get_messages_create( - list_createList() - ); - } else { - get_messages = get_messages_create( - list_createList() - ); - } - - return get_messages; -} - - -#ifdef get_messages_MAIN - -void test_get_messages(int include_optional) { - get_messages_t* get_messages_1 = instantiate_get_messages(include_optional); - - cJSON* jsonget_messages_1 = get_messages_convertToJSON(get_messages_1); - printf("get_messages :\n%s\n", cJSON_Print(jsonget_messages_1)); - get_messages_t* get_messages_2 = get_messages_parseFromJSON(jsonget_messages_1); - cJSON* jsonget_messages_2 = get_messages_convertToJSON(get_messages_2); - printf("repeating get_messages:\n%s\n", cJSON_Print(jsonget_messages_2)); -} - -int main() { - test_get_messages(1); - test_get_messages(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_messages_MAIN -#endif // get_messages_TEST diff --git a/c/unit-test/test_get_messages_messages_inner.c b/c/unit-test/test_get_messages_messages_inner.c deleted file mode 100644 index a55e3c3..0000000 --- a/c/unit-test/test_get_messages_messages_inner.c +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef get_messages_messages_inner_TEST -#define get_messages_messages_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_messages_messages_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_messages_messages_inner.h" -get_messages_messages_inner_t* instantiate_get_messages_messages_inner(int include_optional); - - - -get_messages_messages_inner_t* instantiate_get_messages_messages_inner(int include_optional) { - get_messages_messages_inner_t* get_messages_messages_inner = NULL; - if (include_optional) { - get_messages_messages_inner = get_messages_messages_inner_create( - 1, - "0XzkmGNn4prUAQlzsHApGNRXQ0U", - "Test message", - true, - 1, - 0, - "556123122026@c.us", - 1665396610, - "556123122026@c.us", - "chat", - "780005553535@c.us", - "0", - "0", - {}, - "556123122026" - ); - } else { - get_messages_messages_inner = get_messages_messages_inner_create( - 1, - "0XzkmGNn4prUAQlzsHApGNRXQ0U", - "Test message", - true, - 1, - 0, - "556123122026@c.us", - 1665396610, - "556123122026@c.us", - "chat", - "780005553535@c.us", - "0", - "0", - {}, - "556123122026" - ); - } - - return get_messages_messages_inner; -} - - -#ifdef get_messages_messages_inner_MAIN - -void test_get_messages_messages_inner(int include_optional) { - get_messages_messages_inner_t* get_messages_messages_inner_1 = instantiate_get_messages_messages_inner(include_optional); - - cJSON* jsonget_messages_messages_inner_1 = get_messages_messages_inner_convertToJSON(get_messages_messages_inner_1); - printf("get_messages_messages_inner :\n%s\n", cJSON_Print(jsonget_messages_messages_inner_1)); - get_messages_messages_inner_t* get_messages_messages_inner_2 = get_messages_messages_inner_parseFromJSON(jsonget_messages_messages_inner_1); - cJSON* jsonget_messages_messages_inner_2 = get_messages_messages_inner_convertToJSON(get_messages_messages_inner_2); - printf("repeating get_messages_messages_inner:\n%s\n", cJSON_Print(jsonget_messages_messages_inner_2)); -} - -int main() { - test_get_messages_messages_inner(1); - test_get_messages_messages_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_messages_messages_inner_MAIN -#endif // get_messages_messages_inner_TEST diff --git a/c/unit-test/test_get_templates.c b/c/unit-test/test_get_templates.c deleted file mode 100644 index 95cfea0..0000000 --- a/c/unit-test/test_get_templates.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef get_templates_TEST -#define get_templates_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_templates_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_templates.h" -get_templates_t* instantiate_get_templates(int include_optional); - - - -get_templates_t* instantiate_get_templates(int include_optional) { - get_templates_t* get_templates = NULL; - if (include_optional) { - get_templates = get_templates_create( - 3, - list_createList() - ); - } else { - get_templates = get_templates_create( - 3, - list_createList() - ); - } - - return get_templates; -} - - -#ifdef get_templates_MAIN - -void test_get_templates(int include_optional) { - get_templates_t* get_templates_1 = instantiate_get_templates(include_optional); - - cJSON* jsonget_templates_1 = get_templates_convertToJSON(get_templates_1); - printf("get_templates :\n%s\n", cJSON_Print(jsonget_templates_1)); - get_templates_t* get_templates_2 = get_templates_parseFromJSON(jsonget_templates_1); - cJSON* jsonget_templates_2 = get_templates_convertToJSON(get_templates_2); - printf("repeating get_templates:\n%s\n", cJSON_Print(jsonget_templates_2)); -} - -int main() { - test_get_templates(1); - test_get_templates(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_templates_MAIN -#endif // get_templates_TEST diff --git a/c/unit-test/test_get_templates_templates_inner.c b/c/unit-test/test_get_templates_templates_inner.c deleted file mode 100644 index 17838c9..0000000 --- a/c/unit-test/test_get_templates_templates_inner.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef get_templates_templates_inner_TEST -#define get_templates_templates_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define get_templates_templates_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/get_templates_templates_inner.h" -get_templates_templates_inner_t* instantiate_get_templates_templates_inner(int include_optional); - - - -get_templates_templates_inner_t* instantiate_get_templates_templates_inner(int include_optional) { - get_templates_templates_inner_t* get_templates_templates_inner = NULL; - if (include_optional) { - get_templates_templates_inner = get_templates_templates_inner_create( - one_msg_waba_sdk_get_templates_templates_inner__"MARKETING", - list_createList(), - one_msg_waba_sdk_get_templates_templates_inner__"en", - "start", - "ca300906_cfbc_410b_99fb_dcee8e13d578", - "NONE", - "approved" - ); - } else { - get_templates_templates_inner = get_templates_templates_inner_create( - one_msg_waba_sdk_get_templates_templates_inner__"MARKETING", - list_createList(), - one_msg_waba_sdk_get_templates_templates_inner__"en", - "start", - "ca300906_cfbc_410b_99fb_dcee8e13d578", - "NONE", - "approved" - ); - } - - return get_templates_templates_inner; -} - - -#ifdef get_templates_templates_inner_MAIN - -void test_get_templates_templates_inner(int include_optional) { - get_templates_templates_inner_t* get_templates_templates_inner_1 = instantiate_get_templates_templates_inner(include_optional); - - cJSON* jsonget_templates_templates_inner_1 = get_templates_templates_inner_convertToJSON(get_templates_templates_inner_1); - printf("get_templates_templates_inner :\n%s\n", cJSON_Print(jsonget_templates_templates_inner_1)); - get_templates_templates_inner_t* get_templates_templates_inner_2 = get_templates_templates_inner_parseFromJSON(jsonget_templates_templates_inner_1); - cJSON* jsonget_templates_templates_inner_2 = get_templates_templates_inner_convertToJSON(get_templates_templates_inner_2); - printf("repeating get_templates_templates_inner:\n%s\n", cJSON_Print(jsonget_templates_templates_inner_2)); -} - -int main() { - test_get_templates_templates_inner(1); - test_get_templates_templates_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // get_templates_templates_inner_MAIN -#endif // get_templates_templates_inner_TEST diff --git a/c/unit-test/test_me_components.c b/c/unit-test/test_me_components.c deleted file mode 100644 index 079d6a8..0000000 --- a/c/unit-test/test_me_components.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef me_components_TEST -#define me_components_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define me_components_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/me_components.h" -me_components_t* instantiate_me_components(int include_optional); - - - -me_components_t* instantiate_me_components(int include_optional) { - me_components_t* me_components = NULL; - if (include_optional) { - me_components = me_components_create( - "Some about info", - "Neverland, Unexpected st.", - "Some company description", - "john@neverland.play", - "12020721369", - one_msg_waba_sdk_me_components_VERTICAL_"Other", - "0" - ); - } else { - me_components = me_components_create( - "Some about info", - "Neverland, Unexpected st.", - "Some company description", - "john@neverland.play", - "12020721369", - one_msg_waba_sdk_me_components_VERTICAL_"Other", - "0" - ); - } - - return me_components; -} - - -#ifdef me_components_MAIN - -void test_me_components(int include_optional) { - me_components_t* me_components_1 = instantiate_me_components(include_optional); - - cJSON* jsonme_components_1 = me_components_convertToJSON(me_components_1); - printf("me_components :\n%s\n", cJSON_Print(jsonme_components_1)); - me_components_t* me_components_2 = me_components_parseFromJSON(jsonme_components_1); - cJSON* jsonme_components_2 = me_components_convertToJSON(me_components_2); - printf("repeating me_components:\n%s\n", cJSON_Print(jsonme_components_2)); -} - -int main() { - test_me_components(1); - test_me_components(0); - - printf("Hello world \n"); - return 0; -} - -#endif // me_components_MAIN -#endif // me_components_TEST diff --git a/c/unit-test/test_media_id.c b/c/unit-test/test_media_id.c deleted file mode 100644 index 99503d6..0000000 --- a/c/unit-test/test_media_id.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef media_id_TEST -#define media_id_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define media_id_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/media_id.h" -media_id_t* instantiate_media_id(int include_optional); - - - -media_id_t* instantiate_media_id(int include_optional) { - media_id_t* media_id = NULL; - if (include_optional) { - media_id = media_id_create( - "ed2c7be7-b779-4ba8-a17c-6722f37be2a7" - ); - } else { - media_id = media_id_create( - "ed2c7be7-b779-4ba8-a17c-6722f37be2a7" - ); - } - - return media_id; -} - - -#ifdef media_id_MAIN - -void test_media_id(int include_optional) { - media_id_t* media_id_1 = instantiate_media_id(include_optional); - - cJSON* jsonmedia_id_1 = media_id_convertToJSON(media_id_1); - printf("media_id :\n%s\n", cJSON_Print(jsonmedia_id_1)); - media_id_t* media_id_2 = media_id_parseFromJSON(jsonmedia_id_1); - cJSON* jsonmedia_id_2 = media_id_convertToJSON(media_id_2); - printf("repeating media_id:\n%s\n", cJSON_Print(jsonmedia_id_2)); -} - -int main() { - test_media_id(1); - test_media_id(0); - - printf("Hello world \n"); - return 0; -} - -#endif // media_id_MAIN -#endif // media_id_TEST diff --git a/c/unit-test/test_message.c b/c/unit-test/test_message.c deleted file mode 100644 index f3e4482..0000000 --- a/c/unit-test/test_message.c +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef message_TEST -#define message_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define message_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/message.h" -message_t* instantiate_message(int include_optional); - - - -message_t* instantiate_message(int include_optional) { - message_t* message = NULL; - if (include_optional) { - message = message_create( - "ABGHYoIXMAmY13IKOick9az6QYmt4R", - "Ok!", - true, - 0, - false, - "12020721369@c.us", - 1665396610, - "12020721369@c.us", - one_msg_waba_sdk_message_TYPE_"chat", - "John", - "photo.jpg", - "ABGHYoIXMAmYTwIKOick9az6QYmt4R" - ); - } else { - message = message_create( - "ABGHYoIXMAmY13IKOick9az6QYmt4R", - "Ok!", - true, - 0, - false, - "12020721369@c.us", - 1665396610, - "12020721369@c.us", - one_msg_waba_sdk_message_TYPE_"chat", - "John", - "photo.jpg", - "ABGHYoIXMAmYTwIKOick9az6QYmt4R" - ); - } - - return message; -} - - -#ifdef message_MAIN - -void test_message(int include_optional) { - message_t* message_1 = instantiate_message(include_optional); - - cJSON* jsonmessage_1 = message_convertToJSON(message_1); - printf("message :\n%s\n", cJSON_Print(jsonmessage_1)); - message_t* message_2 = message_parseFromJSON(jsonmessage_1); - cJSON* jsonmessage_2 = message_convertToJSON(message_2); - printf("repeating message:\n%s\n", cJSON_Print(jsonmessage_2)); -} - -int main() { - test_message(1); - test_message(0); - - printf("Hello world \n"); - return 0; -} - -#endif // message_MAIN -#endif // message_TEST diff --git a/c/unit-test/test_message_id_prop.c b/c/unit-test/test_message_id_prop.c deleted file mode 100644 index 1beb879..0000000 --- a/c/unit-test/test_message_id_prop.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef message_id_prop_TEST -#define message_id_prop_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define message_id_prop_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/message_id_prop.h" -message_id_prop_t* instantiate_message_id_prop(int include_optional); - - - -message_id_prop_t* instantiate_message_id_prop(int include_optional) { - message_id_prop_t* message_id_prop = NULL; - if (include_optional) { - message_id_prop = message_id_prop_create( - "0XzkmGNn4prUAQlzsHApGNRXQ0U" - ); - } else { - message_id_prop = message_id_prop_create( - "0XzkmGNn4prUAQlzsHApGNRXQ0U" - ); - } - - return message_id_prop; -} - - -#ifdef message_id_prop_MAIN - -void test_message_id_prop(int include_optional) { - message_id_prop_t* message_id_prop_1 = instantiate_message_id_prop(include_optional); - - cJSON* jsonmessage_id_prop_1 = message_id_prop_convertToJSON(message_id_prop_1); - printf("message_id_prop :\n%s\n", cJSON_Print(jsonmessage_id_prop_1)); - message_id_prop_t* message_id_prop_2 = message_id_prop_parseFromJSON(jsonmessage_id_prop_1); - cJSON* jsonmessage_id_prop_2 = message_id_prop_convertToJSON(message_id_prop_2); - printf("repeating message_id_prop:\n%s\n", cJSON_Print(jsonmessage_id_prop_2)); -} - -int main() { - test_message_id_prop(1); - test_message_id_prop(0); - - printf("Hello world \n"); - return 0; -} - -#endif // message_id_prop_MAIN -#endif // message_id_prop_TEST diff --git a/c/unit-test/test_phone_prop.c b/c/unit-test/test_phone_prop.c deleted file mode 100644 index 1f946cc..0000000 --- a/c/unit-test/test_phone_prop.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef phone_prop_TEST -#define phone_prop_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define phone_prop_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/phone_prop.h" -phone_prop_t* instantiate_phone_prop(int include_optional); - - - -phone_prop_t* instantiate_phone_prop(int include_optional) { - phone_prop_t* phone_prop = NULL; - if (include_optional) { - phone_prop = phone_prop_create( - 12020721369 - ); - } else { - phone_prop = phone_prop_create( - 12020721369 - ); - } - - return phone_prop; -} - - -#ifdef phone_prop_MAIN - -void test_phone_prop(int include_optional) { - phone_prop_t* phone_prop_1 = instantiate_phone_prop(include_optional); - - cJSON* jsonphone_prop_1 = phone_prop_convertToJSON(phone_prop_1); - printf("phone_prop :\n%s\n", cJSON_Print(jsonphone_prop_1)); - phone_prop_t* phone_prop_2 = phone_prop_parseFromJSON(jsonphone_prop_1); - cJSON* jsonphone_prop_2 = phone_prop_convertToJSON(phone_prop_2); - printf("repeating phone_prop:\n%s\n", cJSON_Print(jsonphone_prop_2)); -} - -int main() { - test_phone_prop(1); - test_phone_prop(0); - - printf("Hello world \n"); - return 0; -} - -#endif // phone_prop_MAIN -#endif // phone_prop_TEST diff --git a/c/unit-test/test_read_message_request.c b/c/unit-test/test_read_message_request.c deleted file mode 100644 index 44ba097..0000000 --- a/c/unit-test/test_read_message_request.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef read_message_request_TEST -#define read_message_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define read_message_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/read_message_request.h" -read_message_request_t* instantiate_read_message_request(int include_optional); - - - -read_message_request_t* instantiate_read_message_request(int include_optional) { - read_message_request_t* read_message_request = NULL; - if (include_optional) { - read_message_request = read_message_request_create( - "0XzkmGNn4prUAQlzsHApGNRXQ0U" - ); - } else { - read_message_request = read_message_request_create( - "0XzkmGNn4prUAQlzsHApGNRXQ0U" - ); - } - - return read_message_request; -} - - -#ifdef read_message_request_MAIN - -void test_read_message_request(int include_optional) { - read_message_request_t* read_message_request_1 = instantiate_read_message_request(include_optional); - - cJSON* jsonread_message_request_1 = read_message_request_convertToJSON(read_message_request_1); - printf("read_message_request :\n%s\n", cJSON_Print(jsonread_message_request_1)); - read_message_request_t* read_message_request_2 = read_message_request_parseFromJSON(jsonread_message_request_1); - cJSON* jsonread_message_request_2 = read_message_request_convertToJSON(read_message_request_2); - printf("repeating read_message_request:\n%s\n", cJSON_Print(jsonread_message_request_2)); -} - -int main() { - test_read_message_request(1); - test_read_message_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // read_message_request_MAIN -#endif // read_message_request_TEST diff --git a/c/unit-test/test_remove_template_request.c b/c/unit-test/test_remove_template_request.c deleted file mode 100644 index 5eff78c..0000000 --- a/c/unit-test/test_remove_template_request.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef remove_template_request_TEST -#define remove_template_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define remove_template_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/remove_template_request.h" -remove_template_request_t* instantiate_remove_template_request(int include_optional); - - - -remove_template_request_t* instantiate_remove_template_request(int include_optional) { - remove_template_request_t* remove_template_request = NULL; - if (include_optional) { - remove_template_request = remove_template_request_create( - "start" - ); - } else { - remove_template_request = remove_template_request_create( - "start" - ); - } - - return remove_template_request; -} - - -#ifdef remove_template_request_MAIN - -void test_remove_template_request(int include_optional) { - remove_template_request_t* remove_template_request_1 = instantiate_remove_template_request(include_optional); - - cJSON* jsonremove_template_request_1 = remove_template_request_convertToJSON(remove_template_request_1); - printf("remove_template_request :\n%s\n", cJSON_Print(jsonremove_template_request_1)); - remove_template_request_t* remove_template_request_2 = remove_template_request_parseFromJSON(jsonremove_template_request_1); - cJSON* jsonremove_template_request_2 = remove_template_request_convertToJSON(remove_template_request_2); - printf("repeating remove_template_request:\n%s\n", cJSON_Print(jsonremove_template_request_2)); -} - -int main() { - test_remove_template_request(1); - test_remove_template_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // remove_template_request_MAIN -#endif // remove_template_request_TEST diff --git a/c/unit-test/test_send_contact_request.c b/c/unit-test/test_send_contact_request.c deleted file mode 100644 index b67cab6..0000000 --- a/c/unit-test/test_send_contact_request.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef send_contact_request_TEST -#define send_contact_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_contact_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_contact_request.h" -send_contact_request_t* instantiate_send_contact_request(int include_optional); - - - -send_contact_request_t* instantiate_send_contact_request(int include_optional) { - send_contact_request_t* send_contact_request = NULL; - if (include_optional) { - send_contact_request = send_contact_request_create( - "12020721369@c.us", - 12020721369, - [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - ); - } else { - send_contact_request = send_contact_request_create( - "12020721369@c.us", - 12020721369, - [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - ); - } - - return send_contact_request; -} - - -#ifdef send_contact_request_MAIN - -void test_send_contact_request(int include_optional) { - send_contact_request_t* send_contact_request_1 = instantiate_send_contact_request(include_optional); - - cJSON* jsonsend_contact_request_1 = send_contact_request_convertToJSON(send_contact_request_1); - printf("send_contact_request :\n%s\n", cJSON_Print(jsonsend_contact_request_1)); - send_contact_request_t* send_contact_request_2 = send_contact_request_parseFromJSON(jsonsend_contact_request_1); - cJSON* jsonsend_contact_request_2 = send_contact_request_convertToJSON(send_contact_request_2); - printf("repeating send_contact_request:\n%s\n", cJSON_Print(jsonsend_contact_request_2)); -} - -int main() { - test_send_contact_request(1); - test_send_contact_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_contact_request_MAIN -#endif // send_contact_request_TEST diff --git a/c/unit-test/test_send_file_request.c b/c/unit-test/test_send_file_request.c deleted file mode 100644 index e6d6237..0000000 --- a/c/unit-test/test_send_file_request.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef send_file_request_TEST -#define send_file_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_file_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_file_request.h" -send_file_request_t* instantiate_send_file_request(int include_optional); - - - -send_file_request_t* instantiate_send_file_request(int include_optional) { - send_file_request_t* send_file_request = NULL; - if (include_optional) { - send_file_request = send_file_request_create( - "12020721369@c.us", - 12020721369, - "0", - "0", - "0" - ); - } else { - send_file_request = send_file_request_create( - "12020721369@c.us", - 12020721369, - "0", - "0", - "0" - ); - } - - return send_file_request; -} - - -#ifdef send_file_request_MAIN - -void test_send_file_request(int include_optional) { - send_file_request_t* send_file_request_1 = instantiate_send_file_request(include_optional); - - cJSON* jsonsend_file_request_1 = send_file_request_convertToJSON(send_file_request_1); - printf("send_file_request :\n%s\n", cJSON_Print(jsonsend_file_request_1)); - send_file_request_t* send_file_request_2 = send_file_request_parseFromJSON(jsonsend_file_request_1); - cJSON* jsonsend_file_request_2 = send_file_request_convertToJSON(send_file_request_2); - printf("repeating send_file_request:\n%s\n", cJSON_Print(jsonsend_file_request_2)); -} - -int main() { - test_send_file_request(1); - test_send_file_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_file_request_MAIN -#endif // send_file_request_TEST diff --git a/c/unit-test/test_send_list_request.c b/c/unit-test/test_send_list_request.c deleted file mode 100644 index e3c1f4b..0000000 --- a/c/unit-test/test_send_list_request.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef send_list_request_TEST -#define send_list_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_list_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_list_request.h" -send_list_request_t* instantiate_send_list_request(int include_optional); - - - -send_list_request_t* instantiate_send_list_request(int include_optional) { - send_list_request_t* send_list_request = NULL; - if (include_optional) { - send_list_request = send_list_request_create( - "12020721369@c.us", - 12020721369, - "Please choose option", - "Some options", - "Thank you", - "List", - [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - ); - } else { - send_list_request = send_list_request_create( - "12020721369@c.us", - 12020721369, - "Please choose option", - "Some options", - "Thank you", - "List", - [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - ); - } - - return send_list_request; -} - - -#ifdef send_list_request_MAIN - -void test_send_list_request(int include_optional) { - send_list_request_t* send_list_request_1 = instantiate_send_list_request(include_optional); - - cJSON* jsonsend_list_request_1 = send_list_request_convertToJSON(send_list_request_1); - printf("send_list_request :\n%s\n", cJSON_Print(jsonsend_list_request_1)); - send_list_request_t* send_list_request_2 = send_list_request_parseFromJSON(jsonsend_list_request_1); - cJSON* jsonsend_list_request_2 = send_list_request_convertToJSON(send_list_request_2); - printf("repeating send_list_request:\n%s\n", cJSON_Print(jsonsend_list_request_2)); -} - -int main() { - test_send_list_request(1); - test_send_list_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_list_request_MAIN -#endif // send_list_request_TEST diff --git a/c/unit-test/test_send_list_request_all_of_rows.c b/c/unit-test/test_send_list_request_all_of_rows.c deleted file mode 100644 index eee7eab..0000000 --- a/c/unit-test/test_send_list_request_all_of_rows.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef send_list_request_all_of_rows_TEST -#define send_list_request_all_of_rows_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_list_request_all_of_rows_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_list_request_all_of_rows.h" -send_list_request_all_of_rows_t* instantiate_send_list_request_all_of_rows(int include_optional); - - - -send_list_request_all_of_rows_t* instantiate_send_list_request_all_of_rows(int include_optional) { - send_list_request_all_of_rows_t* send_list_request_all_of_rows = NULL; - if (include_optional) { - send_list_request_all_of_rows = send_list_request_all_of_rows_create( - "1", - "Some option", - "Some description" - ); - } else { - send_list_request_all_of_rows = send_list_request_all_of_rows_create( - "1", - "Some option", - "Some description" - ); - } - - return send_list_request_all_of_rows; -} - - -#ifdef send_list_request_all_of_rows_MAIN - -void test_send_list_request_all_of_rows(int include_optional) { - send_list_request_all_of_rows_t* send_list_request_all_of_rows_1 = instantiate_send_list_request_all_of_rows(include_optional); - - cJSON* jsonsend_list_request_all_of_rows_1 = send_list_request_all_of_rows_convertToJSON(send_list_request_all_of_rows_1); - printf("send_list_request_all_of_rows :\n%s\n", cJSON_Print(jsonsend_list_request_all_of_rows_1)); - send_list_request_all_of_rows_t* send_list_request_all_of_rows_2 = send_list_request_all_of_rows_parseFromJSON(jsonsend_list_request_all_of_rows_1); - cJSON* jsonsend_list_request_all_of_rows_2 = send_list_request_all_of_rows_convertToJSON(send_list_request_all_of_rows_2); - printf("repeating send_list_request_all_of_rows:\n%s\n", cJSON_Print(jsonsend_list_request_all_of_rows_2)); -} - -int main() { - test_send_list_request_all_of_rows(1); - test_send_list_request_all_of_rows(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_list_request_all_of_rows_MAIN -#endif // send_list_request_all_of_rows_TEST diff --git a/c/unit-test/test_send_list_request_all_of_sections.c b/c/unit-test/test_send_list_request_all_of_sections.c deleted file mode 100644 index 38b2cb0..0000000 --- a/c/unit-test/test_send_list_request_all_of_sections.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef send_list_request_all_of_sections_TEST -#define send_list_request_all_of_sections_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_list_request_all_of_sections_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_list_request_all_of_sections.h" -send_list_request_all_of_sections_t* instantiate_send_list_request_all_of_sections(int include_optional); - - - -send_list_request_all_of_sections_t* instantiate_send_list_request_all_of_sections(int include_optional) { - send_list_request_all_of_sections_t* send_list_request_all_of_sections = NULL; - if (include_optional) { - send_list_request_all_of_sections = send_list_request_all_of_sections_create( - "Some title", - list_createList() - ); - } else { - send_list_request_all_of_sections = send_list_request_all_of_sections_create( - "Some title", - list_createList() - ); - } - - return send_list_request_all_of_sections; -} - - -#ifdef send_list_request_all_of_sections_MAIN - -void test_send_list_request_all_of_sections(int include_optional) { - send_list_request_all_of_sections_t* send_list_request_all_of_sections_1 = instantiate_send_list_request_all_of_sections(include_optional); - - cJSON* jsonsend_list_request_all_of_sections_1 = send_list_request_all_of_sections_convertToJSON(send_list_request_all_of_sections_1); - printf("send_list_request_all_of_sections :\n%s\n", cJSON_Print(jsonsend_list_request_all_of_sections_1)); - send_list_request_all_of_sections_t* send_list_request_all_of_sections_2 = send_list_request_all_of_sections_parseFromJSON(jsonsend_list_request_all_of_sections_1); - cJSON* jsonsend_list_request_all_of_sections_2 = send_list_request_all_of_sections_convertToJSON(send_list_request_all_of_sections_2); - printf("repeating send_list_request_all_of_sections:\n%s\n", cJSON_Print(jsonsend_list_request_all_of_sections_2)); -} - -int main() { - test_send_list_request_all_of_sections(1); - test_send_list_request_all_of_sections(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_list_request_all_of_sections_MAIN -#endif // send_list_request_all_of_sections_TEST diff --git a/c/unit-test/test_send_location_request.c b/c/unit-test/test_send_location_request.c deleted file mode 100644 index b3b824b..0000000 --- a/c/unit-test/test_send_location_request.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef send_location_request_TEST -#define send_location_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_location_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_location_request.h" -send_location_request_t* instantiate_send_location_request(int include_optional); - - - -send_location_request_t* instantiate_send_location_request(int include_optional) { - send_location_request_t* send_location_request = NULL; - if (include_optional) { - send_location_request = send_location_request_create( - "12020721369@c.us", - 12020721369, - "45.018337", - "-73.968285", - "9766 Valley View St., New York, NY 10024", - "Facebook HQ" - ); - } else { - send_location_request = send_location_request_create( - "12020721369@c.us", - 12020721369, - "45.018337", - "-73.968285", - "9766 Valley View St., New York, NY 10024", - "Facebook HQ" - ); - } - - return send_location_request; -} - - -#ifdef send_location_request_MAIN - -void test_send_location_request(int include_optional) { - send_location_request_t* send_location_request_1 = instantiate_send_location_request(include_optional); - - cJSON* jsonsend_location_request_1 = send_location_request_convertToJSON(send_location_request_1); - printf("send_location_request :\n%s\n", cJSON_Print(jsonsend_location_request_1)); - send_location_request_t* send_location_request_2 = send_location_request_parseFromJSON(jsonsend_location_request_1); - cJSON* jsonsend_location_request_2 = send_location_request_convertToJSON(send_location_request_2); - printf("repeating send_location_request:\n%s\n", cJSON_Print(jsonsend_location_request_2)); -} - -int main() { - test_send_location_request(1); - test_send_location_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_location_request_MAIN -#endif // send_location_request_TEST diff --git a/c/unit-test/test_send_message_request.c b/c/unit-test/test_send_message_request.c deleted file mode 100644 index 308cdf0..0000000 --- a/c/unit-test/test_send_message_request.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef send_message_request_TEST -#define send_message_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_message_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_message_request.h" -send_message_request_t* instantiate_send_message_request(int include_optional); - - - -send_message_request_t* instantiate_send_message_request(int include_optional) { - send_message_request_t* send_message_request = NULL; - if (include_optional) { - send_message_request = send_message_request_create( - "12020721369@c.us", - 12020721369, - "0" - ); - } else { - send_message_request = send_message_request_create( - "12020721369@c.us", - 12020721369, - "0" - ); - } - - return send_message_request; -} - - -#ifdef send_message_request_MAIN - -void test_send_message_request(int include_optional) { - send_message_request_t* send_message_request_1 = instantiate_send_message_request(include_optional); - - cJSON* jsonsend_message_request_1 = send_message_request_convertToJSON(send_message_request_1); - printf("send_message_request :\n%s\n", cJSON_Print(jsonsend_message_request_1)); - send_message_request_t* send_message_request_2 = send_message_request_parseFromJSON(jsonsend_message_request_1); - cJSON* jsonsend_message_request_2 = send_message_request_convertToJSON(send_message_request_2); - printf("repeating send_message_request:\n%s\n", cJSON_Print(jsonsend_message_request_2)); -} - -int main() { - test_send_message_request(1); - test_send_message_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_message_request_MAIN -#endif // send_message_request_TEST diff --git a/c/unit-test/test_send_message_status.c b/c/unit-test/test_send_message_status.c deleted file mode 100644 index 706fce0..0000000 --- a/c/unit-test/test_send_message_status.c +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef send_message_status_TEST -#define send_message_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_message_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_message_status.h" -send_message_status_t* instantiate_send_message_status(int include_optional); - - - -send_message_status_t* instantiate_send_message_status(int include_optional) { - send_message_status_t* send_message_status = NULL; - if (include_optional) { - send_message_status = send_message_status_create( - true, - "gBGGeRhGZTEfAgkJCh2wAz4ZH-8", - "Sent to 556123122026@c.us", - "Message has been sent to the provider" - ); - } else { - send_message_status = send_message_status_create( - true, - "gBGGeRhGZTEfAgkJCh2wAz4ZH-8", - "Sent to 556123122026@c.us", - "Message has been sent to the provider" - ); - } - - return send_message_status; -} - - -#ifdef send_message_status_MAIN - -void test_send_message_status(int include_optional) { - send_message_status_t* send_message_status_1 = instantiate_send_message_status(include_optional); - - cJSON* jsonsend_message_status_1 = send_message_status_convertToJSON(send_message_status_1); - printf("send_message_status :\n%s\n", cJSON_Print(jsonsend_message_status_1)); - send_message_status_t* send_message_status_2 = send_message_status_parseFromJSON(jsonsend_message_status_1); - cJSON* jsonsend_message_status_2 = send_message_status_convertToJSON(send_message_status_2); - printf("repeating send_message_status:\n%s\n", cJSON_Print(jsonsend_message_status_2)); -} - -int main() { - test_send_message_status(1); - test_send_message_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_message_status_MAIN -#endif // send_message_status_TEST diff --git a/c/unit-test/test_send_product_request.c b/c/unit-test/test_send_product_request.c deleted file mode 100644 index 792c8c5..0000000 --- a/c/unit-test/test_send_product_request.c +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef send_product_request_TEST -#define send_product_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_product_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_product_request.h" -send_product_request_t* instantiate_send_product_request(int include_optional); - -#include "test_send_product_request_all_of_action.c" - - -send_product_request_t* instantiate_send_product_request(int include_optional) { - send_product_request_t* send_product_request = NULL; - if (include_optional) { - send_product_request = send_product_request_create( - "12020721369@c.us", - 12020721369, - {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]}, - "Some text", - "Footer", - "Header" - ); - } else { - send_product_request = send_product_request_create( - "12020721369@c.us", - 12020721369, - {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]}, - "Some text", - "Footer", - "Header" - ); - } - - return send_product_request; -} - - -#ifdef send_product_request_MAIN - -void test_send_product_request(int include_optional) { - send_product_request_t* send_product_request_1 = instantiate_send_product_request(include_optional); - - cJSON* jsonsend_product_request_1 = send_product_request_convertToJSON(send_product_request_1); - printf("send_product_request :\n%s\n", cJSON_Print(jsonsend_product_request_1)); - send_product_request_t* send_product_request_2 = send_product_request_parseFromJSON(jsonsend_product_request_1); - cJSON* jsonsend_product_request_2 = send_product_request_convertToJSON(send_product_request_2); - printf("repeating send_product_request:\n%s\n", cJSON_Print(jsonsend_product_request_2)); -} - -int main() { - test_send_product_request(1); - test_send_product_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_product_request_MAIN -#endif // send_product_request_TEST diff --git a/c/unit-test/test_send_product_request_all_of_action.c b/c/unit-test/test_send_product_request_all_of_action.c deleted file mode 100644 index 3665681..0000000 --- a/c/unit-test/test_send_product_request_all_of_action.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef send_product_request_all_of_action_TEST -#define send_product_request_all_of_action_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_product_request_all_of_action_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_product_request_all_of_action.h" -send_product_request_all_of_action_t* instantiate_send_product_request_all_of_action(int include_optional); - - - -send_product_request_all_of_action_t* instantiate_send_product_request_all_of_action(int include_optional) { - send_product_request_all_of_action_t* send_product_request_all_of_action = NULL; - if (include_optional) { - send_product_request_all_of_action = send_product_request_all_of_action_create( - "407921857496983", - "product-1", - list_createList() - ); - } else { - send_product_request_all_of_action = send_product_request_all_of_action_create( - "407921857496983", - "product-1", - list_createList() - ); - } - - return send_product_request_all_of_action; -} - - -#ifdef send_product_request_all_of_action_MAIN - -void test_send_product_request_all_of_action(int include_optional) { - send_product_request_all_of_action_t* send_product_request_all_of_action_1 = instantiate_send_product_request_all_of_action(include_optional); - - cJSON* jsonsend_product_request_all_of_action_1 = send_product_request_all_of_action_convertToJSON(send_product_request_all_of_action_1); - printf("send_product_request_all_of_action :\n%s\n", cJSON_Print(jsonsend_product_request_all_of_action_1)); - send_product_request_all_of_action_t* send_product_request_all_of_action_2 = send_product_request_all_of_action_parseFromJSON(jsonsend_product_request_all_of_action_1); - cJSON* jsonsend_product_request_all_of_action_2 = send_product_request_all_of_action_convertToJSON(send_product_request_all_of_action_2); - printf("repeating send_product_request_all_of_action:\n%s\n", cJSON_Print(jsonsend_product_request_all_of_action_2)); -} - -int main() { - test_send_product_request_all_of_action(1); - test_send_product_request_all_of_action(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_product_request_all_of_action_MAIN -#endif // send_product_request_all_of_action_TEST diff --git a/c/unit-test/test_send_product_request_all_of_action_product_items.c b/c/unit-test/test_send_product_request_all_of_action_product_items.c deleted file mode 100644 index 61e4d59..0000000 --- a/c/unit-test/test_send_product_request_all_of_action_product_items.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef send_product_request_all_of_action_product_items_TEST -#define send_product_request_all_of_action_product_items_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_product_request_all_of_action_product_items_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_product_request_all_of_action_product_items.h" -send_product_request_all_of_action_product_items_t* instantiate_send_product_request_all_of_action_product_items(int include_optional); - - - -send_product_request_all_of_action_product_items_t* instantiate_send_product_request_all_of_action_product_items(int include_optional) { - send_product_request_all_of_action_product_items_t* send_product_request_all_of_action_product_items = NULL; - if (include_optional) { - send_product_request_all_of_action_product_items = send_product_request_all_of_action_product_items_create( - "product-1" - ); - } else { - send_product_request_all_of_action_product_items = send_product_request_all_of_action_product_items_create( - "product-1" - ); - } - - return send_product_request_all_of_action_product_items; -} - - -#ifdef send_product_request_all_of_action_product_items_MAIN - -void test_send_product_request_all_of_action_product_items(int include_optional) { - send_product_request_all_of_action_product_items_t* send_product_request_all_of_action_product_items_1 = instantiate_send_product_request_all_of_action_product_items(include_optional); - - cJSON* jsonsend_product_request_all_of_action_product_items_1 = send_product_request_all_of_action_product_items_convertToJSON(send_product_request_all_of_action_product_items_1); - printf("send_product_request_all_of_action_product_items :\n%s\n", cJSON_Print(jsonsend_product_request_all_of_action_product_items_1)); - send_product_request_all_of_action_product_items_t* send_product_request_all_of_action_product_items_2 = send_product_request_all_of_action_product_items_parseFromJSON(jsonsend_product_request_all_of_action_product_items_1); - cJSON* jsonsend_product_request_all_of_action_product_items_2 = send_product_request_all_of_action_product_items_convertToJSON(send_product_request_all_of_action_product_items_2); - printf("repeating send_product_request_all_of_action_product_items:\n%s\n", cJSON_Print(jsonsend_product_request_all_of_action_product_items_2)); -} - -int main() { - test_send_product_request_all_of_action_product_items(1); - test_send_product_request_all_of_action_product_items(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_product_request_all_of_action_product_items_MAIN -#endif // send_product_request_all_of_action_product_items_TEST diff --git a/c/unit-test/test_send_product_request_all_of_action_sections.c b/c/unit-test/test_send_product_request_all_of_action_sections.c deleted file mode 100644 index 4a7012d..0000000 --- a/c/unit-test/test_send_product_request_all_of_action_sections.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef send_product_request_all_of_action_sections_TEST -#define send_product_request_all_of_action_sections_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_product_request_all_of_action_sections_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_product_request_all_of_action_sections.h" -send_product_request_all_of_action_sections_t* instantiate_send_product_request_all_of_action_sections(int include_optional); - - - -send_product_request_all_of_action_sections_t* instantiate_send_product_request_all_of_action_sections(int include_optional) { - send_product_request_all_of_action_sections_t* send_product_request_all_of_action_sections = NULL; - if (include_optional) { - send_product_request_all_of_action_sections = send_product_request_all_of_action_sections_create( - "the-section-title", - list_createList() - ); - } else { - send_product_request_all_of_action_sections = send_product_request_all_of_action_sections_create( - "the-section-title", - list_createList() - ); - } - - return send_product_request_all_of_action_sections; -} - - -#ifdef send_product_request_all_of_action_sections_MAIN - -void test_send_product_request_all_of_action_sections(int include_optional) { - send_product_request_all_of_action_sections_t* send_product_request_all_of_action_sections_1 = instantiate_send_product_request_all_of_action_sections(include_optional); - - cJSON* jsonsend_product_request_all_of_action_sections_1 = send_product_request_all_of_action_sections_convertToJSON(send_product_request_all_of_action_sections_1); - printf("send_product_request_all_of_action_sections :\n%s\n", cJSON_Print(jsonsend_product_request_all_of_action_sections_1)); - send_product_request_all_of_action_sections_t* send_product_request_all_of_action_sections_2 = send_product_request_all_of_action_sections_parseFromJSON(jsonsend_product_request_all_of_action_sections_1); - cJSON* jsonsend_product_request_all_of_action_sections_2 = send_product_request_all_of_action_sections_convertToJSON(send_product_request_all_of_action_sections_2); - printf("repeating send_product_request_all_of_action_sections:\n%s\n", cJSON_Print(jsonsend_product_request_all_of_action_sections_2)); -} - -int main() { - test_send_product_request_all_of_action_sections(1); - test_send_product_request_all_of_action_sections(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_product_request_all_of_action_sections_MAIN -#endif // send_product_request_all_of_action_sections_TEST diff --git a/c/unit-test/test_send_template_request.c b/c/unit-test/test_send_template_request.c deleted file mode 100644 index afc6d35..0000000 --- a/c/unit-test/test_send_template_request.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef send_template_request_TEST -#define send_template_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request.h" -send_template_request_t* instantiate_send_template_request(int include_optional); - -#include "test_send_template_request_all_of_language.c" - - -send_template_request_t* instantiate_send_template_request(int include_optional) { - send_template_request_t* send_template_request = NULL; - if (include_optional) { - send_template_request = send_template_request_create( - "ca300906_cfbc_410b_99fb_dcee1t39d578", - "12020721369@c.us", - 12020721369, - "start", - // false, not to have infinite recursion - instantiate_send_template_request_all_of_language(0), - list_createList() - ); - } else { - send_template_request = send_template_request_create( - "ca300906_cfbc_410b_99fb_dcee1t39d578", - "12020721369@c.us", - 12020721369, - "start", - NULL, - list_createList() - ); - } - - return send_template_request; -} - - -#ifdef send_template_request_MAIN - -void test_send_template_request(int include_optional) { - send_template_request_t* send_template_request_1 = instantiate_send_template_request(include_optional); - - cJSON* jsonsend_template_request_1 = send_template_request_convertToJSON(send_template_request_1); - printf("send_template_request :\n%s\n", cJSON_Print(jsonsend_template_request_1)); - send_template_request_t* send_template_request_2 = send_template_request_parseFromJSON(jsonsend_template_request_1); - cJSON* jsonsend_template_request_2 = send_template_request_convertToJSON(send_template_request_2); - printf("repeating send_template_request:\n%s\n", cJSON_Print(jsonsend_template_request_2)); -} - -int main() { - test_send_template_request(1); - test_send_template_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_MAIN -#endif // send_template_request_TEST diff --git a/c/unit-test/test_send_template_request_all_of_currency.c b/c/unit-test/test_send_template_request_all_of_currency.c deleted file mode 100644 index 2ad1c83..0000000 --- a/c/unit-test/test_send_template_request_all_of_currency.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef send_template_request_all_of_currency_TEST -#define send_template_request_all_of_currency_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_all_of_currency_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request_all_of_currency.h" -send_template_request_all_of_currency_t* instantiate_send_template_request_all_of_currency(int include_optional); - - - -send_template_request_all_of_currency_t* instantiate_send_template_request_all_of_currency(int include_optional) { - send_template_request_all_of_currency_t* send_template_request_all_of_currency = NULL; - if (include_optional) { - send_template_request_all_of_currency = send_template_request_all_of_currency_create( - "USD", - 100990 - ); - } else { - send_template_request_all_of_currency = send_template_request_all_of_currency_create( - "USD", - 100990 - ); - } - - return send_template_request_all_of_currency; -} - - -#ifdef send_template_request_all_of_currency_MAIN - -void test_send_template_request_all_of_currency(int include_optional) { - send_template_request_all_of_currency_t* send_template_request_all_of_currency_1 = instantiate_send_template_request_all_of_currency(include_optional); - - cJSON* jsonsend_template_request_all_of_currency_1 = send_template_request_all_of_currency_convertToJSON(send_template_request_all_of_currency_1); - printf("send_template_request_all_of_currency :\n%s\n", cJSON_Print(jsonsend_template_request_all_of_currency_1)); - send_template_request_all_of_currency_t* send_template_request_all_of_currency_2 = send_template_request_all_of_currency_parseFromJSON(jsonsend_template_request_all_of_currency_1); - cJSON* jsonsend_template_request_all_of_currency_2 = send_template_request_all_of_currency_convertToJSON(send_template_request_all_of_currency_2); - printf("repeating send_template_request_all_of_currency:\n%s\n", cJSON_Print(jsonsend_template_request_all_of_currency_2)); -} - -int main() { - test_send_template_request_all_of_currency(1); - test_send_template_request_all_of_currency(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_all_of_currency_MAIN -#endif // send_template_request_all_of_currency_TEST diff --git a/c/unit-test/test_send_template_request_all_of_date_time.c b/c/unit-test/test_send_template_request_all_of_date_time.c deleted file mode 100644 index 5413874..0000000 --- a/c/unit-test/test_send_template_request_all_of_date_time.c +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef send_template_request_all_of_date_time_TEST -#define send_template_request_all_of_date_time_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_all_of_date_time_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request_all_of_date_time.h" -send_template_request_all_of_date_time_t* instantiate_send_template_request_all_of_date_time(int include_optional); - -#include "test_send_template_request_all_of_date_time_component.c" -#include "test_send_template_request_all_of_date_time_unix_epoch.c" - - -send_template_request_all_of_date_time_t* instantiate_send_template_request_all_of_date_time(int include_optional) { - send_template_request_all_of_date_time_t* send_template_request_all_of_date_time = NULL; - if (include_optional) { - send_template_request_all_of_date_time = send_template_request_all_of_date_time_create( - // false, not to have infinite recursion - instantiate_send_template_request_all_of_date_time_component(0), - // false, not to have infinite recursion - instantiate_send_template_request_all_of_date_time_unix_epoch(0) - ); - } else { - send_template_request_all_of_date_time = send_template_request_all_of_date_time_create( - NULL, - NULL - ); - } - - return send_template_request_all_of_date_time; -} - - -#ifdef send_template_request_all_of_date_time_MAIN - -void test_send_template_request_all_of_date_time(int include_optional) { - send_template_request_all_of_date_time_t* send_template_request_all_of_date_time_1 = instantiate_send_template_request_all_of_date_time(include_optional); - - cJSON* jsonsend_template_request_all_of_date_time_1 = send_template_request_all_of_date_time_convertToJSON(send_template_request_all_of_date_time_1); - printf("send_template_request_all_of_date_time :\n%s\n", cJSON_Print(jsonsend_template_request_all_of_date_time_1)); - send_template_request_all_of_date_time_t* send_template_request_all_of_date_time_2 = send_template_request_all_of_date_time_parseFromJSON(jsonsend_template_request_all_of_date_time_1); - cJSON* jsonsend_template_request_all_of_date_time_2 = send_template_request_all_of_date_time_convertToJSON(send_template_request_all_of_date_time_2); - printf("repeating send_template_request_all_of_date_time:\n%s\n", cJSON_Print(jsonsend_template_request_all_of_date_time_2)); -} - -int main() { - test_send_template_request_all_of_date_time(1); - test_send_template_request_all_of_date_time(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_all_of_date_time_MAIN -#endif // send_template_request_all_of_date_time_TEST diff --git a/c/unit-test/test_send_template_request_all_of_date_time_component.c b/c/unit-test/test_send_template_request_all_of_date_time_component.c deleted file mode 100644 index 2e782bb..0000000 --- a/c/unit-test/test_send_template_request_all_of_date_time_component.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef send_template_request_all_of_date_time_component_TEST -#define send_template_request_all_of_date_time_component_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_all_of_date_time_component_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request_all_of_date_time_component.h" -send_template_request_all_of_date_time_component_t* instantiate_send_template_request_all_of_date_time_component(int include_optional); - - - -send_template_request_all_of_date_time_component_t* instantiate_send_template_request_all_of_date_time_component(int include_optional) { - send_template_request_all_of_date_time_component_t* send_template_request_all_of_date_time_component = NULL; - if (include_optional) { - send_template_request_all_of_date_time_component = send_template_request_all_of_date_time_component_create( - one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_"FRIDAY", - 2001, - 4, - 13, - 17, - 20, - one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_"GREGORIAN" - ); - } else { - send_template_request_all_of_date_time_component = send_template_request_all_of_date_time_component_create( - one_msg_waba_sdk_send_template_request_all_of_date_time_component_DAYOFWEEK_"FRIDAY", - 2001, - 4, - 13, - 17, - 20, - one_msg_waba_sdk_send_template_request_all_of_date_time_component_CALENDAR_"GREGORIAN" - ); - } - - return send_template_request_all_of_date_time_component; -} - - -#ifdef send_template_request_all_of_date_time_component_MAIN - -void test_send_template_request_all_of_date_time_component(int include_optional) { - send_template_request_all_of_date_time_component_t* send_template_request_all_of_date_time_component_1 = instantiate_send_template_request_all_of_date_time_component(include_optional); - - cJSON* jsonsend_template_request_all_of_date_time_component_1 = send_template_request_all_of_date_time_component_convertToJSON(send_template_request_all_of_date_time_component_1); - printf("send_template_request_all_of_date_time_component :\n%s\n", cJSON_Print(jsonsend_template_request_all_of_date_time_component_1)); - send_template_request_all_of_date_time_component_t* send_template_request_all_of_date_time_component_2 = send_template_request_all_of_date_time_component_parseFromJSON(jsonsend_template_request_all_of_date_time_component_1); - cJSON* jsonsend_template_request_all_of_date_time_component_2 = send_template_request_all_of_date_time_component_convertToJSON(send_template_request_all_of_date_time_component_2); - printf("repeating send_template_request_all_of_date_time_component:\n%s\n", cJSON_Print(jsonsend_template_request_all_of_date_time_component_2)); -} - -int main() { - test_send_template_request_all_of_date_time_component(1); - test_send_template_request_all_of_date_time_component(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_all_of_date_time_component_MAIN -#endif // send_template_request_all_of_date_time_component_TEST diff --git a/c/unit-test/test_send_template_request_all_of_date_time_unix_epoch.c b/c/unit-test/test_send_template_request_all_of_date_time_unix_epoch.c deleted file mode 100644 index f8ffc5f..0000000 --- a/c/unit-test/test_send_template_request_all_of_date_time_unix_epoch.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef send_template_request_all_of_date_time_unix_epoch_TEST -#define send_template_request_all_of_date_time_unix_epoch_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_all_of_date_time_unix_epoch_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request_all_of_date_time_unix_epoch.h" -send_template_request_all_of_date_time_unix_epoch_t* instantiate_send_template_request_all_of_date_time_unix_epoch(int include_optional); - - - -send_template_request_all_of_date_time_unix_epoch_t* instantiate_send_template_request_all_of_date_time_unix_epoch(int include_optional) { - send_template_request_all_of_date_time_unix_epoch_t* send_template_request_all_of_date_time_unix_epoch = NULL; - if (include_optional) { - send_template_request_all_of_date_time_unix_epoch = send_template_request_all_of_date_time_unix_epoch_create( - 987168000 - ); - } else { - send_template_request_all_of_date_time_unix_epoch = send_template_request_all_of_date_time_unix_epoch_create( - 987168000 - ); - } - - return send_template_request_all_of_date_time_unix_epoch; -} - - -#ifdef send_template_request_all_of_date_time_unix_epoch_MAIN - -void test_send_template_request_all_of_date_time_unix_epoch(int include_optional) { - send_template_request_all_of_date_time_unix_epoch_t* send_template_request_all_of_date_time_unix_epoch_1 = instantiate_send_template_request_all_of_date_time_unix_epoch(include_optional); - - cJSON* jsonsend_template_request_all_of_date_time_unix_epoch_1 = send_template_request_all_of_date_time_unix_epoch_convertToJSON(send_template_request_all_of_date_time_unix_epoch_1); - printf("send_template_request_all_of_date_time_unix_epoch :\n%s\n", cJSON_Print(jsonsend_template_request_all_of_date_time_unix_epoch_1)); - send_template_request_all_of_date_time_unix_epoch_t* send_template_request_all_of_date_time_unix_epoch_2 = send_template_request_all_of_date_time_unix_epoch_parseFromJSON(jsonsend_template_request_all_of_date_time_unix_epoch_1); - cJSON* jsonsend_template_request_all_of_date_time_unix_epoch_2 = send_template_request_all_of_date_time_unix_epoch_convertToJSON(send_template_request_all_of_date_time_unix_epoch_2); - printf("repeating send_template_request_all_of_date_time_unix_epoch:\n%s\n", cJSON_Print(jsonsend_template_request_all_of_date_time_unix_epoch_2)); -} - -int main() { - test_send_template_request_all_of_date_time_unix_epoch(1); - test_send_template_request_all_of_date_time_unix_epoch(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_all_of_date_time_unix_epoch_MAIN -#endif // send_template_request_all_of_date_time_unix_epoch_TEST diff --git a/c/unit-test/test_send_template_request_all_of_language.c b/c/unit-test/test_send_template_request_all_of_language.c deleted file mode 100644 index b2cb3c9..0000000 --- a/c/unit-test/test_send_template_request_all_of_language.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef send_template_request_all_of_language_TEST -#define send_template_request_all_of_language_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_all_of_language_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request_all_of_language.h" -send_template_request_all_of_language_t* instantiate_send_template_request_all_of_language(int include_optional); - - - -send_template_request_all_of_language_t* instantiate_send_template_request_all_of_language(int include_optional) { - send_template_request_all_of_language_t* send_template_request_all_of_language = NULL; - if (include_optional) { - send_template_request_all_of_language = send_template_request_all_of_language_create( - one_msg_waba_sdk_send_template_request_all_of_language_POLICY_"deterministic", - one_msg_waba_sdk_send_template_request_all_of_language__"en" - ); - } else { - send_template_request_all_of_language = send_template_request_all_of_language_create( - one_msg_waba_sdk_send_template_request_all_of_language_POLICY_"deterministic", - one_msg_waba_sdk_send_template_request_all_of_language__"en" - ); - } - - return send_template_request_all_of_language; -} - - -#ifdef send_template_request_all_of_language_MAIN - -void test_send_template_request_all_of_language(int include_optional) { - send_template_request_all_of_language_t* send_template_request_all_of_language_1 = instantiate_send_template_request_all_of_language(include_optional); - - cJSON* jsonsend_template_request_all_of_language_1 = send_template_request_all_of_language_convertToJSON(send_template_request_all_of_language_1); - printf("send_template_request_all_of_language :\n%s\n", cJSON_Print(jsonsend_template_request_all_of_language_1)); - send_template_request_all_of_language_t* send_template_request_all_of_language_2 = send_template_request_all_of_language_parseFromJSON(jsonsend_template_request_all_of_language_1); - cJSON* jsonsend_template_request_all_of_language_2 = send_template_request_all_of_language_convertToJSON(send_template_request_all_of_language_2); - printf("repeating send_template_request_all_of_language:\n%s\n", cJSON_Print(jsonsend_template_request_all_of_language_2)); -} - -int main() { - test_send_template_request_all_of_language(1); - test_send_template_request_all_of_language(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_all_of_language_MAIN -#endif // send_template_request_all_of_language_TEST diff --git a/c/unit-test/test_send_template_request_all_of_params.c b/c/unit-test/test_send_template_request_all_of_params.c deleted file mode 100644 index 1ae2c63..0000000 --- a/c/unit-test/test_send_template_request_all_of_params.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef send_template_request_all_of_params_TEST -#define send_template_request_all_of_params_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define send_template_request_all_of_params_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/send_template_request_all_of_params.h" -send_template_request_all_of_params_t* instantiate_send_template_request_all_of_params(int include_optional); - -#include "test_send_template_request_all_of_currency.c" -#include "test_send_template_request_all_of_date_time.c" - - -send_template_request_all_of_params_t* instantiate_send_template_request_all_of_params(int include_optional) { - send_template_request_all_of_params_t* send_template_request_all_of_params = NULL; - if (include_optional) { - send_template_request_all_of_params = send_template_request_all_of_params_create( - "Some title", - // false, not to have infinite recursion - instantiate_send_template_request_all_of_currency(0), - // false, not to have infinite recursion - instantiate_send_template_request_all_of_date_time(0) - ); - } else { - send_template_request_all_of_params = send_template_request_all_of_params_create( - "Some title", - NULL, - NULL - ); - } - - return send_template_request_all_of_params; -} - - -#ifdef send_template_request_all_of_params_MAIN - -void test_send_template_request_all_of_params(int include_optional) { - send_template_request_all_of_params_t* send_template_request_all_of_params_1 = instantiate_send_template_request_all_of_params(include_optional); - - cJSON* jsonsend_template_request_all_of_params_1 = send_template_request_all_of_params_convertToJSON(send_template_request_all_of_params_1); - printf("send_template_request_all_of_params :\n%s\n", cJSON_Print(jsonsend_template_request_all_of_params_1)); - send_template_request_all_of_params_t* send_template_request_all_of_params_2 = send_template_request_all_of_params_parseFromJSON(jsonsend_template_request_all_of_params_1); - cJSON* jsonsend_template_request_all_of_params_2 = send_template_request_all_of_params_convertToJSON(send_template_request_all_of_params_2); - printf("repeating send_template_request_all_of_params:\n%s\n", cJSON_Print(jsonsend_template_request_all_of_params_2)); -} - -int main() { - test_send_template_request_all_of_params(1); - test_send_template_request_all_of_params(0); - - printf("Hello world \n"); - return 0; -} - -#endif // send_template_request_all_of_params_MAIN -#endif // send_template_request_all_of_params_TEST diff --git a/c/unit-test/test_set_commerce.c b/c/unit-test/test_set_commerce.c deleted file mode 100644 index 2e1dd14..0000000 --- a/c/unit-test/test_set_commerce.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef set_commerce_TEST -#define set_commerce_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define set_commerce_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/set_commerce.h" -set_commerce_t* instantiate_set_commerce(int include_optional); - - - -set_commerce_t* instantiate_set_commerce(int include_optional) { - set_commerce_t* set_commerce = NULL; - if (include_optional) { - set_commerce = set_commerce_create( - true - ); - } else { - set_commerce = set_commerce_create( - true - ); - } - - return set_commerce; -} - - -#ifdef set_commerce_MAIN - -void test_set_commerce(int include_optional) { - set_commerce_t* set_commerce_1 = instantiate_set_commerce(include_optional); - - cJSON* jsonset_commerce_1 = set_commerce_convertToJSON(set_commerce_1); - printf("set_commerce :\n%s\n", cJSON_Print(jsonset_commerce_1)); - set_commerce_t* set_commerce_2 = set_commerce_parseFromJSON(jsonset_commerce_1); - cJSON* jsonset_commerce_2 = set_commerce_convertToJSON(set_commerce_2); - printf("repeating set_commerce:\n%s\n", cJSON_Print(jsonset_commerce_2)); -} - -int main() { - test_set_commerce(1); - test_set_commerce(0); - - printf("Hello world \n"); - return 0; -} - -#endif // set_commerce_MAIN -#endif // set_commerce_TEST diff --git a/c/unit-test/test_set_me.c b/c/unit-test/test_set_me.c deleted file mode 100644 index 740cdc5..0000000 --- a/c/unit-test/test_set_me.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef set_me_TEST -#define set_me_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define set_me_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/set_me.h" -set_me_t* instantiate_set_me(int include_optional); - - - -set_me_t* instantiate_set_me(int include_optional) { - set_me_t* set_me = NULL; - if (include_optional) { - set_me = set_me_create( - "success" - ); - } else { - set_me = set_me_create( - "success" - ); - } - - return set_me; -} - - -#ifdef set_me_MAIN - -void test_set_me(int include_optional) { - set_me_t* set_me_1 = instantiate_set_me(include_optional); - - cJSON* jsonset_me_1 = set_me_convertToJSON(set_me_1); - printf("set_me :\n%s\n", cJSON_Print(jsonset_me_1)); - set_me_t* set_me_2 = set_me_parseFromJSON(jsonset_me_1); - cJSON* jsonset_me_2 = set_me_convertToJSON(set_me_2); - printf("repeating set_me:\n%s\n", cJSON_Print(jsonset_me_2)); -} - -int main() { - test_set_me(1); - test_set_me(0); - - printf("Hello world \n"); - return 0; -} - -#endif // set_me_MAIN -#endif // set_me_TEST diff --git a/c/unit-test/test_set_me_request.c b/c/unit-test/test_set_me_request.c deleted file mode 100644 index 6e14841..0000000 --- a/c/unit-test/test_set_me_request.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef set_me_request_TEST -#define set_me_request_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define set_me_request_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/set_me_request.h" -set_me_request_t* instantiate_set_me_request(int include_optional); - - - -set_me_request_t* instantiate_set_me_request(int include_optional) { - set_me_request_t* set_me_request = NULL; - if (include_optional) { - set_me_request = set_me_request_create( - "Some about info", - "Neverland, Unexpected st.", - "Some company description", - "john@neverland.play", - "12020721369", - one_msg_waba_sdk_set_me_request_VERTICAL_"Other", - "0" - ); - } else { - set_me_request = set_me_request_create( - "Some about info", - "Neverland, Unexpected st.", - "Some company description", - "john@neverland.play", - "12020721369", - one_msg_waba_sdk_set_me_request_VERTICAL_"Other", - "0" - ); - } - - return set_me_request; -} - - -#ifdef set_me_request_MAIN - -void test_set_me_request(int include_optional) { - set_me_request_t* set_me_request_1 = instantiate_set_me_request(include_optional); - - cJSON* jsonset_me_request_1 = set_me_request_convertToJSON(set_me_request_1); - printf("set_me_request :\n%s\n", cJSON_Print(jsonset_me_request_1)); - set_me_request_t* set_me_request_2 = set_me_request_parseFromJSON(jsonset_me_request_1); - cJSON* jsonset_me_request_2 = set_me_request_convertToJSON(set_me_request_2); - printf("repeating set_me_request:\n%s\n", cJSON_Print(jsonset_me_request_2)); -} - -int main() { - test_set_me_request(1); - test_set_me_request(0); - - printf("Hello world \n"); - return 0; -} - -#endif // set_me_request_MAIN -#endif // set_me_request_TEST diff --git a/c/unit-test/test_set_settings_200_response.c b/c/unit-test/test_set_settings_200_response.c deleted file mode 100644 index 5c1e513..0000000 --- a/c/unit-test/test_set_settings_200_response.c +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef set_settings_200_response_TEST -#define set_settings_200_response_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define set_settings_200_response_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/set_settings_200_response.h" -set_settings_200_response_t* instantiate_set_settings_200_response(int include_optional); - -#include "test_set_settings_200_response_all_of_update.c" - - -set_settings_200_response_t* instantiate_set_settings_200_response(int include_optional) { - set_settings_200_response_t* set_settings_200_response = NULL; - if (include_optional) { - set_settings_200_response = set_settings_200_response_create( - "https://bin.1msg.io/1f9aj261", - null - ); - } else { - set_settings_200_response = set_settings_200_response_create( - "https://bin.1msg.io/1f9aj261", - null - ); - } - - return set_settings_200_response; -} - - -#ifdef set_settings_200_response_MAIN - -void test_set_settings_200_response(int include_optional) { - set_settings_200_response_t* set_settings_200_response_1 = instantiate_set_settings_200_response(include_optional); - - cJSON* jsonset_settings_200_response_1 = set_settings_200_response_convertToJSON(set_settings_200_response_1); - printf("set_settings_200_response :\n%s\n", cJSON_Print(jsonset_settings_200_response_1)); - set_settings_200_response_t* set_settings_200_response_2 = set_settings_200_response_parseFromJSON(jsonset_settings_200_response_1); - cJSON* jsonset_settings_200_response_2 = set_settings_200_response_convertToJSON(set_settings_200_response_2); - printf("repeating set_settings_200_response:\n%s\n", cJSON_Print(jsonset_settings_200_response_2)); -} - -int main() { - test_set_settings_200_response(1); - test_set_settings_200_response(0); - - printf("Hello world \n"); - return 0; -} - -#endif // set_settings_200_response_MAIN -#endif // set_settings_200_response_TEST diff --git a/c/unit-test/test_set_settings_200_response_all_of_update.c b/c/unit-test/test_set_settings_200_response_all_of_update.c deleted file mode 100644 index 86a047f..0000000 --- a/c/unit-test/test_set_settings_200_response_all_of_update.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef set_settings_200_response_all_of_update_TEST -#define set_settings_200_response_all_of_update_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define set_settings_200_response_all_of_update_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/set_settings_200_response_all_of_update.h" -set_settings_200_response_all_of_update_t* instantiate_set_settings_200_response_all_of_update(int include_optional); - - - -set_settings_200_response_all_of_update_t* instantiate_set_settings_200_response_all_of_update(int include_optional) { - set_settings_200_response_all_of_update_t* set_settings_200_response_all_of_update = NULL; - if (include_optional) { - set_settings_200_response_all_of_update = set_settings_200_response_all_of_update_create( - "https://bin.1msg.io/1f9aj261" - ); - } else { - set_settings_200_response_all_of_update = set_settings_200_response_all_of_update_create( - "https://bin.1msg.io/1f9aj261" - ); - } - - return set_settings_200_response_all_of_update; -} - - -#ifdef set_settings_200_response_all_of_update_MAIN - -void test_set_settings_200_response_all_of_update(int include_optional) { - set_settings_200_response_all_of_update_t* set_settings_200_response_all_of_update_1 = instantiate_set_settings_200_response_all_of_update(include_optional); - - cJSON* jsonset_settings_200_response_all_of_update_1 = set_settings_200_response_all_of_update_convertToJSON(set_settings_200_response_all_of_update_1); - printf("set_settings_200_response_all_of_update :\n%s\n", cJSON_Print(jsonset_settings_200_response_all_of_update_1)); - set_settings_200_response_all_of_update_t* set_settings_200_response_all_of_update_2 = set_settings_200_response_all_of_update_parseFromJSON(jsonset_settings_200_response_all_of_update_1); - cJSON* jsonset_settings_200_response_all_of_update_2 = set_settings_200_response_all_of_update_convertToJSON(set_settings_200_response_all_of_update_2); - printf("repeating set_settings_200_response_all_of_update:\n%s\n", cJSON_Print(jsonset_settings_200_response_all_of_update_2)); -} - -int main() { - test_set_settings_200_response_all_of_update(1); - test_set_settings_200_response_all_of_update(0); - - printf("Hello world \n"); - return 0; -} - -#endif // set_settings_200_response_all_of_update_MAIN -#endif // set_settings_200_response_all_of_update_TEST diff --git a/c/unit-test/test_set_webhook_status.c b/c/unit-test/test_set_webhook_status.c deleted file mode 100644 index 1b42057..0000000 --- a/c/unit-test/test_set_webhook_status.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef set_webhook_status_TEST -#define set_webhook_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define set_webhook_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/set_webhook_status.h" -set_webhook_status_t* instantiate_set_webhook_status(int include_optional); - - - -set_webhook_status_t* instantiate_set_webhook_status(int include_optional) { - set_webhook_status_t* set_webhook_status = NULL; - if (include_optional) { - set_webhook_status = set_webhook_status_create( - true, - "https://bin.1msg.io/1f9aj261" - ); - } else { - set_webhook_status = set_webhook_status_create( - true, - "https://bin.1msg.io/1f9aj261" - ); - } - - return set_webhook_status; -} - - -#ifdef set_webhook_status_MAIN - -void test_set_webhook_status(int include_optional) { - set_webhook_status_t* set_webhook_status_1 = instantiate_set_webhook_status(include_optional); - - cJSON* jsonset_webhook_status_1 = set_webhook_status_convertToJSON(set_webhook_status_1); - printf("set_webhook_status :\n%s\n", cJSON_Print(jsonset_webhook_status_1)); - set_webhook_status_t* set_webhook_status_2 = set_webhook_status_parseFromJSON(jsonset_webhook_status_1); - cJSON* jsonset_webhook_status_2 = set_webhook_status_convertToJSON(set_webhook_status_2); - printf("repeating set_webhook_status:\n%s\n", cJSON_Print(jsonset_webhook_status_2)); -} - -int main() { - test_set_webhook_status(1); - test_set_webhook_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // set_webhook_status_MAIN -#endif // set_webhook_status_TEST diff --git a/c/unit-test/test_settings.c b/c/unit-test/test_settings.c deleted file mode 100644 index fd83463..0000000 --- a/c/unit-test/test_settings.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef settings_TEST -#define settings_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define settings_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/settings.h" -settings_t* instantiate_settings(int include_optional); - - - -settings_t* instantiate_settings(int include_optional) { - settings_t* settings = NULL; - if (include_optional) { - settings = settings_create( - "https://bin.1msg.io/1f9aj261" - ); - } else { - settings = settings_create( - "https://bin.1msg.io/1f9aj261" - ); - } - - return settings; -} - - -#ifdef settings_MAIN - -void test_settings(int include_optional) { - settings_t* settings_1 = instantiate_settings(include_optional); - - cJSON* jsonsettings_1 = settings_convertToJSON(settings_1); - printf("settings :\n%s\n", cJSON_Print(jsonsettings_1)); - settings_t* settings_2 = settings_parseFromJSON(jsonsettings_1); - cJSON* jsonsettings_2 = settings_convertToJSON(settings_2); - printf("repeating settings:\n%s\n", cJSON_Print(jsonsettings_2)); -} - -int main() { - test_settings(1); - test_settings(0); - - printf("Hello world \n"); - return 0; -} - -#endif // settings_MAIN -#endif // settings_TEST diff --git a/c/unit-test/test_template_category_prop.c b/c/unit-test/test_template_category_prop.c deleted file mode 100644 index 9340055..0000000 --- a/c/unit-test/test_template_category_prop.c +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef template_category_prop_TEST -#define template_category_prop_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define template_category_prop_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/template_category_prop.h" -template_category_prop_t* instantiate_template_category_prop(int include_optional); - - - -template_category_prop_t* instantiate_template_category_prop(int include_optional) { - template_category_prop_t* template_category_prop = NULL; - if (include_optional) { - template_category_prop = template_category_prop_create( - ); - } else { - template_category_prop = template_category_prop_create( - ); - } - - return template_category_prop; -} - - -#ifdef template_category_prop_MAIN - -void test_template_category_prop(int include_optional) { - template_category_prop_t* template_category_prop_1 = instantiate_template_category_prop(include_optional); - - cJSON* jsontemplate_category_prop_1 = template_category_prop_convertToJSON(template_category_prop_1); - printf("template_category_prop :\n%s\n", cJSON_Print(jsontemplate_category_prop_1)); - template_category_prop_t* template_category_prop_2 = template_category_prop_parseFromJSON(jsontemplate_category_prop_1); - cJSON* jsontemplate_category_prop_2 = template_category_prop_convertToJSON(template_category_prop_2); - printf("repeating template_category_prop:\n%s\n", cJSON_Print(jsontemplate_category_prop_2)); -} - -int main() { - test_template_category_prop(1); - test_template_category_prop(0); - - printf("Hello world \n"); - return 0; -} - -#endif // template_category_prop_MAIN -#endif // template_category_prop_TEST diff --git a/c/unit-test/test_template_components_prop.c b/c/unit-test/test_template_components_prop.c deleted file mode 100644 index a341f82..0000000 --- a/c/unit-test/test_template_components_prop.c +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef template_components_prop_TEST -#define template_components_prop_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define template_components_prop_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/template_components_prop.h" -template_components_prop_t* instantiate_template_components_prop(int include_optional); - - - -template_components_prop_t* instantiate_template_components_prop(int include_optional) { - template_components_prop_t* template_components_prop = NULL; - if (include_optional) { - template_components_prop = template_components_prop_create( - ); - } else { - template_components_prop = template_components_prop_create( - ); - } - - return template_components_prop; -} - - -#ifdef template_components_prop_MAIN - -void test_template_components_prop(int include_optional) { - template_components_prop_t* template_components_prop_1 = instantiate_template_components_prop(include_optional); - - cJSON* jsontemplate_components_prop_1 = template_components_prop_convertToJSON(template_components_prop_1); - printf("template_components_prop :\n%s\n", cJSON_Print(jsontemplate_components_prop_1)); - template_components_prop_t* template_components_prop_2 = template_components_prop_parseFromJSON(jsontemplate_components_prop_1); - cJSON* jsontemplate_components_prop_2 = template_components_prop_convertToJSON(template_components_prop_2); - printf("repeating template_components_prop:\n%s\n", cJSON_Print(jsontemplate_components_prop_2)); -} - -int main() { - test_template_components_prop(1); - test_template_components_prop(0); - - printf("Hello world \n"); - return 0; -} - -#endif // template_components_prop_MAIN -#endif // template_components_prop_TEST diff --git a/c/unit-test/test_template_components_prop_inner.c b/c/unit-test/test_template_components_prop_inner.c deleted file mode 100644 index 84523bf..0000000 --- a/c/unit-test/test_template_components_prop_inner.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef template_components_prop_inner_TEST -#define template_components_prop_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define template_components_prop_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/template_components_prop_inner.h" -template_components_prop_inner_t* instantiate_template_components_prop_inner(int include_optional); - - - -template_components_prop_inner_t* instantiate_template_components_prop_inner(int include_optional) { - template_components_prop_inner_t* template_components_prop_inner = NULL; - if (include_optional) { - template_components_prop_inner = template_components_prop_inner_create( - one_msg_waba_sdk_template_components_prop_inner_TYPE_"BODY", - one_msg_waba_sdk_template_components_prop_inner_FORMAT_"TEXT", - "header text {{1}}", - 0, - list_createList() - ); - } else { - template_components_prop_inner = template_components_prop_inner_create( - one_msg_waba_sdk_template_components_prop_inner_TYPE_"BODY", - one_msg_waba_sdk_template_components_prop_inner_FORMAT_"TEXT", - "header text {{1}}", - 0, - list_createList() - ); - } - - return template_components_prop_inner; -} - - -#ifdef template_components_prop_inner_MAIN - -void test_template_components_prop_inner(int include_optional) { - template_components_prop_inner_t* template_components_prop_inner_1 = instantiate_template_components_prop_inner(include_optional); - - cJSON* jsontemplate_components_prop_inner_1 = template_components_prop_inner_convertToJSON(template_components_prop_inner_1); - printf("template_components_prop_inner :\n%s\n", cJSON_Print(jsontemplate_components_prop_inner_1)); - template_components_prop_inner_t* template_components_prop_inner_2 = template_components_prop_inner_parseFromJSON(jsontemplate_components_prop_inner_1); - cJSON* jsontemplate_components_prop_inner_2 = template_components_prop_inner_convertToJSON(template_components_prop_inner_2); - printf("repeating template_components_prop_inner:\n%s\n", cJSON_Print(jsontemplate_components_prop_inner_2)); -} - -int main() { - test_template_components_prop_inner(1); - test_template_components_prop_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // template_components_prop_inner_MAIN -#endif // template_components_prop_inner_TEST diff --git a/c/unit-test/test_template_components_prop_inner_buttons_inner.c b/c/unit-test/test_template_components_prop_inner_buttons_inner.c deleted file mode 100644 index 606700a..0000000 --- a/c/unit-test/test_template_components_prop_inner_buttons_inner.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef template_components_prop_inner_buttons_inner_TEST -#define template_components_prop_inner_buttons_inner_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define template_components_prop_inner_buttons_inner_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/template_components_prop_inner_buttons_inner.h" -template_components_prop_inner_buttons_inner_t* instantiate_template_components_prop_inner_buttons_inner(int include_optional); - - - -template_components_prop_inner_buttons_inner_t* instantiate_template_components_prop_inner_buttons_inner(int include_optional) { - template_components_prop_inner_buttons_inner_t* template_components_prop_inner_buttons_inner = NULL; - if (include_optional) { - template_components_prop_inner_buttons_inner = template_components_prop_inner_buttons_inner_create( - one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_"QUICK_REPLY", - "phone-button-text", - "https://www.website.com/{{1}}", - "+1(234) 235-5678", - list_createList() - ); - } else { - template_components_prop_inner_buttons_inner = template_components_prop_inner_buttons_inner_create( - one_msg_waba_sdk_template_components_prop_inner_buttons_inner_TYPE_"QUICK_REPLY", - "phone-button-text", - "https://www.website.com/{{1}}", - "+1(234) 235-5678", - list_createList() - ); - } - - return template_components_prop_inner_buttons_inner; -} - - -#ifdef template_components_prop_inner_buttons_inner_MAIN - -void test_template_components_prop_inner_buttons_inner(int include_optional) { - template_components_prop_inner_buttons_inner_t* template_components_prop_inner_buttons_inner_1 = instantiate_template_components_prop_inner_buttons_inner(include_optional); - - cJSON* jsontemplate_components_prop_inner_buttons_inner_1 = template_components_prop_inner_buttons_inner_convertToJSON(template_components_prop_inner_buttons_inner_1); - printf("template_components_prop_inner_buttons_inner :\n%s\n", cJSON_Print(jsontemplate_components_prop_inner_buttons_inner_1)); - template_components_prop_inner_buttons_inner_t* template_components_prop_inner_buttons_inner_2 = template_components_prop_inner_buttons_inner_parseFromJSON(jsontemplate_components_prop_inner_buttons_inner_1); - cJSON* jsontemplate_components_prop_inner_buttons_inner_2 = template_components_prop_inner_buttons_inner_convertToJSON(template_components_prop_inner_buttons_inner_2); - printf("repeating template_components_prop_inner_buttons_inner:\n%s\n", cJSON_Print(jsontemplate_components_prop_inner_buttons_inner_2)); -} - -int main() { - test_template_components_prop_inner_buttons_inner(1); - test_template_components_prop_inner_buttons_inner(0); - - printf("Hello world \n"); - return 0; -} - -#endif // template_components_prop_inner_buttons_inner_MAIN -#endif // template_components_prop_inner_buttons_inner_TEST diff --git a/c/unit-test/test_template_language_prop.c b/c/unit-test/test_template_language_prop.c deleted file mode 100644 index d493b39..0000000 --- a/c/unit-test/test_template_language_prop.c +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef template_language_prop_TEST -#define template_language_prop_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define template_language_prop_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/template_language_prop.h" -template_language_prop_t* instantiate_template_language_prop(int include_optional); - - - -template_language_prop_t* instantiate_template_language_prop(int include_optional) { - template_language_prop_t* template_language_prop = NULL; - if (include_optional) { - template_language_prop = template_language_prop_create( - ); - } else { - template_language_prop = template_language_prop_create( - ); - } - - return template_language_prop; -} - - -#ifdef template_language_prop_MAIN - -void test_template_language_prop(int include_optional) { - template_language_prop_t* template_language_prop_1 = instantiate_template_language_prop(include_optional); - - cJSON* jsontemplate_language_prop_1 = template_language_prop_convertToJSON(template_language_prop_1); - printf("template_language_prop :\n%s\n", cJSON_Print(jsontemplate_language_prop_1)); - template_language_prop_t* template_language_prop_2 = template_language_prop_parseFromJSON(jsontemplate_language_prop_1); - cJSON* jsontemplate_language_prop_2 = template_language_prop_convertToJSON(template_language_prop_2); - printf("repeating template_language_prop:\n%s\n", cJSON_Print(jsontemplate_language_prop_2)); -} - -int main() { - test_template_language_prop(1); - test_template_language_prop(0); - - printf("Hello world \n"); - return 0; -} - -#endif // template_language_prop_MAIN -#endif // template_language_prop_TEST diff --git a/c/unit-test/test_template_namespace_field.c b/c/unit-test/test_template_namespace_field.c deleted file mode 100644 index c4e63d0..0000000 --- a/c/unit-test/test_template_namespace_field.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef template_namespace_field_TEST -#define template_namespace_field_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define template_namespace_field_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/template_namespace_field.h" -template_namespace_field_t* instantiate_template_namespace_field(int include_optional); - - - -template_namespace_field_t* instantiate_template_namespace_field(int include_optional) { - template_namespace_field_t* template_namespace_field = NULL; - if (include_optional) { - template_namespace_field = template_namespace_field_create( - "ca300906_cfbc_410b_99fb_dcee8e13d578" - ); - } else { - template_namespace_field = template_namespace_field_create( - "ca300906_cfbc_410b_99fb_dcee8e13d578" - ); - } - - return template_namespace_field; -} - - -#ifdef template_namespace_field_MAIN - -void test_template_namespace_field(int include_optional) { - template_namespace_field_t* template_namespace_field_1 = instantiate_template_namespace_field(include_optional); - - cJSON* jsontemplate_namespace_field_1 = template_namespace_field_convertToJSON(template_namespace_field_1); - printf("template_namespace_field :\n%s\n", cJSON_Print(jsontemplate_namespace_field_1)); - template_namespace_field_t* template_namespace_field_2 = template_namespace_field_parseFromJSON(jsontemplate_namespace_field_1); - cJSON* jsontemplate_namespace_field_2 = template_namespace_field_convertToJSON(template_namespace_field_2); - printf("repeating template_namespace_field:\n%s\n", cJSON_Print(jsontemplate_namespace_field_2)); -} - -int main() { - test_template_namespace_field(1); - test_template_namespace_field(0); - - printf("Hello world \n"); - return 0; -} - -#endif // template_namespace_field_MAIN -#endif // template_namespace_field_TEST diff --git a/c/unit-test/test_upload_media.c b/c/unit-test/test_upload_media.c deleted file mode 100644 index e3a3893..0000000 --- a/c/unit-test/test_upload_media.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef upload_media_TEST -#define upload_media_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define upload_media_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/upload_media.h" -upload_media_t* instantiate_upload_media(int include_optional); - - - -upload_media_t* instantiate_upload_media(int include_optional) { - upload_media_t* upload_media = NULL; - if (include_optional) { - upload_media = upload_media_create( - "0" - ); - } else { - upload_media = upload_media_create( - "0" - ); - } - - return upload_media; -} - - -#ifdef upload_media_MAIN - -void test_upload_media(int include_optional) { - upload_media_t* upload_media_1 = instantiate_upload_media(include_optional); - - cJSON* jsonupload_media_1 = upload_media_convertToJSON(upload_media_1); - printf("upload_media :\n%s\n", cJSON_Print(jsonupload_media_1)); - upload_media_t* upload_media_2 = upload_media_parseFromJSON(jsonupload_media_1); - cJSON* jsonupload_media_2 = upload_media_convertToJSON(upload_media_2); - printf("repeating upload_media:\n%s\n", cJSON_Print(jsonupload_media_2)); -} - -int main() { - test_upload_media(1); - test_upload_media(0); - - printf("Hello world \n"); - return 0; -} - -#endif // upload_media_MAIN -#endif // upload_media_TEST diff --git a/c/unit-test/test_webhook_url.c b/c/unit-test/test_webhook_url.c deleted file mode 100644 index 7fdb0a8..0000000 --- a/c/unit-test/test_webhook_url.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef webhook_url_TEST -#define webhook_url_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define webhook_url_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/webhook_url.h" -webhook_url_t* instantiate_webhook_url(int include_optional); - - - -webhook_url_t* instantiate_webhook_url(int include_optional) { - webhook_url_t* webhook_url = NULL; - if (include_optional) { - webhook_url = webhook_url_create( - "0" - ); - } else { - webhook_url = webhook_url_create( - "0" - ); - } - - return webhook_url; -} - - -#ifdef webhook_url_MAIN - -void test_webhook_url(int include_optional) { - webhook_url_t* webhook_url_1 = instantiate_webhook_url(include_optional); - - cJSON* jsonwebhook_url_1 = webhook_url_convertToJSON(webhook_url_1); - printf("webhook_url :\n%s\n", cJSON_Print(jsonwebhook_url_1)); - webhook_url_t* webhook_url_2 = webhook_url_parseFromJSON(jsonwebhook_url_1); - cJSON* jsonwebhook_url_2 = webhook_url_convertToJSON(webhook_url_2); - printf("repeating webhook_url:\n%s\n", cJSON_Print(jsonwebhook_url_2)); -} - -int main() { - test_webhook_url(1); - test_webhook_url(0); - - printf("Hello world \n"); - return 0; -} - -#endif // webhook_url_MAIN -#endif // webhook_url_TEST diff --git a/cpp-restsdk/.gitignore b/cpp-restsdk/.gitignore deleted file mode 100644 index 4581ef2..0000000 --- a/cpp-restsdk/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/cpp-restsdk/.openapi-generator-ignore b/cpp-restsdk/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/cpp-restsdk/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/cpp-restsdk/.openapi-generator/FILES b/cpp-restsdk/.openapi-generator/FILES deleted file mode 100644 index 04a27d1..0000000 --- a/cpp-restsdk/.openapi-generator/FILES +++ /dev/null @@ -1,163 +0,0 @@ -.gitignore -.openapi-generator-ignore -CMakeLists.txt -Config.cmake.in -README.md -git_push.sh -include/CppRestOpenAPIClient/ApiClient.h -include/CppRestOpenAPIClient/ApiConfiguration.h -include/CppRestOpenAPIClient/ApiException.h -include/CppRestOpenAPIClient/HttpContent.h -include/CppRestOpenAPIClient/IHttpBody.h -include/CppRestOpenAPIClient/JsonBody.h -include/CppRestOpenAPIClient/ModelBase.h -include/CppRestOpenAPIClient/MultipartFormData.h -include/CppRestOpenAPIClient/Object.h -include/CppRestOpenAPIClient/api/ChannelApi.h -include/CppRestOpenAPIClient/api/MediaApi.h -include/CppRestOpenAPIClient/api/MessagingApi.h -include/CppRestOpenAPIClient/api/ProductsCatalogsApi.h -include/CppRestOpenAPIClient/api/TemplatesApi.h -include/CppRestOpenAPIClient/api/WebhooksApi.h -include/CppRestOpenAPIClient/model/Ack.h -include/CppRestOpenAPIClient/model/AddTemplateRequest.h -include/CppRestOpenAPIClient/model/ChannelExtendedStatistics.h -include/CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h -include/CppRestOpenAPIClient/model/ChannelStatistics.h -include/CppRestOpenAPIClient/model/ChannelStatus.h -include/CppRestOpenAPIClient/model/ChatIdProp.h -include/CppRestOpenAPIClient/model/Commerce.h -include/CppRestOpenAPIClient/model/Commerce_params.h -include/CppRestOpenAPIClient/model/Contacts.h -include/CppRestOpenAPIClient/model/ContactsRequest.h -include/CppRestOpenAPIClient/model/Contacts_contacts_inner.h -include/CppRestOpenAPIClient/model/GetAckInfo.h -include/CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h -include/CppRestOpenAPIClient/model/GetCommerce.h -include/CppRestOpenAPIClient/model/GetCommerce_inner.h -include/CppRestOpenAPIClient/model/GetIP.h -include/CppRestOpenAPIClient/model/GetMe.h -include/CppRestOpenAPIClient/model/GetMe_401_response.h -include/CppRestOpenAPIClient/model/GetMessages.h -include/CppRestOpenAPIClient/model/GetMessages_messages_inner.h -include/CppRestOpenAPIClient/model/GetTemplates.h -include/CppRestOpenAPIClient/model/GetTemplates_templates_inner.h -include/CppRestOpenAPIClient/model/MeComponents.h -include/CppRestOpenAPIClient/model/MediaId.h -include/CppRestOpenAPIClient/model/Message.h -include/CppRestOpenAPIClient/model/MessageIdProp.h -include/CppRestOpenAPIClient/model/PhoneProp.h -include/CppRestOpenAPIClient/model/ReadMessageRequest.h -include/CppRestOpenAPIClient/model/RemoveTemplateRequest.h -include/CppRestOpenAPIClient/model/SendContactRequest.h -include/CppRestOpenAPIClient/model/SendFileRequest.h -include/CppRestOpenAPIClient/model/SendListRequest.h -include/CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h -include/CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h -include/CppRestOpenAPIClient/model/SendLocationRequest.h -include/CppRestOpenAPIClient/model/SendMessageRequest.h -include/CppRestOpenAPIClient/model/SendMessageStatus.h -include/CppRestOpenAPIClient/model/SendProductRequest.h -include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h -include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h -include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h -include/CppRestOpenAPIClient/model/SendTemplateRequest.h -include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h -include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h -include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h -include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h -include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h -include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h -include/CppRestOpenAPIClient/model/SetCommerce.h -include/CppRestOpenAPIClient/model/SetMe.h -include/CppRestOpenAPIClient/model/SetMeRequest.h -include/CppRestOpenAPIClient/model/SetSettings_200_response.h -include/CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h -include/CppRestOpenAPIClient/model/SetWebhookStatus.h -include/CppRestOpenAPIClient/model/Settings.h -include/CppRestOpenAPIClient/model/TemplateCategoryProp.h -include/CppRestOpenAPIClient/model/TemplateComponentsProp.h -include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h -include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h -include/CppRestOpenAPIClient/model/TemplateLanguageProp.h -include/CppRestOpenAPIClient/model/TemplateNamespaceField.h -include/CppRestOpenAPIClient/model/UploadMedia.h -include/CppRestOpenAPIClient/model/WebhookUrl.h -src/ApiClient.cpp -src/ApiConfiguration.cpp -src/ApiException.cpp -src/HttpContent.cpp -src/JsonBody.cpp -src/ModelBase.cpp -src/MultipartFormData.cpp -src/Object.cpp -src/api/ChannelApi.cpp -src/api/MediaApi.cpp -src/api/MessagingApi.cpp -src/api/ProductsCatalogsApi.cpp -src/api/TemplatesApi.cpp -src/api/WebhooksApi.cpp -src/model/Ack.cpp -src/model/AddTemplateRequest.cpp -src/model/ChannelExtendedStatistics.cpp -src/model/ChannelExtendedStatistics_inner.cpp -src/model/ChannelStatistics.cpp -src/model/ChannelStatus.cpp -src/model/ChatIdProp.cpp -src/model/Commerce.cpp -src/model/Commerce_params.cpp -src/model/Contacts.cpp -src/model/ContactsRequest.cpp -src/model/Contacts_contacts_inner.cpp -src/model/GetAckInfo.cpp -src/model/GetAckInfo_hooks_inner.cpp -src/model/GetCommerce.cpp -src/model/GetCommerce_inner.cpp -src/model/GetIP.cpp -src/model/GetMe.cpp -src/model/GetMe_401_response.cpp -src/model/GetMessages.cpp -src/model/GetMessages_messages_inner.cpp -src/model/GetTemplates.cpp -src/model/GetTemplates_templates_inner.cpp -src/model/MeComponents.cpp -src/model/MediaId.cpp -src/model/Message.cpp -src/model/MessageIdProp.cpp -src/model/PhoneProp.cpp -src/model/ReadMessageRequest.cpp -src/model/RemoveTemplateRequest.cpp -src/model/SendContactRequest.cpp -src/model/SendFileRequest.cpp -src/model/SendListRequest.cpp -src/model/SendListRequest_allOf_rows.cpp -src/model/SendListRequest_allOf_sections.cpp -src/model/SendLocationRequest.cpp -src/model/SendMessageRequest.cpp -src/model/SendMessageStatus.cpp -src/model/SendProductRequest.cpp -src/model/SendProductRequest_allOf_action.cpp -src/model/SendProductRequest_allOf_action_product_items.cpp -src/model/SendProductRequest_allOf_action_sections.cpp -src/model/SendTemplateRequest.cpp -src/model/SendTemplateRequest_allOf_currency.cpp -src/model/SendTemplateRequest_allOf_date_time.cpp -src/model/SendTemplateRequest_allOf_date_time_component.cpp -src/model/SendTemplateRequest_allOf_date_time_unix_epoch.cpp -src/model/SendTemplateRequest_allOf_language.cpp -src/model/SendTemplateRequest_allOf_params.cpp -src/model/SetCommerce.cpp -src/model/SetMe.cpp -src/model/SetMeRequest.cpp -src/model/SetSettings_200_response.cpp -src/model/SetSettings_200_response_allOf_update.cpp -src/model/SetWebhookStatus.cpp -src/model/Settings.cpp -src/model/TemplateCategoryProp.cpp -src/model/TemplateComponentsProp.cpp -src/model/TemplateComponentsProp_inner.cpp -src/model/TemplateComponentsProp_inner_buttons_inner.cpp -src/model/TemplateLanguageProp.cpp -src/model/TemplateNamespaceField.cpp -src/model/UploadMedia.cpp -src/model/WebhookUrl.cpp diff --git a/cpp-restsdk/.openapi-generator/VERSION b/cpp-restsdk/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/cpp-restsdk/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/cpp-restsdk/CMakeLists.txt b/cpp-restsdk/CMakeLists.txt deleted file mode 100644 index 366f1b3..0000000 --- a/cpp-restsdk/CMakeLists.txt +++ /dev/null @@ -1,93 +0,0 @@ -# -# one_msg_waba_sdk -# [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail -# -# The version of the OpenAPI document: 1.0.0 -# -# https://openapi-generator.tech -# -# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech). - -cmake_minimum_required (VERSION 3.1) - -project(CppRestOpenAPIClient) - -# Force -fPIC even if the project is configured for building a static library. -set(CMAKE_POSITION_INDEPENDENT_CODE ON) -set(CXX_STANDARD_REQUIRED ON) - -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) -endif() - -find_package(cpprestsdk REQUIRED) -find_package(Boost REQUIRED) - -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) - -file(GLOB_RECURSE HEADER_FILES "include/*.h") -file(GLOB_RECURSE SOURCE_FILES "src/*.cpp") - -add_library(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES}) - -target_compile_options(${PROJECT_NAME} - PRIVATE - $<$,$,$>: - -Wall -Wno-unused-variable> -) - -target_include_directories(${PROJECT_NAME} - PUBLIC - $ - $ -) - -if (UNIX) - message(STATUS "Building client library for Linux/Unix") - if (BUILD_SHARED_LIBS) - target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest) - else() - target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest crypto) - endif() -else() - message(STATUS "Building client library for Windows") - if (BUILD_SHARED_LIBS) - target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest) - else() - target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest bcrypt) - endif() -endif() - -configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) - -install( - TARGETS ${PROJECT_NAME} - EXPORT ${PROJECT_NAME}Targets - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -) - -install( - DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -) - -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} -) - -install( - EXPORT ${PROJECT_NAME}Targets - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} -) \ No newline at end of file diff --git a/cpp-restsdk/Config.cmake.in b/cpp-restsdk/Config.cmake.in deleted file mode 100644 index 9015c2b..0000000 --- a/cpp-restsdk/Config.cmake.in +++ /dev/null @@ -1,5 +0,0 @@ -@PACKAGE_INIT@ - -include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake) - -check_required_components("@PROJECT_NAME@") diff --git a/cpp-restsdk/README.md b/cpp-restsdk/README.md deleted file mode 100644 index c543821..0000000 --- a/cpp-restsdk/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# C++ API client - -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 2.39.0 -- Package version: -- Build package: org.openapitools.codegen.languages.CppRestSdkClientCodegen - -- API namespace: org.openapitools.client.api -- Model namespace: org.openapitools.client.model - -## Installation - -### Prerequisites - -Install [cpprestsdk](https://github.com/Microsoft/cpprestsdk). - -- Windows: `vcpkg install cpprestsdk cpprestsdk:x64-windows boost-uuid boost-uuid:x64-windows` -- Mac: `brew install cpprestsdk` -- Linux: `sudo apt-get install libcpprest-dev` - -### Build - -```sh -cmake -DCPPREST_ROOT=/usr -DCMAKE_CXX_FLAGS="-I/usr/local/opt/openssl/include" -DCMAKE_MODULE_LINKER_FLAGS="-L/usr/local/opt/openssl/lib" -make -``` - -### Build on Windows with Visual Studio (VS2017) - -- Right click on folder containing source code -- Select 'Open in visual studio' -- Once visual studio opens, CMake should show up in top menu bar. -- Select CMake > Build All. - -*Note: If the CMake menu item doesn't show up in Visual Studio, CMake -for Visual Studio must be installed. In this case, open the 'Visual Studio -Installer' application. Select 'modify' Visual Studio 2017. Make sure -'Desktop Development with C++' is installed, and specifically that 'Visual -C++ tools for CMake' is selected in the 'Installation Details' section. - -Also be sure to review the CMakeLists.txt file. Edits are likely required.* - -## Author - -hello@1msg.io - diff --git a/cpp-restsdk/git_push.sh b/cpp-restsdk/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/cpp-restsdk/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/ApiClient.h b/cpp-restsdk/include/CppRestOpenAPIClient/ApiClient.h deleted file mode 100644 index a0c8d63..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/ApiClient.h +++ /dev/null @@ -1,115 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ApiClient.h - * - * This is an API client responsible for stating the HTTP calls - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_ - - -#include "CppRestOpenAPIClient/ApiConfiguration.h" -#include "CppRestOpenAPIClient/ApiException.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/HttpContent.h" - -#if defined (_WIN32) || defined (_WIN64) -#undef U -#endif - -#include -#include - -#include -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -class ApiClient -{ -public: - ApiClient( std::shared_ptr configuration = nullptr ); - virtual ~ApiClient(); - - typedef std::function ResponseHandlerType; - - const ResponseHandlerType& getResponseHandler() const; - void setResponseHandler(const ResponseHandlerType& responseHandler); - - std::shared_ptr getConfiguration() const; - void setConfiguration(std::shared_ptr configuration); - - static utility::string_t parameterToString(utility::string_t value); - static utility::string_t parameterToString(int32_t value); - static utility::string_t parameterToString(int64_t value); - static utility::string_t parameterToString(float value); - static utility::string_t parameterToString(double value); - static utility::string_t parameterToString(const utility::datetime &value); - static utility::string_t parameterToString(bool value); - template - static utility::string_t parameterToString(const std::vector& value); - template - static utility::string_t parameterToString(const std::shared_ptr& value); - - pplx::task callApi( - const utility::string_t& path, - const utility::string_t& method, - const std::map& queryParams, - const std::shared_ptr postBody, - const std::map& headerParams, - const std::map& formParams, - const std::map>& fileParams, - const utility::string_t& contentType - ) const; - -protected: - - ResponseHandlerType m_ResponseHandler; - std::shared_ptr m_Configuration; -}; - -template -utility::string_t ApiClient::parameterToString(const std::vector& value) -{ - utility::stringstream_t ss; - - for( size_t i = 0; i < value.size(); i++) - { - if( i > 0) ss << utility::conversions::to_string_t(", "); - ss << ApiClient::parameterToString(value[i]); - } - - return ss.str(); -} - -template -utility::string_t ApiClient::parameterToString(const std::shared_ptr& value) -{ - return parameterToString(*value.get()); -} - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/ApiConfiguration.h b/cpp-restsdk/include/CppRestOpenAPIClient/ApiConfiguration.h deleted file mode 100644 index 1ec11a7..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/ApiConfiguration.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ApiConfiguration.h - * - * This class represents a single item of a multipart-formdata request. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_ - - - -#include -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -class ApiConfiguration -{ -public: - ApiConfiguration(); - virtual ~ApiConfiguration(); - - const web::http::client::http_client_config& getHttpConfig() const; - void setHttpConfig( web::http::client::http_client_config& value ); - - utility::string_t getBaseUrl() const; - void setBaseUrl( const utility::string_t value ); - - utility::string_t getUserAgent() const; - void setUserAgent( const utility::string_t value ); - - std::map& getDefaultHeaders(); - const std::map& getDefaultHeaders() const; - - utility::string_t getApiKey( const utility::string_t& prefix) const; - void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey ); - -protected: - utility::string_t m_BaseUrl; - std::map m_DefaultHeaders; - std::map m_ApiKeys; - web::http::client::http_client_config m_HttpConfig; - utility::string_t m_UserAgent; -}; - -} -} -} -} -#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/ApiException.h b/cpp-restsdk/include/CppRestOpenAPIClient/ApiException.h deleted file mode 100644 index 7bcc969..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/ApiException.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ApiException.h - * - * This is the exception being thrown in case the api call was not successful - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiException_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_ApiException_H_ - - - -#include -#include - -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -class ApiException - : public web::http::http_exception -{ -public: - ApiException( int errorCode - , const utility::string_t& message - , std::shared_ptr content = nullptr ); - ApiException( int errorCode - , const utility::string_t& message - , std::map& headers - , std::shared_ptr content = nullptr ); - virtual ~ApiException(); - - std::map& getHeaders(); - std::shared_ptr getContent() const; - -protected: - std::shared_ptr m_Content; - std::map m_Headers; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiBase_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/HttpContent.h b/cpp-restsdk/include/CppRestOpenAPIClient/HttpContent.h deleted file mode 100644 index c2a7a87..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/HttpContent.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HttpContent.h - * - * This class represents a single item of a multipart-formdata request. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_ - - - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class HttpContent -{ -public: - HttpContent(); - virtual ~HttpContent(); - - virtual utility::string_t getContentDisposition() const; - virtual void setContentDisposition( const utility::string_t& value ); - - virtual utility::string_t getName() const; - virtual void setName( const utility::string_t& value ); - - virtual utility::string_t getFileName() const; - virtual void setFileName( const utility::string_t& value ); - - virtual utility::string_t getContentType() const; - virtual void setContentType( const utility::string_t& value ); - - virtual std::shared_ptr getData() const; - virtual void setData( std::shared_ptr value ); - - virtual void writeTo( std::ostream& stream ); - -protected: - // NOTE: no utility::string_t here because those strings can only contain ascii - utility::string_t m_ContentDisposition; - utility::string_t m_Name; - utility::string_t m_FileName; - utility::string_t m_ContentType; - std::shared_ptr m_Data; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/IHttpBody.h b/cpp-restsdk/include/CppRestOpenAPIClient/IHttpBody.h deleted file mode 100644 index e1f6018..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/IHttpBody.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * IHttpBody.h - * - * This is the interface for contents that can be sent to a remote HTTP server. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_ - - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class IHttpBody -{ -public: - virtual ~IHttpBody() { } - - virtual void writeTo( std::ostream& stream ) = 0; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/JsonBody.h b/cpp-restsdk/include/CppRestOpenAPIClient/JsonBody.h deleted file mode 100644 index ece9fdc..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/JsonBody.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * JsonBody.h - * - * This is a JSON http body which can be submitted via http - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_ - - -#include "CppRestOpenAPIClient/IHttpBody.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class JsonBody - : public IHttpBody -{ -public: - JsonBody( const web::json::value& value ); - virtual ~JsonBody(); - - void writeTo( std::ostream& target ) override; - -protected: - web::json::value m_Json; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/ModelBase.h b/cpp-restsdk/include/CppRestOpenAPIClient/ModelBase.h deleted file mode 100644 index 7375356..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/ModelBase.h +++ /dev/null @@ -1,343 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ModelBase.h - * - * This is the base class for all model classes - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_ - - - -#include "CppRestOpenAPIClient/HttpContent.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include -#include - -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class ModelBase -{ -public: - ModelBase(); - virtual ~ModelBase(); - - virtual void validate() = 0; - - virtual web::json::value toJson() const = 0; - virtual bool fromJson( const web::json::value& json ) = 0; - - virtual void toMultipart( std::shared_ptr multipart, const utility::string_t& namePrefix ) const = 0; - virtual bool fromMultiPart( std::shared_ptr multipart, const utility::string_t& namePrefix ) = 0; - - virtual bool isSet() const; - - static utility::string_t toString( const bool val ); - static utility::string_t toString( const float val ); - static utility::string_t toString( const double val ); - static utility::string_t toString( const int32_t val ); - static utility::string_t toString( const int64_t val ); - static utility::string_t toString( const utility::string_t &val ); - static utility::string_t toString( const utility::datetime &val ); - static utility::string_t toString( const web::json::value &val ); - static utility::string_t toString( const std::shared_ptr& val ); - template - static utility::string_t toString( const std::shared_ptr& val ); - template - static utility::string_t toString( const std::vector & val ); - - static web::json::value toJson( bool val ); - static web::json::value toJson( float val ); - static web::json::value toJson( double val ); - static web::json::value toJson( int32_t val ); - static web::json::value toJson( int64_t val ); - static web::json::value toJson( const utility::string_t& val ); - static web::json::value toJson( const utility::datetime& val ); - static web::json::value toJson( const web::json::value& val ); - static web::json::value toJson( const std::shared_ptr& val ); - template - static web::json::value toJson( const std::shared_ptr& val ); - static web::json::value toJson( const std::shared_ptr& val ); - template - static web::json::value toJson( const std::vector& val ); - template - static web::json::value toJson( const std::map& val ); - - static bool fromString( const utility::string_t& val, bool & ); - static bool fromString( const utility::string_t& val, float & ); - static bool fromString( const utility::string_t& val, double & ); - static bool fromString( const utility::string_t& val, int32_t & ); - static bool fromString( const utility::string_t& val, int64_t & ); - static bool fromString( const utility::string_t& val, utility::string_t & ); - static bool fromString( const utility::string_t& val, utility::datetime & ); - static bool fromString( const utility::string_t& val, web::json::value & ); - static bool fromString( const utility::string_t& val, std::shared_ptr & ); - template - static bool fromString( const utility::string_t& val, std::shared_ptr& ); - static bool fromString( const utility::string_t& val, std::shared_ptr& outVal ); - template - static bool fromString( const utility::string_t& val, std::vector & ); - template - static bool fromString( const utility::string_t& val, std::map & ); - - static bool fromJson( const web::json::value& val, bool & ); - static bool fromJson( const web::json::value& val, float & ); - static bool fromJson( const web::json::value& val, double & ); - static bool fromJson( const web::json::value& val, int32_t & ); - static bool fromJson( const web::json::value& val, int64_t & ); - static bool fromJson( const web::json::value& val, utility::string_t & ); - static bool fromJson( const web::json::value& val, utility::datetime & ); - static bool fromJson( const web::json::value& val, web::json::value & ); - static bool fromJson( const web::json::value& val, std::shared_ptr & ); - template - static bool fromJson( const web::json::value& val, std::shared_ptr& ); - static bool fromJson( const web::json::value& val, std::shared_ptr &outVal ); - template - static bool fromJson( const web::json::value& val, std::vector & ); - template - static bool fromJson( const web::json::value& val, std::map & ); - - - static std::shared_ptr toHttpContent( const utility::string_t& name, bool value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - static std::shared_ptr toHttpContent( const utility::string_t& name, float value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - static std::shared_ptr toHttpContent( const utility::string_t& name, double value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - static std::shared_ptr toHttpContent( const utility::string_t& name, int32_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - static std::shared_ptr toHttpContent( const utility::string_t& name, int64_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - static std::shared_ptr toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType = utility::conversions::to_string_t("")); - static std::shared_ptr toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType = utility::conversions::to_string_t("")); - static std::shared_ptr toHttpContent( const utility::string_t& name, const web::json::value& value, const utility::string_t& contentType = utility::conversions::to_string_t("application/json") ); - static std::shared_ptr toHttpContent( const utility::string_t& name, const std::shared_ptr& ); - template - static std::shared_ptr toHttpContent( const utility::string_t& name, const std::shared_ptr& , const utility::string_t& contentType = utility::conversions::to_string_t("application/json") ); - static std::shared_ptr toHttpContent(const utility::string_t& name, const std::shared_ptr& value , const utility::string_t& contentType = utility::conversions::to_string_t("application/json") ); - template - static std::shared_ptr toHttpContent( const utility::string_t& name, const std::vector& value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - template - static std::shared_ptr toHttpContent( const utility::string_t& name, const std::map& value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); - - static bool fromHttpContent( std::shared_ptr val, bool & ); - static bool fromHttpContent( std::shared_ptr val, float & ); - static bool fromHttpContent( std::shared_ptr val, double & ); - static bool fromHttpContent( std::shared_ptr val, int64_t & ); - static bool fromHttpContent( std::shared_ptr val, int32_t & ); - static bool fromHttpContent( std::shared_ptr val, utility::string_t & ); - static bool fromHttpContent( std::shared_ptr val, utility::datetime & ); - static bool fromHttpContent( std::shared_ptr val, web::json::value & ); - static bool fromHttpContent( std::shared_ptr val, std::shared_ptr& ); - template - static bool fromHttpContent( std::shared_ptr val, std::shared_ptr& ); - template - static bool fromHttpContent( std::shared_ptr val, std::vector & ); - template - static bool fromHttpContent( std::shared_ptr val, std::map & ); - - static utility::string_t toBase64( utility::string_t value ); - static utility::string_t toBase64( std::shared_ptr value ); - static std::shared_ptr fromBase64( const utility::string_t& encoded ); -protected: - bool m_IsSet; -}; - -template -utility::string_t ModelBase::toString( const std::shared_ptr& val ) -{ - utility::stringstream_t ss; - if( val != nullptr ) - { - val->toJson().serialize(ss); - } - return utility::string_t(ss.str()); -} -template -utility::string_t ModelBase::toString( const std::vector & val ) -{ - utility::string_t strArray; - for ( const auto &item : val ) - { - strArray.append( toString(item) + "," ); - } - if (val.count() > 0) - { - strArray.pop_back(); - } - return strArray; -} -template -web::json::value ModelBase::toJson( const std::shared_ptr& val ) -{ - web::json::value retVal; - if(val != nullptr) - { - retVal = val->toJson(); - } - return retVal; -} -template -web::json::value ModelBase::toJson( const std::vector& value ) -{ - std::vector ret; - for ( const auto& x : value ) - { - ret.push_back( toJson(x) ); - } - return web::json::value::array(ret); -} -template -web::json::value ModelBase::toJson( const std::map& val ) -{ - web::json::value obj; - for ( const auto &itemkey : val ) - { - obj[itemkey.first] = toJson( itemkey.second ); - } - return obj; -} -template -bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr& outVal ) -{ - bool ok = false; - if(outVal == nullptr) - { - outVal = std::shared_ptr(new T()); - } - if( outVal != nullptr ) - { - ok = outVal->fromJson(web::json::value::parse(val)); - } - return ok; -} -template -bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr &outVal ) -{ - bool ok = false; - if(outVal == nullptr) - { - outVal = std::shared_ptr(new T()); - } - if( outVal != nullptr ) - { - ok = outVal->fromJson(val); - } - return ok; -} -template -bool ModelBase::fromJson( const web::json::value& val, std::vector &outVal ) -{ - bool ok = true; - if (val.is_array()) - { - for (const web::json::value & jitem : val.as_array()) - { - T item; - ok &= fromJson(jitem, item); - outVal.push_back(item); - } - } - else - { - ok = false; - } - return ok; -} -template -bool ModelBase::fromJson( const web::json::value& jval, std::map &outVal ) -{ - bool ok = true; - if ( jval.is_object() ) - { - auto obj = jval.as_object(); - for( auto objItr = obj.begin() ; objItr != obj.end() ; objItr++ ) - { - T itemVal; - ok &= fromJson(objItr->second, itemVal); - outVal.insert(std::pair(objItr->first, itemVal)); - } - } - else - { - ok = false; - } - return ok; -} -template -std::shared_ptr ModelBase::toHttpContent(const utility::string_t& name, const std::shared_ptr& value , const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - if (value != nullptr ) - { - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string( value->toJson().serialize() ) ) ) ); - } - return content; -} -template -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, const std::vector& value, const utility::string_t& contentType ) -{ - web::json::value json_array = ModelBase::toJson(value); - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string(json_array.serialize()) ) ) ); - return content; -} -template -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, const std::map& value, const utility::string_t& contentType ) -{ - web::json::value jobj = ModelBase::toJson(value); - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string(jobj.serialize()) ) ) ); - return content; -} -template -bool ModelBase::fromHttpContent( std::shared_ptr val, std::shared_ptr& outVal ) -{ - utility::string_t str; - if(val == nullptr) return false; - if( outVal == nullptr ) - { - outVal = std::shared_ptr(new T()); - } - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -template -bool ModelBase::fromHttpContent( std::shared_ptr val, std::vector & ) -{ - return true; -} -template -bool ModelBase::fromHttpContent( std::shared_ptr val, std::map & ) -{ - return true; -} -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/MultipartFormData.h b/cpp-restsdk/include/CppRestOpenAPIClient/MultipartFormData.h deleted file mode 100644 index c9a4617..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/MultipartFormData.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * MultipartFormData.h - * - * This class represents a container for building application/x-multipart-formdata requests. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ - - -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/HttpContent.h" - -#include - -#include -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class MultipartFormData - : public IHttpBody -{ -public: - MultipartFormData(); - MultipartFormData(const utility::string_t& boundary); - virtual ~MultipartFormData(); - - virtual void add( std::shared_ptr content ); - virtual utility::string_t getBoundary(); - virtual std::shared_ptr getContent(const utility::string_t& name) const; - virtual bool hasContent(const utility::string_t& name) const; - virtual void writeTo( std::ostream& target ); - -protected: - std::vector> m_Contents; - utility::string_t m_Boundary; - std::map> m_ContentLookup; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/Object.h b/cpp-restsdk/include/CppRestOpenAPIClient/Object.h deleted file mode 100644 index 3714aab..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/Object.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Object.h - * - * This is the implementation of a JSON object. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class Object : public ModelBase -{ -public: - Object(); - virtual ~Object(); - - ///////////////////////////////////////////// - /// ModelBase overrides - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Object manipulation - web::json::value getValue(const utility::string_t& key) const; - void setValue(const utility::string_t& key, const web::json::value& value); - -private: - web::json::value m_object; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/api/ChannelApi.h b/cpp-restsdk/include/CppRestOpenAPIClient/api/ChannelApi.h deleted file mode 100644 index 7adb7bf..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/api/ChannelApi.h +++ /dev/null @@ -1,146 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ChannelApi.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_ChannelApi_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_ChannelApi_H_ - - - -#include "CppRestOpenAPIClient/ApiClient.h" - -#include "CppRestOpenAPIClient/model/ChannelExtendedStatistics.h" -#include "CppRestOpenAPIClient/model/ChannelStatistics.h" -#include "CppRestOpenAPIClient/model/ChannelStatus.h" -#include "CppRestOpenAPIClient/model/GetCommerce.h" -#include "CppRestOpenAPIClient/model/GetIP.h" -#include "CppRestOpenAPIClient/model/GetMe.h" -#include "CppRestOpenAPIClient/model/GetMe_401_response.h" -#include "CppRestOpenAPIClient/model/SetMe.h" -#include "CppRestOpenAPIClient/model/SetMeRequest.h" -#include "CppRestOpenAPIClient/model/SetSettings_200_response.h" -#include "CppRestOpenAPIClient/model/Settings.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - - - -class ChannelApi -{ -public: - - explicit ChannelApi( std::shared_ptr apiClient ); - - virtual ~ChannelApi(); - - /// - /// Get Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - pplx::task> getCommerce( - ) const; - /// - /// Get Extended Channel statistics - /// - /// - /// Get channel usage extended statistics - /// - pplx::task> getExtendedStatistics( - ) const; - /// - /// Get Profile Info - /// - /// - /// Use this edge to retrieve your profile's About info - /// - pplx::task> getMe( - ) const; - /// - /// Get Settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - pplx::task> getSettings( - ) const; - /// - /// Get Channel statistics - /// - /// - /// Get channel usage statistics - /// - /// Month and year in format mm.YYYY. (optional, default to utility::conversions::to_string_t("")) - pplx::task> getStatistics( - boost::optional date - ) const; - /// - /// Get Status - /// - /// - /// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - pplx::task> getStatus( - ) const; - /// - /// Get channel server IP - /// - /// - /// - /// - pplx::task> outputIP( - ) const; - /// - /// Change user info - /// - /// - /// Change user info - /// - /// - pplx::task> setMe( - std::shared_ptr setMeRequest - ) const; - /// - /// Set settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// - pplx::task> setSettings( - std::shared_ptr settings - ) const; - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_ChannelApi_H_ */ - diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/api/MediaApi.h b/cpp-restsdk/include/CppRestOpenAPIClient/api/MediaApi.h deleted file mode 100644 index 8cb8b9c..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/api/MediaApi.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * MediaApi.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_MediaApi_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_MediaApi_H_ - - - -#include "CppRestOpenAPIClient/ApiClient.h" - -#include "CppRestOpenAPIClient/model/MediaId.h" -#include "CppRestOpenAPIClient/model/UploadMedia.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - - - -class MediaApi -{ -public: - - explicit MediaApi( std::shared_ptr apiClient ); - - virtual ~MediaApi(); - - /// - /// Upload media & get mediaId - /// - /// - /// Upload media and get mediaId. Uploaded media can be sent in template - /// - /// - pplx::task> uploadMedia( - std::shared_ptr uploadMedia - ) const; - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_MediaApi_H_ */ - diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/api/MessagingApi.h b/cpp-restsdk/include/CppRestOpenAPIClient/api/MessagingApi.h deleted file mode 100644 index 814d38c..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/api/MessagingApi.h +++ /dev/null @@ -1,151 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * MessagingApi.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_MessagingApi_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_MessagingApi_H_ - - - -#include "CppRestOpenAPIClient/ApiClient.h" - -#include "CppRestOpenAPIClient/model/GetMe_401_response.h" -#include "CppRestOpenAPIClient/model/GetMessages.h" -#include "CppRestOpenAPIClient/model/ReadMessageRequest.h" -#include "CppRestOpenAPIClient/model/SendContactRequest.h" -#include "CppRestOpenAPIClient/model/SendFileRequest.h" -#include "CppRestOpenAPIClient/model/SendListRequest.h" -#include "CppRestOpenAPIClient/model/SendLocationRequest.h" -#include "CppRestOpenAPIClient/model/SendMessageRequest.h" -#include "CppRestOpenAPIClient/model/SendMessageStatus.h" -#include "CppRestOpenAPIClient/model/SetMe.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - - - -class MessagingApi -{ -public: - - explicit MessagingApi( std::shared_ptr apiClient ); - - virtual ~MessagingApi(); - - /// - /// Get messages list - /// - /// - /// - /// - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional, default to false) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional, default to 0) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional, default to 0) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional, default to 0) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional, default to utility::conversions::to_string_t("")) - /// Filter messages received after specified time. Example: 1665396610 (optional, default to 0) - /// Filter messages received before specified time. Example: 1665396610 (optional, default to 0) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional, default to utility::conversions::to_string_t("")) - pplx::task> messagesList( - boost::optional last, - boost::optional lastMessageNumber, - boost::optional firstMessageNumber, - boost::optional limit, - boost::optional chatId, - boost::optional minTime, - boost::optional maxTime, - boost::optional msgId - ) const; - /// - /// Mark message as read - /// - /// - /// - /// - /// (optional) - pplx::task> readMessage( - boost::optional> readMessageRequest - ) const; - /// - /// Send a Contact - /// - /// - /// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// - pplx::task> sendContact( - std::shared_ptr sendContactRequest - ) const; - /// - /// Send a File - /// - /// - /// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// - pplx::task> sendFile( - std::shared_ptr sendFileRequest - ) const; - /// - /// Send List Message - /// - /// - /// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// - pplx::task> sendList( - std::shared_ptr sendListRequest - ) const; - /// - /// Send a Location - /// - /// - /// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// - pplx::task> sendLocation( - std::shared_ptr sendLocationRequest - ) const; - /// - /// Send a Message - /// - /// - /// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// - pplx::task> sendMessage( - std::shared_ptr sendMessageRequest - ) const; - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_MessagingApi_H_ */ - diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/api/ProductsCatalogsApi.h b/cpp-restsdk/include/CppRestOpenAPIClient/api/ProductsCatalogsApi.h deleted file mode 100644 index 4905e3e..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/api/ProductsCatalogsApi.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ProductsCatalogsApi.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_ProductsCatalogsApi_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_ProductsCatalogsApi_H_ - - - -#include "CppRestOpenAPIClient/ApiClient.h" - -#include "CppRestOpenAPIClient/model/Commerce.h" -#include "CppRestOpenAPIClient/model/GetMe_401_response.h" -#include "CppRestOpenAPIClient/model/SendMessageStatus.h" -#include "CppRestOpenAPIClient/model/SendProductRequest.h" -#include "CppRestOpenAPIClient/model/SetCommerce.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - - - -class ProductsCatalogsApi -{ -public: - - explicit ProductsCatalogsApi( std::shared_ptr apiClient ); - - virtual ~ProductsCatalogsApi(); - - /// - /// Send a Product - /// - /// - /// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// - pplx::task> sendProduct( - std::shared_ptr sendProductRequest - ) const; - /// - /// Set Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// - pplx::task> setCommerce( - std::shared_ptr commerce - ) const; - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_ProductsCatalogsApi_H_ */ - diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/api/TemplatesApi.h b/cpp-restsdk/include/CppRestOpenAPIClient/api/TemplatesApi.h deleted file mode 100644 index 97f5ae7..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/api/TemplatesApi.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplatesApi.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_TemplatesApi_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_TemplatesApi_H_ - - - -#include "CppRestOpenAPIClient/ApiClient.h" - -#include "CppRestOpenAPIClient/model/AddTemplateRequest.h" -#include "CppRestOpenAPIClient/model/GetMe_401_response.h" -#include "CppRestOpenAPIClient/model/GetTemplates.h" -#include "CppRestOpenAPIClient/Object.h" -#include "CppRestOpenAPIClient/model/RemoveTemplateRequest.h" -#include "CppRestOpenAPIClient/model/SendMessageStatus.h" -#include "CppRestOpenAPIClient/model/SendTemplateRequest.h" -#include "CppRestOpenAPIClient/model/SetMe.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - - - -class TemplatesApi -{ -public: - - explicit TemplatesApi( std::shared_ptr apiClient ); - - virtual ~TemplatesApi(); - - /// - /// Create template - /// - /// - /// Create new template for sending. - /// - /// - pplx::task> addTemplate( - std::shared_ptr addTemplateRequest - ) const; - /// - /// Remove template - /// - /// - /// Deleted template can not be restored. - /// - /// - pplx::task> removeTemplate( - std::shared_ptr removeTemplateRequest - ) const; - /// - /// Send Template Message - /// - /// - /// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// - pplx::task> sendTemplate( - std::shared_ptr sendTemplateRequest - ) const; - /// - /// Get templates list - /// - /// - /// - /// - pplx::task> templatesList( - ) const; - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_TemplatesApi_H_ */ - diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/api/WebhooksApi.h b/cpp-restsdk/include/CppRestOpenAPIClient/api/WebhooksApi.h deleted file mode 100644 index 7257b72..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/api/WebhooksApi.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * WebhooksApi.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_API_WebhooksApi_H_ -#define ORG_OPENAPITOOLS_CLIENT_API_WebhooksApi_H_ - - - -#include "CppRestOpenAPIClient/ApiClient.h" - -#include "CppRestOpenAPIClient/model/GetAckInfo.h" -#include "CppRestOpenAPIClient/model/GetMe_401_response.h" -#include "CppRestOpenAPIClient/model/SetWebhookStatus.h" -#include "CppRestOpenAPIClient/model/WebhookUrl.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - - - -class WebhooksApi -{ -public: - - explicit WebhooksApi( std::shared_ptr apiClient ); - - virtual ~WebhooksApi(); - - /// - /// Check ACKs - /// - /// - /// - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - pplx::task> ackHookInfo( - utility::string_t messageId - ) const; - /// - /// Set webhook - /// - /// - /// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// - pplx::task> setWebhook( - std::shared_ptr webhookUrl - ) const; - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_API_WebhooksApi_H_ */ - diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Ack.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Ack.h deleted file mode 100644 index a5e548c..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Ack.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Ack.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Ack_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Ack_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class Ack - : public ModelBase -{ -public: - Ack(); - virtual ~Ack(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Ack members - - /// - /// unique id of message - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// chat ID - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// type of the message status - /// - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - - void setStatus(const utility::string_t& value); - - -protected: - utility::string_t m_Id; - bool m_IdIsSet; - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - utility::string_t m_Status; - bool m_StatusIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Ack_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/AddTemplateRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/AddTemplateRequest.h deleted file mode 100644 index 774e3c0..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/AddTemplateRequest.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * AddTemplateRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_AddTemplateRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_AddTemplateRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/TemplateComponentsProp.h" -#include "CppRestOpenAPIClient/model/TemplateCategoryProp.h" -#include "CppRestOpenAPIClient/model/TemplateLanguageProp.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class AddTemplateRequest - : public ModelBase -{ -public: - AddTemplateRequest(); - virtual ~AddTemplateRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// AddTemplateRequest members - - /// - /// Name of template - /// - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - - void setName(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getCategory() const; - bool categoryIsSet() const; - void unsetCategory(); - - void setCategory(const std::shared_ptr& value); - - /// - /// - /// - std::shared_ptr getComponents() const; - bool componentsIsSet() const; - void unsetComponents(); - - void setComponents(const std::shared_ptr& value); - - /// - /// - /// - std::shared_ptr getLanguage() const; - bool languageIsSet() const; - void unsetLanguage(); - - void setLanguage(const std::shared_ptr& value); - - -protected: - utility::string_t m_Name; - bool m_NameIsSet; - std::shared_ptr m_Category; - bool m_CategoryIsSet; - std::shared_ptr m_Components; - bool m_ComponentsIsSet; - std::shared_ptr m_Language; - bool m_LanguageIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_AddTemplateRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics.h deleted file mode 100644 index 7496c6d..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ChannelExtendedStatistics.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelExtendedStatistics_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelExtendedStatistics_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ChannelExtendedStatistics - : public ModelBase -{ -public: - ChannelExtendedStatistics(); - virtual ~ChannelExtendedStatistics(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ChannelExtendedStatistics members - - -protected: -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelExtendedStatistics_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h deleted file mode 100644 index ed65e87..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h +++ /dev/null @@ -1,210 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ChannelExtendedStatistics_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelExtendedStatistics_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelExtendedStatistics_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ChannelExtendedStatistics_inner - : public ModelBase -{ -public: - ChannelExtendedStatistics_inner(); - virtual ~ChannelExtendedStatistics_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ChannelExtendedStatistics_inner members - - /// - /// - /// - int32_t getBusinessInitiatedPaidQuantity() const; - bool businessInitiatedPaidQuantityIsSet() const; - void unsetBusiness_initiated_paid_quantity(); - - void setBusinessInitiatedPaidQuantity(int32_t value); - - /// - /// - /// - double getBusinessInitiatedPrice() const; - bool businessInitiatedPriceIsSet() const; - void unsetBusiness_initiated_price(); - - void setBusinessInitiatedPrice(double value); - - /// - /// - /// - int32_t getBusinessInitiatedQuantity() const; - bool businessInitiatedQuantityIsSet() const; - void unsetBusiness_initiated_quantity(); - - void setBusinessInitiatedQuantity(int32_t value); - - /// - /// - /// - int32_t getFreeEntryPoint() const; - bool freeEntryPointIsSet() const; - void unsetFree_entry_point(); - - void setFreeEntryPoint(int32_t value); - - /// - /// - /// - int32_t getFreeQuantity() const; - bool freeQuantityIsSet() const; - void unsetFree_quantity(); - - void setFreeQuantity(int32_t value); - - /// - /// - /// - int32_t getFreeTier() const; - bool freeTierIsSet() const; - void unsetFree_tier(); - - void setFreeTier(int32_t value); - - /// - /// - /// - int32_t getPaidQuantity() const; - bool paidQuantityIsSet() const; - void unsetPaid_quantity(); - - void setPaidQuantity(int32_t value); - - /// - /// - /// - utility::string_t getPeriodDate() const; - bool periodDateIsSet() const; - void unsetPeriod_date(); - - void setPeriodDate(const utility::string_t& value); - - /// - /// - /// - double getQuantity() const; - bool quantityIsSet() const; - void unsetQuantity(); - - void setQuantity(double value); - - /// - /// - /// - double getTotalPrice() const; - bool totalPriceIsSet() const; - void unsetTotal_price(); - - void setTotalPrice(double value); - - /// - /// - /// - int32_t getUserInitiatedPaidQuantity() const; - bool userInitiatedPaidQuantityIsSet() const; - void unsetUser_initiated_paid_quantity(); - - void setUserInitiatedPaidQuantity(int32_t value); - - /// - /// - /// - double getUserInitiatedPrice() const; - bool userInitiatedPriceIsSet() const; - void unsetUser_initiated_price(); - - void setUserInitiatedPrice(double value); - - /// - /// - /// - int32_t getUserInitiatedQuantity() const; - bool userInitiatedQuantityIsSet() const; - void unsetUser_initiated_quantity(); - - void setUserInitiatedQuantity(int32_t value); - - -protected: - int32_t m_Business_initiated_paid_quantity; - bool m_Business_initiated_paid_quantityIsSet; - double m_Business_initiated_price; - bool m_Business_initiated_priceIsSet; - int32_t m_Business_initiated_quantity; - bool m_Business_initiated_quantityIsSet; - int32_t m_Free_entry_point; - bool m_Free_entry_pointIsSet; - int32_t m_Free_quantity; - bool m_Free_quantityIsSet; - int32_t m_Free_tier; - bool m_Free_tierIsSet; - int32_t m_Paid_quantity; - bool m_Paid_quantityIsSet; - utility::string_t m_Period_date; - bool m_Period_dateIsSet; - double m_Quantity; - bool m_QuantityIsSet; - double m_Total_price; - bool m_Total_priceIsSet; - int32_t m_User_initiated_paid_quantity; - bool m_User_initiated_paid_quantityIsSet; - double m_User_initiated_price; - bool m_User_initiated_priceIsSet; - int32_t m_User_initiated_quantity; - bool m_User_initiated_quantityIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelExtendedStatistics_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatistics.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatistics.h deleted file mode 100644 index 2a70d0f..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatistics.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ChannelStatistics.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelStatistics_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelStatistics_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ChannelStatistics - : public ModelBase -{ -public: - ChannelStatistics(); - virtual ~ChannelStatistics(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ChannelStatistics members - - /// - /// - /// - utility::string_t getDate() const; - bool dateIsSet() const; - void unsetdate(); - - void setDate(const utility::string_t& value); - - /// - /// - /// - double getTemplatesCost() const; - bool templatesCostIsSet() const; - void unsetTemplates_cost(); - - void setTemplatesCost(double value); - - -protected: - utility::string_t m_date; - bool m_dateIsSet; - double m_Templates_cost; - bool m_Templates_costIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelStatistics_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatus.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatus.h deleted file mode 100644 index 41edb6b..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChannelStatus.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ChannelStatus.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelStatus_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelStatus_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ChannelStatus - : public ModelBase -{ -public: - ChannelStatus(); - virtual ~ChannelStatus(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ChannelStatus members - - /// - /// channel Status - /// - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - - void setStatus(const utility::string_t& value); - - -protected: - utility::string_t m_Status; - bool m_StatusIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ChannelStatus_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChatIdProp.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ChatIdProp.h deleted file mode 100644 index 5ec8dc3..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ChatIdProp.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ChatIdProp.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ChatIdProp_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ChatIdProp_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ChatIdProp - : public ModelBase -{ -public: - ChatIdProp(); - virtual ~ChatIdProp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ChatIdProp members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ChatIdProp_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce.h deleted file mode 100644 index 050ecb1..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Commerce.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Commerce_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Commerce_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/Commerce_params.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class Commerce_params; - -/// -/// -/// -class Commerce - : public ModelBase -{ -public: - Commerce(); - virtual ~Commerce(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Commerce members - - /// - /// - /// - std::shared_ptr getParams() const; - bool paramsIsSet() const; - void unsetParams(); - - void setParams(const std::shared_ptr& value); - - -protected: - std::shared_ptr m_Params; - bool m_ParamsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Commerce_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce_params.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce_params.h deleted file mode 100644 index fe27822..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Commerce_params.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Commerce_params.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Commerce_params_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Commerce_params_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class Commerce_params - : public ModelBase -{ -public: - Commerce_params(); - virtual ~Commerce_params(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Commerce_params members - - /// - /// - /// - bool isIsCartEnabled() const; - bool isCartEnabledIsSet() const; - void unsetIs_cart_enabled(); - - void setIsCartEnabled(bool value); - - /// - /// - /// - bool isIsCatalogVisible() const; - bool isCatalogVisibleIsSet() const; - void unsetIs_catalog_visible(); - - void setIsCatalogVisible(bool value); - - -protected: - bool m_Is_cart_enabled; - bool m_Is_cart_enabledIsSet; - bool m_Is_catalog_visible; - bool m_Is_catalog_visibleIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Commerce_params_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts.h deleted file mode 100644 index 64b57c1..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Contacts.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Contacts_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Contacts_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/Contacts_contacts_inner.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class Contacts_contacts_inner; - -/// -/// -/// -class Contacts - : public ModelBase -{ -public: - Contacts(); - virtual ~Contacts(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Contacts members - - /// - /// List of checked numbers - /// - std::vector>& getContacts(); - bool contactsIsSet() const; - void unsetContacts(); - - void setContacts(const std::vector>& value); - - -protected: - std::vector> m_Contacts; - bool m_ContactsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Contacts_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ContactsRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ContactsRequest.h deleted file mode 100644 index d0a6546..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ContactsRequest.h +++ /dev/null @@ -1,101 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ContactsRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ContactsRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ContactsRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ContactsRequest - : public ModelBase -{ -public: - ContactsRequest(); - virtual ~ContactsRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ContactsRequest members - - /// - /// Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) - /// - utility::string_t getBlocking() const; - bool blockingIsSet() const; - void unsetBlocking(); - - void setBlocking(const utility::string_t& value); - - /// - /// Using cache: *true* - ignore cache *false* - use cache (default) - /// - bool isForceCheck() const; - bool forceCheckIsSet() const; - void unsetForce_check(); - - void setForceCheck(bool value); - - /// - /// Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] - /// - std::vector& getContacts(); - bool contactsIsSet() const; - void unsetContacts(); - - void setContacts(const std::vector& value); - - -protected: - utility::string_t m_Blocking; - bool m_BlockingIsSet; - bool m_Force_check; - bool m_Force_checkIsSet; - std::vector m_Contacts; - bool m_ContactsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ContactsRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts_contacts_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts_contacts_inner.h deleted file mode 100644 index 3676a16..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Contacts_contacts_inner.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Contacts_contacts_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Contacts_contacts_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Contacts_contacts_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class Contacts_contacts_inner - : public ModelBase -{ -public: - Contacts_contacts_inner(); - virtual ~Contacts_contacts_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Contacts_contacts_inner members - - /// - /// Sent value - /// - utility::string_t getInput() const; - bool inputIsSet() const; - void unsetInput(); - - void setInput(const utility::string_t& value); - - /// - /// Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending - /// - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - - void setStatus(const utility::string_t& value); - - /// - /// Formatted contact phone - /// - utility::string_t getWaId() const; - bool waIdIsSet() const; - void unsetWa_id(); - - void setWaId(const utility::string_t& value); - - -protected: - utility::string_t m_Input; - bool m_InputIsSet; - utility::string_t m_Status; - bool m_StatusIsSet; - utility::string_t m_Wa_id; - bool m_Wa_idIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Contacts_contacts_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo.h deleted file mode 100644 index 134f4cc..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetAckInfo.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetAckInfo_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetAckInfo_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class GetAckInfo_hooks_inner; - -/// -/// -/// -class GetAckInfo - : public ModelBase -{ -public: - GetAckInfo(); - virtual ~GetAckInfo(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetAckInfo members - - /// - /// - /// - std::vector>& getHooks(); - bool hooksIsSet() const; - void unsetHooks(); - - void setHooks(const std::vector>& value); - - -protected: - std::vector> m_Hooks; - bool m_HooksIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetAckInfo_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h deleted file mode 100644 index ebfb409..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h +++ /dev/null @@ -1,145 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetAckInfo_hooks_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetAckInfo_hooks_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetAckInfo_hooks_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/Object.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetAckInfo_hooks_inner - : public ModelBase -{ -public: - GetAckInfo_hooks_inner(); - virtual ~GetAckInfo_hooks_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetAckInfo_hooks_inner members - - /// - /// - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// - /// - utility::string_t getType() const; - bool typeIsSet() const; - void unsetType(); - - void setType(const utility::string_t& value); - - /// - /// - /// - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - - void setStatus(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getPricing() const; - bool pricingIsSet() const; - void unsetPricing(); - - void setPricing(const std::shared_ptr& value); - - /// - /// - /// - utility::string_t getTimestamp() const; - bool timestampIsSet() const; - void unsetTimestamp(); - - void setTimestamp(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getConversation() const; - bool conversationIsSet() const; - void unsetConversation(); - - void setConversation(const std::shared_ptr& value); - - /// - /// - /// - utility::string_t getRecipientId() const; - bool recipientIdIsSet() const; - void unsetRecipient_id(); - - void setRecipientId(const utility::string_t& value); - - -protected: - utility::string_t m_Id; - bool m_IdIsSet; - utility::string_t m_Type; - bool m_TypeIsSet; - utility::string_t m_Status; - bool m_StatusIsSet; - std::shared_ptr m_Pricing; - bool m_PricingIsSet; - utility::string_t m_Timestamp; - bool m_TimestampIsSet; - std::shared_ptr m_Conversation; - bool m_ConversationIsSet; - utility::string_t m_Recipient_id; - bool m_Recipient_idIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetAckInfo_hooks_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce.h deleted file mode 100644 index d18ab9a..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetCommerce.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetCommerce_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetCommerce_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/GetCommerce_inner.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetCommerce - : public ModelBase -{ -public: - GetCommerce(); - virtual ~GetCommerce(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetCommerce members - - -protected: -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetCommerce_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce_inner.h deleted file mode 100644 index 830bd73..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetCommerce_inner.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetCommerce_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetCommerce_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetCommerce_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetCommerce_inner - : public ModelBase -{ -public: - GetCommerce_inner(); - virtual ~GetCommerce_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetCommerce_inner members - - /// - /// - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// - /// - bool isIsCartEnabled() const; - bool isCartEnabledIsSet() const; - void unsetIs_cart_enabled(); - - void setIsCartEnabled(bool value); - - /// - /// - /// - bool isIsCatalogVisible() const; - bool isCatalogVisibleIsSet() const; - void unsetIs_catalog_visible(); - - void setIsCatalogVisible(bool value); - - -protected: - utility::string_t m_Id; - bool m_IdIsSet; - bool m_Is_cart_enabled; - bool m_Is_cart_enabledIsSet; - bool m_Is_catalog_visible; - bool m_Is_catalog_visibleIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetCommerce_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetIP.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetIP.h deleted file mode 100644 index 0607178..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetIP.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetIP.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetIP_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetIP_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetIP - : public ModelBase -{ -public: - GetIP(); - virtual ~GetIP(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetIP members - - /// - /// - /// - utility::string_t getResult() const; - bool resultIsSet() const; - void unsetResult(); - - void setResult(const utility::string_t& value); - - -protected: - utility::string_t m_Result; - bool m_ResultIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetIP_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe.h deleted file mode 100644 index 107043c..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe.h +++ /dev/null @@ -1,144 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetMe.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetMe_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetMe_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetMe - : public ModelBase -{ -public: - GetMe(); - virtual ~GetMe(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetMe members - - /// - /// Profile`s About section. - /// - utility::string_t getAbout() const; - bool aboutIsSet() const; - void unsetAbout(); - - void setAbout(const utility::string_t& value); - - /// - /// Address of the business - /// - utility::string_t getAddress() const; - bool addressIsSet() const; - void unsetAddress(); - - void setAddress(const utility::string_t& value); - - /// - /// Description of the business. Max 256 characters - /// - utility::string_t getDescription() const; - bool descriptionIsSet() const; - void unsetDescription(); - - void setDescription(const utility::string_t& value); - - /// - /// Business email - /// - utility::string_t getEmail() const; - bool emailIsSet() const; - void unsetEmail(); - - void setEmail(const utility::string_t& value); - - /// - /// Linked phone number - /// - utility::string_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(const utility::string_t& value); - - /// - /// Industry of the business - /// - utility::string_t getVertical() const; - bool verticalIsSet() const; - void unsetVertical(); - - void setVertical(const utility::string_t& value); - - /// - /// - /// - utility::string_t getPhoto() const; - bool photoIsSet() const; - void unsetPhoto(); - - void setPhoto(const utility::string_t& value); - - -protected: - utility::string_t m_About; - bool m_AboutIsSet; - utility::string_t m_Address; - bool m_AddressIsSet; - utility::string_t m_Description; - bool m_DescriptionIsSet; - utility::string_t m_Email; - bool m_EmailIsSet; - utility::string_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Vertical; - bool m_VerticalIsSet; - utility::string_t m_Photo; - bool m_PhotoIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetMe_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe_401_response.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe_401_response.h deleted file mode 100644 index e06915b..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMe_401_response.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetMe_401_response.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetMe_401_response_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetMe_401_response_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetMe_401_response - : public ModelBase -{ -public: - GetMe_401_response(); - virtual ~GetMe_401_response(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetMe_401_response members - - /// - /// - /// - utility::string_t getError() const; - bool errorIsSet() const; - void unsetError(); - - void setError(const utility::string_t& value); - - -protected: - utility::string_t m_Error; - bool m_ErrorIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetMe_401_response_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages.h deleted file mode 100644 index abb2f21..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetMessages.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetMessages_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetMessages_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/GetMessages_messages_inner.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class GetMessages_messages_inner; - -/// -/// -/// -class GetMessages - : public ModelBase -{ -public: - GetMessages(); - virtual ~GetMessages(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetMessages members - - /// - /// - /// - std::vector>& getMessages(); - bool messagesIsSet() const; - void unsetMessages(); - - void setMessages(const std::vector>& value); - - -protected: - std::vector> m_Messages; - bool m_MessagesIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetMessages_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages_messages_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages_messages_inner.h deleted file mode 100644 index 62e6e0b..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetMessages_messages_inner.h +++ /dev/null @@ -1,233 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetMessages_messages_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetMessages_messages_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetMessages_messages_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/Object.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetMessages_messages_inner - : public ModelBase -{ -public: - GetMessages_messages_inner(); - virtual ~GetMessages_messages_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetMessages_messages_inner members - - /// - /// - /// - int32_t getMessageNumber() const; - bool messageNumberIsSet() const; - void unsetMessageNumber(); - - void setMessageNumber(int32_t value); - - /// - /// - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - /// - /// - /// - bool isFromMe() const; - bool fromMeIsSet() const; - void unsetFromMe(); - - void setFromMe(bool value); - - /// - /// - /// - int32_t getSelf() const; - bool selfIsSet() const; - void unsetSelf(); - - void setSelf(int32_t value); - - /// - /// - /// - int32_t getIsForwarded() const; - bool isForwardedIsSet() const; - void unsetIsForwarded(); - - void setIsForwarded(int32_t value); - - /// - /// - /// - utility::string_t getAuthor() const; - bool authorIsSet() const; - void unsetAuthor(); - - void setAuthor(const utility::string_t& value); - - /// - /// - /// - int32_t getTime() const; - bool timeIsSet() const; - void unsetTime(); - - void setTime(int32_t value); - - /// - /// - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// - /// - utility::string_t getType() const; - bool typeIsSet() const; - void unsetType(); - - void setType(const utility::string_t& value); - - /// - /// - /// - utility::string_t getSenderName() const; - bool senderNameIsSet() const; - void unsetSenderName(); - - void setSenderName(const utility::string_t& value); - - /// - /// - /// - utility::string_t getCaption() const; - bool captionIsSet() const; - void unsetCaption(); - - void setCaption(const utility::string_t& value); - - /// - /// - /// - utility::string_t getQuotedMsgId() const; - bool quotedMsgIdIsSet() const; - void unsetQuotedMsgId(); - - void setQuotedMsgId(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getMetadata() const; - bool metadataIsSet() const; - void unsetMetadata(); - - void setMetadata(const std::shared_ptr& value); - - /// - /// - /// - utility::string_t getChatName() const; - bool chatNameIsSet() const; - void unsetChatName(); - - void setChatName(const utility::string_t& value); - - -protected: - int32_t m_MessageNumber; - bool m_MessageNumberIsSet; - utility::string_t m_Id; - bool m_IdIsSet; - utility::string_t m_Body; - bool m_BodyIsSet; - bool m_FromMe; - bool m_FromMeIsSet; - int32_t m_Self; - bool m_SelfIsSet; - int32_t m_IsForwarded; - bool m_IsForwardedIsSet; - utility::string_t m_Author; - bool m_AuthorIsSet; - int32_t m_Time; - bool m_TimeIsSet; - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - utility::string_t m_Type; - bool m_TypeIsSet; - utility::string_t m_SenderName; - bool m_SenderNameIsSet; - utility::string_t m_Caption; - bool m_CaptionIsSet; - utility::string_t m_QuotedMsgId; - bool m_QuotedMsgIdIsSet; - std::shared_ptr m_Metadata; - bool m_MetadataIsSet; - utility::string_t m_ChatName; - bool m_ChatNameIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetMessages_messages_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates.h deleted file mode 100644 index af30624..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates.h +++ /dev/null @@ -1,91 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetTemplates.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetTemplates_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetTemplates_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/GetTemplates_templates_inner.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class GetTemplates_templates_inner; - -/// -/// -/// -class GetTemplates - : public ModelBase -{ -public: - GetTemplates(); - virtual ~GetTemplates(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetTemplates members - - /// - /// - /// - int32_t getTotal() const; - bool totalIsSet() const; - void unsetTotal(); - - void setTotal(int32_t value); - - /// - /// - /// - std::vector>& getTemplates(); - bool templatesIsSet() const; - void unsetTemplates(); - - void setTemplates(const std::vector>& value); - - -protected: - int32_t m_Total; - bool m_TotalIsSet; - std::vector> m_Templates; - bool m_TemplatesIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetTemplates_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates_templates_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates_templates_inner.h deleted file mode 100644 index fb3b567..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/GetTemplates_templates_inner.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GetTemplates_templates_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_GetTemplates_templates_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_GetTemplates_templates_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/TemplateComponentsProp.h" -#include "CppRestOpenAPIClient/model/TemplateCategoryProp.h" -#include "CppRestOpenAPIClient/model/TemplateLanguageProp.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class GetTemplates_templates_inner - : public ModelBase -{ -public: - GetTemplates_templates_inner(); - virtual ~GetTemplates_templates_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GetTemplates_templates_inner members - - /// - /// - /// - std::shared_ptr getCategory() const; - bool categoryIsSet() const; - void unsetCategory(); - - void setCategory(const std::shared_ptr& value); - - /// - /// - /// - std::shared_ptr getComponents() const; - bool componentsIsSet() const; - void unsetComponents(); - - void setComponents(const std::shared_ptr& value); - - /// - /// - /// - std::shared_ptr getLanguage() const; - bool languageIsSet() const; - void unsetLanguage(); - - void setLanguage(const std::shared_ptr& value); - - /// - /// - /// - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - - void setName(const utility::string_t& value); - - /// - /// Can be found by method /templates - /// - utility::string_t getRNamespace() const; - bool rNamespaceIsSet() const; - void unsetr_namespace(); - - void setRNamespace(const utility::string_t& value); - - /// - /// - /// - utility::string_t getRejectedReason() const; - bool rejectedReasonIsSet() const; - void unsetRejected_reason(); - - void setRejectedReason(const utility::string_t& value); - - /// - /// - /// - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - - void setStatus(const utility::string_t& value); - - -protected: - std::shared_ptr m_Category; - bool m_CategoryIsSet; - std::shared_ptr m_Components; - bool m_ComponentsIsSet; - std::shared_ptr m_Language; - bool m_LanguageIsSet; - utility::string_t m_Name; - bool m_NameIsSet; - utility::string_t m_r_namespace; - bool m_r_namespaceIsSet; - utility::string_t m_Rejected_reason; - bool m_Rejected_reasonIsSet; - utility::string_t m_Status; - bool m_StatusIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_GetTemplates_templates_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/MeComponents.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/MeComponents.h deleted file mode 100644 index ee49776..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/MeComponents.h +++ /dev/null @@ -1,144 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * MeComponents.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MeComponents_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_MeComponents_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class MeComponents - : public ModelBase -{ -public: - MeComponents(); - virtual ~MeComponents(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// MeComponents members - - /// - /// Profile`s About section. - /// - utility::string_t getAbout() const; - bool aboutIsSet() const; - void unsetAbout(); - - void setAbout(const utility::string_t& value); - - /// - /// Address of the business - /// - utility::string_t getAddress() const; - bool addressIsSet() const; - void unsetAddress(); - - void setAddress(const utility::string_t& value); - - /// - /// Description of the business. Max 256 characters - /// - utility::string_t getDescription() const; - bool descriptionIsSet() const; - void unsetDescription(); - - void setDescription(const utility::string_t& value); - - /// - /// Business email - /// - utility::string_t getEmail() const; - bool emailIsSet() const; - void unsetEmail(); - - void setEmail(const utility::string_t& value); - - /// - /// Linked phone number - /// - utility::string_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(const utility::string_t& value); - - /// - /// Industry of the business - /// - utility::string_t getVertical() const; - bool verticalIsSet() const; - void unsetVertical(); - - void setVertical(const utility::string_t& value); - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - utility::string_t getPhoto() const; - bool photoIsSet() const; - void unsetPhoto(); - - void setPhoto(const utility::string_t& value); - - -protected: - utility::string_t m_About; - bool m_AboutIsSet; - utility::string_t m_Address; - bool m_AddressIsSet; - utility::string_t m_Description; - bool m_DescriptionIsSet; - utility::string_t m_Email; - bool m_EmailIsSet; - utility::string_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Vertical; - bool m_VerticalIsSet; - utility::string_t m_Photo; - bool m_PhotoIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_MeComponents_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/MediaId.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/MediaId.h deleted file mode 100644 index 1ff5b91..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/MediaId.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * MediaId.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MediaId_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_MediaId_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class MediaId - : public ModelBase -{ -public: - MediaId(); - virtual ~MediaId(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// MediaId members - - /// - /// - /// - utility::string_t getMediaId() const; - bool mediaIdIsSet() const; - void unsetMediaId(); - - void setMediaId(const utility::string_t& value); - - -protected: - utility::string_t m_MediaId; - bool m_MediaIdIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_MediaId_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Message.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Message.h deleted file mode 100644 index 95d42d2..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Message.h +++ /dev/null @@ -1,199 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Message.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Message_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Message_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class Message - : public ModelBase -{ -public: - Message(); - virtual ~Message(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Message members - - /// - /// unique id - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - /// - /// true - outgoing, false - incoming - /// - bool isFromMe() const; - bool fromMeIsSet() const; - void unsetFromMe(); - - void setFromMe(bool value); - - /// - /// 1 - generated by api, 0 - generated by app - /// - int32_t getSelf() const; - bool selfIsSet() const; - void unsetSelf(); - - void setSelf(int32_t value); - - /// - /// true - forwarded message, false - direct message - /// - bool isIsForwarded() const; - bool isForwardedIsSet() const; - void unsetIsForwarded(); - - void setIsForwarded(bool value); - - /// - /// Author ID of the message - /// - utility::string_t getAuthor() const; - bool authorIsSet() const; - void unsetAuthor(); - - void setAuthor(const utility::string_t& value); - - /// - /// send time, unix timestamp - /// - int32_t getTime() const; - bool timeIsSet() const; - void unsetTime(); - - void setTime(int32_t value); - - /// - /// chat ID - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// type of the message - /// - utility::string_t getType() const; - bool typeIsSet() const; - void unsetType(); - - void setType(const utility::string_t& value); - - /// - /// Sender name - /// - utility::string_t getSenderName() const; - bool senderNameIsSet() const; - void unsetSenderName(); - - void setSenderName(const utility::string_t& value); - - /// - /// File caption or filename - /// - utility::string_t getCaption() const; - bool captionIsSet() const; - void unsetCaption(); - - void setCaption(const utility::string_t& value); - - /// - /// ID of quoted message - /// - utility::string_t getQuotedMsgId() const; - bool quotedMsgIdIsSet() const; - void unsetQuotedMsgId(); - - void setQuotedMsgId(const utility::string_t& value); - - -protected: - utility::string_t m_Id; - bool m_IdIsSet; - utility::string_t m_Body; - bool m_BodyIsSet; - bool m_FromMe; - bool m_FromMeIsSet; - int32_t m_Self; - bool m_SelfIsSet; - bool m_IsForwarded; - bool m_IsForwardedIsSet; - utility::string_t m_Author; - bool m_AuthorIsSet; - int32_t m_Time; - bool m_TimeIsSet; - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - utility::string_t m_Type; - bool m_TypeIsSet; - utility::string_t m_SenderName; - bool m_SenderNameIsSet; - utility::string_t m_Caption; - bool m_CaptionIsSet; - utility::string_t m_QuotedMsgId; - bool m_QuotedMsgIdIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Message_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/MessageIdProp.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/MessageIdProp.h deleted file mode 100644 index 8686aaf..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/MessageIdProp.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * MessageIdProp.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MessageIdProp_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_MessageIdProp_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class MessageIdProp - : public ModelBase -{ -public: - MessageIdProp(); - virtual ~MessageIdProp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// MessageIdProp members - - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// - utility::string_t getMessageId() const; - bool messageIdIsSet() const; - void unsetMessageId(); - - void setMessageId(const utility::string_t& value); - - -protected: - utility::string_t m_MessageId; - bool m_MessageIdIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_MessageIdProp_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/PhoneProp.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/PhoneProp.h deleted file mode 100644 index 4eed428..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/PhoneProp.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * PhoneProp.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_PhoneProp_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_PhoneProp_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class PhoneProp - : public ModelBase -{ -public: - PhoneProp(); - virtual ~PhoneProp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// PhoneProp members - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - -protected: - int32_t m_Phone; - bool m_PhoneIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_PhoneProp_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/ReadMessageRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/ReadMessageRequest.h deleted file mode 100644 index 7abc360..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/ReadMessageRequest.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ReadMessageRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ReadMessageRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ReadMessageRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class ReadMessageRequest - : public ModelBase -{ -public: - ReadMessageRequest(); - virtual ~ReadMessageRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// ReadMessageRequest members - - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// - utility::string_t getMessageId() const; - bool messageIdIsSet() const; - void unsetMessageId(); - - void setMessageId(const utility::string_t& value); - - -protected: - utility::string_t m_MessageId; - bool m_MessageIdIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ReadMessageRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/RemoveTemplateRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/RemoveTemplateRequest.h deleted file mode 100644 index 35f7f30..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/RemoveTemplateRequest.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * RemoveTemplateRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_RemoveTemplateRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_RemoveTemplateRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class RemoveTemplateRequest - : public ModelBase -{ -public: - RemoveTemplateRequest(); - virtual ~RemoveTemplateRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// RemoveTemplateRequest members - - /// - /// Template name - /// - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - - void setName(const utility::string_t& value); - - -protected: - utility::string_t m_Name; - bool m_NameIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_RemoveTemplateRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendContactRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendContactRequest.h deleted file mode 100644 index 59d534f..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendContactRequest.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendContactRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendContactRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendContactRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/Object.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendContactRequest - : public ModelBase -{ -public: - SendContactRequest(); - virtual ~SendContactRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendContactRequest members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] - /// - std::vector>& getContacts(); - bool contactsIsSet() const; - void unsetContacts(); - - void setContacts(const std::vector>& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - std::vector> m_Contacts; - bool m_ContactsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendContactRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendFileRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendFileRequest.h deleted file mode 100644 index c878ef3..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendFileRequest.h +++ /dev/null @@ -1,122 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendFileRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendFileRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendFileRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendFileRequest - : public ModelBase -{ -public: - SendFileRequest(); - virtual ~SendFileRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendFileRequest members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - /// - /// File name, for *example 1.jpg* or *hello.xlsx* - /// - utility::string_t getFilename() const; - bool filenameIsSet() const; - void unsetFilename(); - - void setFilename(const utility::string_t& value); - - /// - /// Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - /// - utility::string_t getCaption() const; - bool captionIsSet() const; - void unsetCaption(); - - void setCaption(const utility::string_t& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Body; - bool m_BodyIsSet; - utility::string_t m_Filename; - bool m_FilenameIsSet; - utility::string_t m_Caption; - bool m_CaptionIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendFileRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest.h deleted file mode 100644 index dd69369..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendListRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendListRequest_allOf_sections; - -/// -/// -/// -class SendListRequest - : public ModelBase -{ -public: - SendListRequest(); - virtual ~SendListRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendListRequest members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// Main message text - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - /// - /// Header will be located above message text - /// - utility::string_t getHeader() const; - bool headerIsSet() const; - void unsetHeader(); - - void setHeader(const utility::string_t& value); - - /// - /// Footer will be placed under message text - /// - utility::string_t getFooter() const; - bool footerIsSet() const; - void unsetFooter(); - - void setFooter(const utility::string_t& value); - - /// - /// Action for open list - /// - utility::string_t getAction() const; - bool actionIsSet() const; - void unsetAction(); - - void setAction(const utility::string_t& value); - - /// - /// Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] - /// - std::vector>& getSections(); - bool sectionsIsSet() const; - void unsetSections(); - - void setSections(const std::vector>& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Body; - bool m_BodyIsSet; - utility::string_t m_Header; - bool m_HeaderIsSet; - utility::string_t m_Footer; - bool m_FooterIsSet; - utility::string_t m_Action; - bool m_ActionIsSet; - std::vector> m_Sections; - bool m_SectionsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h deleted file mode 100644 index 0db6936..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendListRequest_allOf_rows.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_allOf_rows_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_allOf_rows_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendListRequest_allOf_rows - : public ModelBase -{ -public: - SendListRequest_allOf_rows(); - virtual ~SendListRequest_allOf_rows(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendListRequest_allOf_rows members - - /// - /// Unique id for option, up to 200 symbols - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// Title of option, up to 24 symbols. - /// - utility::string_t getTitle() const; - bool titleIsSet() const; - void unsetTitle(); - - void setTitle(const utility::string_t& value); - - /// - /// Description of option, up to 72 symbols - /// - utility::string_t getDescription() const; - bool descriptionIsSet() const; - void unsetDescription(); - - void setDescription(const utility::string_t& value); - - -protected: - utility::string_t m_Id; - bool m_IdIsSet; - utility::string_t m_Title; - bool m_TitleIsSet; - utility::string_t m_Description; - bool m_DescriptionIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_allOf_rows_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h deleted file mode 100644 index fbbd413..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendListRequest_allOf_sections.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_allOf_sections_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_allOf_sections_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendListRequest_allOf_rows; - -/// -/// -/// -class SendListRequest_allOf_sections - : public ModelBase -{ -public: - SendListRequest_allOf_sections(); - virtual ~SendListRequest_allOf_sections(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendListRequest_allOf_sections members - - /// - /// Title of section, up to 24 symbols. Required if there are more then 1 section - /// - utility::string_t getTitle() const; - bool titleIsSet() const; - void unsetTitle(); - - void setTitle(const utility::string_t& value); - - /// - /// - /// - std::vector>& getRows(); - bool rowsIsSet() const; - void unsetRows(); - - void setRows(const std::vector>& value); - - -protected: - utility::string_t m_Title; - bool m_TitleIsSet; - std::vector> m_Rows; - bool m_RowsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendListRequest_allOf_sections_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendLocationRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendLocationRequest.h deleted file mode 100644 index 30b9e2d..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendLocationRequest.h +++ /dev/null @@ -1,133 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendLocationRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendLocationRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendLocationRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendLocationRequest - : public ModelBase -{ -public: - SendLocationRequest(); - virtual ~SendLocationRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendLocationRequest members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// Latitude of the location. Example: 45.018337 - /// - utility::string_t getLat() const; - bool latIsSet() const; - void unsetLat(); - - void setLat(const utility::string_t& value); - - /// - /// Longitude of the location. Example: -73.968285 - /// - utility::string_t getLng() const; - bool lngIsSet() const; - void unsetLng(); - - void setLng(const utility::string_t& value); - - /// - /// Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - /// - utility::string_t getAddress() const; - bool addressIsSet() const; - void unsetAddress(); - - void setAddress(const utility::string_t& value); - - /// - /// Name of the location. Example: Facebook HQ - /// - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - - void setName(const utility::string_t& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Lat; - bool m_LatIsSet; - utility::string_t m_Lng; - bool m_LngIsSet; - utility::string_t m_Address; - bool m_AddressIsSet; - utility::string_t m_Name; - bool m_NameIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendLocationRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageRequest.h deleted file mode 100644 index 80f5911..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageRequest.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendMessageRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendMessageRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendMessageRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendMessageRequest - : public ModelBase -{ -public: - SendMessageRequest(); - virtual ~SendMessageRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendMessageRequest members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Body; - bool m_BodyIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendMessageRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageStatus.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageStatus.h deleted file mode 100644 index f7c7854..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendMessageStatus.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendMessageStatus.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendMessageStatus_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendMessageStatus_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendMessageStatus - : public ModelBase -{ -public: - SendMessageStatus(); - virtual ~SendMessageStatus(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendMessageStatus members - - /// - /// - /// - bool isSent() const; - bool sentIsSet() const; - void unsetSent(); - - void setSent(bool value); - - /// - /// unique message id - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// Posting status message - /// - utility::string_t getMessage() const; - bool messageIsSet() const; - void unsetMessage(); - - void setMessage(const utility::string_t& value); - - /// - /// Result description - /// - utility::string_t getDescription() const; - bool descriptionIsSet() const; - void unsetDescription(); - - void setDescription(const utility::string_t& value); - - -protected: - bool m_Sent; - bool m_SentIsSet; - utility::string_t m_Id; - bool m_IdIsSet; - utility::string_t m_Message; - bool m_MessageIsSet; - utility::string_t m_Description; - bool m_DescriptionIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendMessageStatus_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest.h deleted file mode 100644 index c07fc66..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest.h +++ /dev/null @@ -1,135 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendProductRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendProductRequest_allOf_action; - -/// -/// -/// -class SendProductRequest - : public ModelBase -{ -public: - SendProductRequest(); - virtual ~SendProductRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendProductRequest members - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// - /// - std::shared_ptr getAction() const; - bool actionIsSet() const; - void unsetAction(); - - void setAction(const std::shared_ptr& value); - - /// - /// Text of message. Example: Some text. - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - /// - /// Located under the message text. Example: Footer. - /// - utility::string_t getFooter() const; - bool footerIsSet() const; - void unsetFooter(); - - void setFooter(const utility::string_t& value); - - /// - /// Header of catalog. Example: Header. **Required when sending the catalog.** - /// - utility::string_t getHeader() const; - bool headerIsSet() const; - void unsetHeader(); - - void setHeader(const utility::string_t& value); - - -protected: - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - std::shared_ptr m_Action; - bool m_ActionIsSet; - utility::string_t m_Body; - bool m_BodyIsSet; - utility::string_t m_Footer; - bool m_FooterIsSet; - utility::string_t m_Header; - bool m_HeaderIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h deleted file mode 100644 index f58dad2..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendProductRequest_allOf_action.h - * - * Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendProductRequest_allOf_action_sections; - -/// -/// Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} -/// -class SendProductRequest_allOf_action - : public ModelBase -{ -public: - SendProductRequest_allOf_action(); - virtual ~SendProductRequest_allOf_action(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendProductRequest_allOf_action members - - /// - /// id of the catalog - /// - utility::string_t getCatalogId() const; - bool catalogIdIsSet() const; - void unsetCatalog_id(); - - void setCatalogId(const utility::string_t& value); - - /// - /// id of the product - /// - utility::string_t getProductRetailerId() const; - bool productRetailerIdIsSet() const; - void unsetProduct_retailer_id(); - - void setProductRetailerId(const utility::string_t& value); - - /// - /// - /// - std::vector>& getSections(); - bool sectionsIsSet() const; - void unsetSections(); - - void setSections(const std::vector>& value); - - -protected: - utility::string_t m_Catalog_id; - bool m_Catalog_idIsSet; - utility::string_t m_Product_retailer_id; - bool m_Product_retailer_idIsSet; - std::vector> m_Sections; - bool m_SectionsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h deleted file mode 100644 index d4758fe..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendProductRequest_allOf_action_product_items.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_product_items_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_product_items_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendProductRequest_allOf_action_product_items - : public ModelBase -{ -public: - SendProductRequest_allOf_action_product_items(); - virtual ~SendProductRequest_allOf_action_product_items(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendProductRequest_allOf_action_product_items members - - /// - /// id of the product - /// - utility::string_t getProductRetailerId() const; - bool productRetailerIdIsSet() const; - void unsetProduct_retailer_id(); - - void setProductRetailerId(const utility::string_t& value); - - -protected: - utility::string_t m_Product_retailer_id; - bool m_Product_retailer_idIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_product_items_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h deleted file mode 100644 index 76b9a0e..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendProductRequest_allOf_action_sections.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_sections_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_sections_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendProductRequest_allOf_action_product_items; - -/// -/// -/// -class SendProductRequest_allOf_action_sections - : public ModelBase -{ -public: - SendProductRequest_allOf_action_sections(); - virtual ~SendProductRequest_allOf_action_sections(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendProductRequest_allOf_action_sections members - - /// - /// Title of the section. Example: the-section-title - /// - utility::string_t getTitle() const; - bool titleIsSet() const; - void unsetTitle(); - - void setTitle(const utility::string_t& value); - - /// - /// - /// - std::vector>& getProductItems(); - bool productItemsIsSet() const; - void unsetProduct_items(); - - void setProductItems(const std::vector>& value); - - -protected: - utility::string_t m_Title; - bool m_TitleIsSet; - std::vector> m_Product_items; - bool m_Product_itemsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendProductRequest_allOf_action_sections_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest.h deleted file mode 100644 index 838d6a6..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest.h +++ /dev/null @@ -1,138 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h" -#include -#include -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendTemplateRequest_allOf_language; -class SendTemplateRequest_allOf_params; - -/// -/// -/// -class SendTemplateRequest - : public ModelBase -{ -public: - SendTemplateRequest(); - virtual ~SendTemplateRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest members - - /// - /// Can be found by method /templates - /// - utility::string_t getRNamespace() const; - bool rNamespaceIsSet() const; - void unsetr_namespace(); - - void setRNamespace(const utility::string_t& value); - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - utility::string_t getChatId() const; - bool chatIdIsSet() const; - void unsetChatId(); - - void setChatId(const utility::string_t& value); - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - int32_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(int32_t value); - - /// - /// Name of template - /// - utility::string_t getRTemplate() const; - bool rTemplateIsSet() const; - void unsetr_template(); - - void setRTemplate(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getLanguage() const; - bool languageIsSet() const; - void unsetLanguage(); - - void setLanguage(const std::shared_ptr& value); - - /// - /// Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** - /// - std::vector>& getParams(); - bool paramsIsSet() const; - void unsetParams(); - - void setParams(const std::vector>& value); - - -protected: - utility::string_t m_r_namespace; - bool m_r_namespaceIsSet; - utility::string_t m_ChatId; - bool m_ChatIdIsSet; - int32_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_r_template; - bool m_r_templateIsSet; - std::shared_ptr m_Language; - bool m_LanguageIsSet; - std::vector> m_Params; - bool m_ParamsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h deleted file mode 100644 index 77ef2e4..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest_allOf_currency.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_currency_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_currency_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendTemplateRequest_allOf_currency - : public ModelBase -{ -public: - SendTemplateRequest_allOf_currency(); - virtual ~SendTemplateRequest_allOf_currency(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest_allOf_currency members - - /// - /// - /// - utility::string_t getCurrencyCode() const; - bool currencyCodeIsSet() const; - void unsetCurrency_code(); - - void setCurrencyCode(const utility::string_t& value); - - /// - /// - /// - int32_t getAmount1000() const; - bool amount1000IsSet() const; - void unsetAmount_1000(); - - void setAmount1000(int32_t value); - - -protected: - utility::string_t m_Currency_code; - bool m_Currency_codeIsSet; - int32_t m_Amount_1000; - bool m_Amount_1000IsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_currency_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h deleted file mode 100644 index ff9ff9c..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest_allOf_date_time.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h" -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendTemplateRequest_allOf_date_time_component; -class SendTemplateRequest_allOf_date_time_unix_epoch; - -/// -/// -/// -class SendTemplateRequest_allOf_date_time - : public ModelBase -{ -public: - SendTemplateRequest_allOf_date_time(); - virtual ~SendTemplateRequest_allOf_date_time(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest_allOf_date_time members - - /// - /// - /// - std::shared_ptr getComponent() const; - bool componentIsSet() const; - void unsetComponent(); - - void setComponent(const std::shared_ptr& value); - - /// - /// - /// - std::shared_ptr getUnixEpoch() const; - bool unixEpochIsSet() const; - void unsetUnix_epoch(); - - void setUnixEpoch(const std::shared_ptr& value); - - -protected: - std::shared_ptr m_Component; - bool m_ComponentIsSet; - std::shared_ptr m_Unix_epoch; - bool m_Unix_epochIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h deleted file mode 100644 index ebd66a7..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h +++ /dev/null @@ -1,144 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest_allOf_date_time_component.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_component_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_component_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendTemplateRequest_allOf_date_time_component - : public ModelBase -{ -public: - SendTemplateRequest_allOf_date_time_component(); - virtual ~SendTemplateRequest_allOf_date_time_component(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest_allOf_date_time_component members - - /// - /// - /// - utility::string_t getDayOfWeek() const; - bool dayOfWeekIsSet() const; - void unsetDay_of_week(); - - void setDayOfWeek(const utility::string_t& value); - - /// - /// - /// - int32_t getYear() const; - bool yearIsSet() const; - void unsetYear(); - - void setYear(int32_t value); - - /// - /// - /// - int32_t getMonth() const; - bool monthIsSet() const; - void unsetMonth(); - - void setMonth(int32_t value); - - /// - /// - /// - int32_t getDayOfMonth() const; - bool dayOfMonthIsSet() const; - void unsetDay_of_month(); - - void setDayOfMonth(int32_t value); - - /// - /// - /// - int32_t getHour() const; - bool hourIsSet() const; - void unsetHour(); - - void setHour(int32_t value); - - /// - /// - /// - int32_t getMinute() const; - bool minuteIsSet() const; - void unsetMinute(); - - void setMinute(int32_t value); - - /// - /// - /// - utility::string_t getCalendar() const; - bool calendarIsSet() const; - void unsetCalendar(); - - void setCalendar(const utility::string_t& value); - - -protected: - utility::string_t m_Day_of_week; - bool m_Day_of_weekIsSet; - int32_t m_Year; - bool m_YearIsSet; - int32_t m_Month; - bool m_MonthIsSet; - int32_t m_Day_of_month; - bool m_Day_of_monthIsSet; - int32_t m_Hour; - bool m_HourIsSet; - int32_t m_Minute; - bool m_MinuteIsSet; - utility::string_t m_Calendar; - bool m_CalendarIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_component_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h deleted file mode 100644 index 8695663..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest_allOf_date_time_unix_epoch.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_unix_epoch_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_unix_epoch_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SendTemplateRequest_allOf_date_time_unix_epoch - : public ModelBase -{ -public: - SendTemplateRequest_allOf_date_time_unix_epoch(); - virtual ~SendTemplateRequest_allOf_date_time_unix_epoch(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest_allOf_date_time_unix_epoch members - - /// - /// - /// - int32_t getTimestamp() const; - bool timestampIsSet() const; - void unsetTimestamp(); - - void setTimestamp(int32_t value); - - -protected: - int32_t m_Timestamp; - bool m_TimestampIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_date_time_unix_epoch_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h deleted file mode 100644 index d96eea3..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest_allOf_language.h - * - * Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_language_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_language_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/TemplateLanguageProp.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes -/// -class SendTemplateRequest_allOf_language - : public ModelBase -{ -public: - SendTemplateRequest_allOf_language(); - virtual ~SendTemplateRequest_allOf_language(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest_allOf_language members - - /// - /// - /// - utility::string_t getPolicy() const; - bool policyIsSet() const; - void unsetPolicy(); - - void setPolicy(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getCode() const; - bool codeIsSet() const; - void unsetCode(); - - void setCode(const std::shared_ptr& value); - - -protected: - utility::string_t m_Policy; - bool m_PolicyIsSet; - std::shared_ptr m_Code; - bool m_CodeIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_language_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h deleted file mode 100644 index d38a00b..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SendTemplateRequest_allOf_params.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_params_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_params_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h" -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SendTemplateRequest_allOf_currency; -class SendTemplateRequest_allOf_date_time; - -/// -/// -/// -class SendTemplateRequest_allOf_params - : public ModelBase -{ -public: - SendTemplateRequest_allOf_params(); - virtual ~SendTemplateRequest_allOf_params(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SendTemplateRequest_allOf_params members - - /// - /// - /// - utility::string_t getRDefault() const; - bool rDefaultIsSet() const; - void unsetr_default(); - - void setRDefault(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getCurrency() const; - bool currencyIsSet() const; - void unsetCurrency(); - - void setCurrency(const std::shared_ptr& value); - - /// - /// - /// - std::shared_ptr getDateTime() const; - bool dateTimeIsSet() const; - void unsetDate_time(); - - void setDateTime(const std::shared_ptr& value); - - -protected: - utility::string_t m_r_default; - bool m_r_defaultIsSet; - std::shared_ptr m_Currency; - bool m_CurrencyIsSet; - std::shared_ptr m_Date_time; - bool m_Date_timeIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SendTemplateRequest_allOf_params_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetCommerce.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SetCommerce.h deleted file mode 100644 index da25e84..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetCommerce.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SetCommerce.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SetCommerce_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SetCommerce_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SetCommerce - : public ModelBase -{ -public: - SetCommerce(); - virtual ~SetCommerce(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SetCommerce members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SetCommerce_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetMe.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SetMe.h deleted file mode 100644 index 75e2e03..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetMe.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SetMe.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SetMe_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SetMe_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SetMe - : public ModelBase -{ -public: - SetMe(); - virtual ~SetMe(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SetMe members - - /// - /// - /// - utility::string_t getResult() const; - bool resultIsSet() const; - void unsetResult(); - - void setResult(const utility::string_t& value); - - -protected: - utility::string_t m_Result; - bool m_ResultIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SetMe_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetMeRequest.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SetMeRequest.h deleted file mode 100644 index 756da64..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetMeRequest.h +++ /dev/null @@ -1,144 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SetMeRequest.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SetMeRequest_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SetMeRequest_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SetMeRequest - : public ModelBase -{ -public: - SetMeRequest(); - virtual ~SetMeRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SetMeRequest members - - /// - /// Profile`s About section. - /// - utility::string_t getAbout() const; - bool aboutIsSet() const; - void unsetAbout(); - - void setAbout(const utility::string_t& value); - - /// - /// Address of the business - /// - utility::string_t getAddress() const; - bool addressIsSet() const; - void unsetAddress(); - - void setAddress(const utility::string_t& value); - - /// - /// Description of the business. Max 256 characters - /// - utility::string_t getDescription() const; - bool descriptionIsSet() const; - void unsetDescription(); - - void setDescription(const utility::string_t& value); - - /// - /// Business email - /// - utility::string_t getEmail() const; - bool emailIsSet() const; - void unsetEmail(); - - void setEmail(const utility::string_t& value); - - /// - /// Linked phone number - /// - utility::string_t getPhone() const; - bool phoneIsSet() const; - void unsetPhone(); - - void setPhone(const utility::string_t& value); - - /// - /// Industry of the business - /// - utility::string_t getVertical() const; - bool verticalIsSet() const; - void unsetVertical(); - - void setVertical(const utility::string_t& value); - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - utility::string_t getPhoto() const; - bool photoIsSet() const; - void unsetPhoto(); - - void setPhoto(const utility::string_t& value); - - -protected: - utility::string_t m_About; - bool m_AboutIsSet; - utility::string_t m_Address; - bool m_AddressIsSet; - utility::string_t m_Description; - bool m_DescriptionIsSet; - utility::string_t m_Email; - bool m_EmailIsSet; - utility::string_t m_Phone; - bool m_PhoneIsSet; - utility::string_t m_Vertical; - bool m_VerticalIsSet; - utility::string_t m_Photo; - bool m_PhotoIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SetMeRequest_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response.h deleted file mode 100644 index e2d6143..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response.h +++ /dev/null @@ -1,91 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SetSettings_200_response.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SetSettings_200_response_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SetSettings_200_response_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class SetSettings_200_response_allOf_update; - -/// -/// -/// -class SetSettings_200_response - : public ModelBase -{ -public: - SetSettings_200_response(); - virtual ~SetSettings_200_response(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SetSettings_200_response members - - /// - /// - /// - utility::string_t getWebhookUrl() const; - bool webhookUrlIsSet() const; - void unsetWebhookUrl(); - - void setWebhookUrl(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getUpdate() const; - bool updateIsSet() const; - void unsetUpdate(); - - void setUpdate(const std::shared_ptr& value); - - -protected: - utility::string_t m_WebhookUrl; - bool m_WebhookUrlIsSet; - std::shared_ptr m_Update; - bool m_UpdateIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SetSettings_200_response_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h deleted file mode 100644 index 88b1a26..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SetSettings_200_response_allOf_update.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SetSettings_200_response_allOf_update_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SetSettings_200_response_allOf_update_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SetSettings_200_response_allOf_update - : public ModelBase -{ -public: - SetSettings_200_response_allOf_update(); - virtual ~SetSettings_200_response_allOf_update(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SetSettings_200_response_allOf_update members - - /// - /// - /// - utility::string_t getWebhookUrl() const; - bool webhookUrlIsSet() const; - void unsetWebhookUrl(); - - void setWebhookUrl(const utility::string_t& value); - - -protected: - utility::string_t m_WebhookUrl; - bool m_WebhookUrlIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SetSettings_200_response_allOf_update_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetWebhookStatus.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/SetWebhookStatus.h deleted file mode 100644 index e7eff4a..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/SetWebhookStatus.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SetWebhookStatus.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SetWebhookStatus_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SetWebhookStatus_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class SetWebhookStatus - : public ModelBase -{ -public: - SetWebhookStatus(); - virtual ~SetWebhookStatus(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// SetWebhookStatus members - - /// - /// Flag indicating that the current request has changed webhook - /// - bool isSet() const; - bool setIsSet() const; - void unsetSet(); - - void setSet(bool value); - - /// - /// - /// - utility::string_t getMessage() const; - bool messageIsSet() const; - void unsetMessage(); - - void setMessage(const utility::string_t& value); - - -protected: - bool m_Set; - bool m_SetIsSet; - utility::string_t m_Message; - bool m_MessageIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SetWebhookStatus_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/Settings.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/Settings.h deleted file mode 100644 index 9f16e7f..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/Settings.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Settings.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Settings_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_Settings_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class Settings - : public ModelBase -{ -public: - Settings(); - virtual ~Settings(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Settings members - - /// - /// - /// - utility::string_t getWebhookUrl() const; - bool webhookUrlIsSet() const; - void unsetWebhookUrl(); - - void setWebhookUrl(const utility::string_t& value); - - -protected: - utility::string_t m_WebhookUrl; - bool m_WebhookUrlIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Settings_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateCategoryProp.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateCategoryProp.h deleted file mode 100644 index 45795fb..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateCategoryProp.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplateCategoryProp.h - * - * Template category - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateCategoryProp_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateCategoryProp_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class TemplateCategoryProp - : public ModelBase -{ -public: - TemplateCategoryProp(); - virtual ~TemplateCategoryProp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - enum class eTemplateCategoryProp - { - TemplateCategoryProp_MARKETING, - TemplateCategoryProp_TRANSACTIONAL, - TemplateCategoryProp_OTP, - }; - - eTemplateCategoryProp getValue() const; - void setValue(eTemplateCategoryProp const value); - - protected: - eTemplateCategoryProp m_value; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateCategoryProp_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp.h deleted file mode 100644 index 8f5eead..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplateComponentsProp.h - * - * Array of template components - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// Array of template components -/// -class TemplateComponentsProp - : public ModelBase -{ -public: - TemplateComponentsProp(); - virtual ~TemplateComponentsProp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// TemplateComponentsProp members - - -protected: -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h deleted file mode 100644 index c2cf570..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h +++ /dev/null @@ -1,126 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplateComponentsProp_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h" -#include -#include "CppRestOpenAPIClient/Object.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class TemplateComponentsProp_inner_buttons_inner; - -/// -/// -/// -class TemplateComponentsProp_inner - : public ModelBase -{ -public: - TemplateComponentsProp_inner(); - virtual ~TemplateComponentsProp_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// TemplateComponentsProp_inner members - - /// - /// - /// - utility::string_t getType() const; - bool typeIsSet() const; - void unsetType(); - - void setType(const utility::string_t& value); - - /// - /// Only for HEADER type - /// - utility::string_t getFormat() const; - bool formatIsSet() const; - void unsetFormat(); - - void setFormat(const utility::string_t& value); - - /// - /// - /// - utility::string_t getText() const; - bool textIsSet() const; - void unsetText(); - - void setText(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getExample() const; - bool exampleIsSet() const; - void unsetExample(); - - void setExample(const std::shared_ptr& value); - - /// - /// - /// - std::vector>& getButtons(); - bool buttonsIsSet() const; - void unsetButtons(); - - void setButtons(const std::vector>& value); - - -protected: - utility::string_t m_Type; - bool m_TypeIsSet; - utility::string_t m_Format; - bool m_FormatIsSet; - utility::string_t m_Text; - bool m_TextIsSet; - std::shared_ptr m_Example; - bool m_ExampleIsSet; - std::vector> m_Buttons; - bool m_ButtonsIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h deleted file mode 100644 index 03efe17..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h +++ /dev/null @@ -1,124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplateComponentsProp_inner_buttons_inner.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_inner_buttons_inner_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_inner_buttons_inner_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/AnyType.h" -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class TemplateComponentsProp_inner_buttons_inner - : public ModelBase -{ -public: - TemplateComponentsProp_inner_buttons_inner(); - virtual ~TemplateComponentsProp_inner_buttons_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// TemplateComponentsProp_inner_buttons_inner members - - /// - /// - /// - utility::string_t getType() const; - bool typeIsSet() const; - void unsetType(); - - void setType(const utility::string_t& value); - - /// - /// - /// - utility::string_t getText() const; - bool textIsSet() const; - void unsetText(); - - void setText(const utility::string_t& value); - - /// - /// - /// - utility::string_t getUrl() const; - bool urlIsSet() const; - void unsetUrl(); - - void setUrl(const utility::string_t& value); - - /// - /// - /// - utility::string_t getPhoneNumber() const; - bool phoneNumberIsSet() const; - void unsetPhone_number(); - - void setPhoneNumber(const utility::string_t& value); - - /// - /// - /// - std::vector>& getExample(); - bool exampleIsSet() const; - void unsetExample(); - - void setExample(const std::vector>& value); - - -protected: - utility::string_t m_Type; - bool m_TypeIsSet; - utility::string_t m_Text; - bool m_TextIsSet; - utility::string_t m_Url; - bool m_UrlIsSet; - utility::string_t m_Phone_number; - bool m_Phone_numberIsSet; - std::vector> m_Example; - bool m_ExampleIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateComponentsProp_inner_buttons_inner_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateLanguageProp.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateLanguageProp.h deleted file mode 100644 index ff1daca..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateLanguageProp.h +++ /dev/null @@ -1,130 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplateLanguageProp.h - * - * Template language - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateLanguageProp_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateLanguageProp_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class TemplateLanguageProp - : public ModelBase -{ -public: - TemplateLanguageProp(); - virtual ~TemplateLanguageProp(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - enum class eTemplateLanguageProp - { - TemplateLanguageProp_AF, - TemplateLanguageProp_SQ, - TemplateLanguageProp_AR, - TemplateLanguageProp_AZ, - TemplateLanguageProp_BN, - TemplateLanguageProp_BG, - TemplateLanguageProp_CA, - TemplateLanguageProp_ZH_CN, - TemplateLanguageProp_ZH_HK, - TemplateLanguageProp_ZH_TW, - TemplateLanguageProp_HR, - TemplateLanguageProp_CS, - TemplateLanguageProp_DA, - TemplateLanguageProp_NL, - TemplateLanguageProp_EN, - TemplateLanguageProp_EN_GB, - TemplateLanguageProp_EN_US, - TemplateLanguageProp_ET, - TemplateLanguageProp_FIL, - TemplateLanguageProp_FI, - TemplateLanguageProp_FR, - TemplateLanguageProp_DE, - TemplateLanguageProp_EL, - TemplateLanguageProp_GU, - TemplateLanguageProp_HE, - TemplateLanguageProp_HI, - TemplateLanguageProp_HU, - TemplateLanguageProp_ID, - TemplateLanguageProp_GA, - TemplateLanguageProp_IT, - TemplateLanguageProp_JA, - TemplateLanguageProp_KN, - TemplateLanguageProp_KK, - TemplateLanguageProp_KO, - TemplateLanguageProp_LO, - TemplateLanguageProp_LV, - TemplateLanguageProp_LT, - TemplateLanguageProp_MK, - TemplateLanguageProp_MS, - TemplateLanguageProp_MR, - TemplateLanguageProp_NB, - TemplateLanguageProp_FA, - TemplateLanguageProp_PL, - TemplateLanguageProp_PT_BR, - TemplateLanguageProp_PT_PT, - TemplateLanguageProp_PA, - TemplateLanguageProp_RO, - TemplateLanguageProp_RU, - TemplateLanguageProp_SR, - TemplateLanguageProp_SK, - TemplateLanguageProp_SL, - TemplateLanguageProp_ES, - TemplateLanguageProp_ES_AR, - TemplateLanguageProp_ES_ES, - TemplateLanguageProp_ES_MX, - TemplateLanguageProp_SW, - TemplateLanguageProp_SV, - TemplateLanguageProp_TA, - TemplateLanguageProp_TE, - TemplateLanguageProp_TH, - TemplateLanguageProp_TR, - TemplateLanguageProp_UK, - TemplateLanguageProp_UR, - TemplateLanguageProp_UZ, - TemplateLanguageProp_VI, - }; - - eTemplateLanguageProp getValue() const; - void setValue(eTemplateLanguageProp const value); - - protected: - eTemplateLanguageProp m_value; -}; - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateLanguageProp_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateNamespaceField.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateNamespaceField.h deleted file mode 100644 index 553db67..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/TemplateNamespaceField.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TemplateNamespaceField.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateNamespaceField_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateNamespaceField_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class TemplateNamespaceField - : public ModelBase -{ -public: - TemplateNamespaceField(); - virtual ~TemplateNamespaceField(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// TemplateNamespaceField members - - /// - /// - /// - utility::string_t getRNamespace() const; - bool rNamespaceIsSet() const; - void unsetr_namespace(); - - void setRNamespace(const utility::string_t& value); - - -protected: - utility::string_t m_r_namespace; - bool m_r_namespaceIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TemplateNamespaceField_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/UploadMedia.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/UploadMedia.h deleted file mode 100644 index e8d6cf9..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/UploadMedia.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * UploadMedia.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_UploadMedia_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_UploadMedia_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class UploadMedia - : public ModelBase -{ -public: - UploadMedia(); - virtual ~UploadMedia(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UploadMedia members - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - utility::string_t getBody() const; - bool bodyIsSet() const; - void unsetBody(); - - void setBody(const utility::string_t& value); - - -protected: - utility::string_t m_Body; - bool m_BodyIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_UploadMedia_H_ */ diff --git a/cpp-restsdk/include/CppRestOpenAPIClient/model/WebhookUrl.h b/cpp-restsdk/include/CppRestOpenAPIClient/model/WebhookUrl.h deleted file mode 100644 index 9306c6c..0000000 --- a/cpp-restsdk/include/CppRestOpenAPIClient/model/WebhookUrl.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * WebhookUrl.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_WebhookUrl_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_WebhookUrl_H_ - - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -/// -/// -/// -class WebhookUrl - : public ModelBase -{ -public: - WebhookUrl(); - virtual ~WebhookUrl(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// WebhookUrl members - - /// - /// Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - /// - utility::string_t getWebhookUrl() const; - bool webhookUrlIsSet() const; - void unsetWebhookUrl(); - - void setWebhookUrl(const utility::string_t& value); - - -protected: - utility::string_t m_WebhookUrl; - bool m_WebhookUrlIsSet; -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_WebhookUrl_H_ */ diff --git a/cpp-restsdk/src/ApiClient.cpp b/cpp-restsdk/src/ApiClient.cpp deleted file mode 100644 index 278df18..0000000 --- a/cpp-restsdk/src/ApiClient.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/ApiClient.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include - -template -utility::string_t toString(const T value) -{ - utility::ostringstream_t out; - out << std::setprecision(std::numeric_limits::digits10) << std::fixed << value; - return out.str(); -} - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -ApiClient::ApiClient(std::shared_ptr configuration ) - : m_Configuration(configuration) -{ -} -ApiClient::~ApiClient() -{ -} - -const ApiClient::ResponseHandlerType& ApiClient::getResponseHandler() const { - return m_ResponseHandler; -} - -void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) { - m_ResponseHandler = responseHandler; -} - -std::shared_ptr ApiClient::getConfiguration() const -{ - return m_Configuration; -} -void ApiClient::setConfiguration(std::shared_ptr configuration) -{ - m_Configuration = configuration; -} - - -utility::string_t ApiClient::parameterToString(utility::string_t value) -{ - return value; -} -utility::string_t ApiClient::parameterToString(int64_t value) -{ - std::stringstream valueAsStringStream; - valueAsStringStream << value; - return utility::conversions::to_string_t(valueAsStringStream.str()); -} -utility::string_t ApiClient::parameterToString(int32_t value) -{ - std::stringstream valueAsStringStream; - valueAsStringStream << value; - return utility::conversions::to_string_t(valueAsStringStream.str()); -} - -utility::string_t ApiClient::parameterToString(float value) -{ - return utility::conversions::to_string_t(toString(value)); -} - -utility::string_t ApiClient::parameterToString(double value) -{ - return utility::conversions::to_string_t(toString(value)); -} - -utility::string_t ApiClient::parameterToString(const utility::datetime &value) -{ - return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601)); -} - -utility::string_t ApiClient::parameterToString(bool value) -{ - std::stringstream valueAsStringStream; - valueAsStringStream << std::boolalpha << value; - return utility::conversions::to_string_t(valueAsStringStream.str()); -} - -pplx::task ApiClient::callApi( - const utility::string_t& path, - const utility::string_t& method, - const std::map& queryParams, - const std::shared_ptr postBody, - const std::map& headerParams, - const std::map& formParams, - const std::map>& fileParams, - const utility::string_t& contentType -) const -{ - if (postBody != nullptr && formParams.size() != 0) - { - throw ApiException(400, utility::conversions::to_string_t("Cannot have body and form params")); - } - - if (postBody != nullptr && fileParams.size() != 0) - { - throw ApiException(400, utility::conversions::to_string_t("Cannot have body and file params")); - } - - if (fileParams.size() > 0 && contentType != utility::conversions::to_string_t("multipart/form-data")) - { - throw ApiException(400, utility::conversions::to_string_t("Operations with file parameters must be called with multipart/form-data")); - } - - web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig()); - - web::http::http_request request; - for (const auto& kvp : headerParams) - { - request.headers().add(kvp.first, kvp.second); - } - - if (fileParams.size() > 0) - { - MultipartFormData uploadData; - for (const auto& kvp : formParams) - { - uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); - } - for (const auto& kvp : fileParams) - { - uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); - } - std::stringstream data; - uploadData.writeTo(data); - auto bodyString = data.str(); - const auto length = bodyString.size(); - request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary()); - } - else - { - if (postBody != nullptr) - { - std::stringstream data; - postBody->writeTo(data); - auto bodyString = data.str(); - const auto length = bodyString.size(); - request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType); - } - else - { - if (contentType == utility::conversions::to_string_t("application/json")) - { - web::json::value body_data = web::json::value::object(); - for (auto& kvp : formParams) - { - body_data[kvp.first] = ModelBase::toJson(kvp.second); - } - if (!formParams.empty()) - { - request.set_body(body_data); - } - } - else - { - web::http::uri_builder formData; - for (const auto& kvp : formParams) - { - formData.append_query(kvp.first, kvp.second); - } - if (!formParams.empty()) - { - request.set_body(formData.query(), utility::conversions::to_string_t("application/x-www-form-urlencoded")); - } - } - } - } - - web::http::uri_builder builder(path); - for (const auto& kvp : queryParams) - { - builder.append_query(kvp.first, kvp.second); - } - request.set_request_uri(builder.to_uri()); - request.set_method(method); - if ( !request.headers().has( web::http::header_names::user_agent ) ) - { - request.headers().add( web::http::header_names::user_agent, m_Configuration->getUserAgent() ); - } - - return client.request(request); -} - -} -} -} -} diff --git a/cpp-restsdk/src/ApiConfiguration.cpp b/cpp-restsdk/src/ApiConfiguration.cpp deleted file mode 100644 index be0d33f..0000000 --- a/cpp-restsdk/src/ApiConfiguration.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/ApiConfiguration.h" - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -ApiConfiguration::ApiConfiguration() -{ -} - -ApiConfiguration::~ApiConfiguration() -{ -} - -const web::http::client::http_client_config& ApiConfiguration::getHttpConfig() const -{ - return m_HttpConfig; -} - -void ApiConfiguration::setHttpConfig( web::http::client::http_client_config& value ) -{ - m_HttpConfig = value; -} - -utility::string_t ApiConfiguration::getBaseUrl() const -{ - return m_BaseUrl; -} - -void ApiConfiguration::setBaseUrl( const utility::string_t value ) -{ - m_BaseUrl = value; -} - -utility::string_t ApiConfiguration::getUserAgent() const -{ - return m_UserAgent; -} - -void ApiConfiguration::setUserAgent( const utility::string_t value ) -{ - m_UserAgent = value; -} - -std::map& ApiConfiguration::getDefaultHeaders() -{ - return m_DefaultHeaders; -} - -const std::map& ApiConfiguration::getDefaultHeaders() const -{ - return m_DefaultHeaders; -} - -utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const -{ - auto result = m_ApiKeys.find(prefix); - if( result != m_ApiKeys.end() ) - { - return result->second; - } - return utility::conversions::to_string_t(""); -} - -void ApiConfiguration::setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey ) -{ - m_ApiKeys[prefix] = apiKey; -} - -} -} -} -} diff --git a/cpp-restsdk/src/ApiException.cpp b/cpp-restsdk/src/ApiException.cpp deleted file mode 100644 index 7193078..0000000 --- a/cpp-restsdk/src/ApiException.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/ApiException.h" - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -ApiException::ApiException( int errorCode - , const utility::string_t& message - , std::shared_ptr content /*= nullptr*/ ) - : web::http::http_exception( errorCode, message ) - , m_Content(content) -{ -} -ApiException::ApiException( int errorCode - , const utility::string_t& message - , std::map& headers - , std::shared_ptr content /*= nullptr*/ ) - : web::http::http_exception( errorCode, message ) - , m_Content(content) - , m_Headers(headers) -{ -} - -ApiException::~ApiException() -{ -} - -std::shared_ptr ApiException::getContent() const -{ - return m_Content; -} - -std::map& ApiException::getHeaders() -{ - return m_Headers; -} - -} -} -} -} diff --git a/cpp-restsdk/src/HttpContent.cpp b/cpp-restsdk/src/HttpContent.cpp deleted file mode 100644 index f304610..0000000 --- a/cpp-restsdk/src/HttpContent.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/HttpContent.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HttpContent::HttpContent() -{ -} - -HttpContent::~HttpContent() -{ -} - -utility::string_t HttpContent::getContentDisposition() const -{ - return m_ContentDisposition; -} - -void HttpContent::setContentDisposition( const utility::string_t & value ) -{ - m_ContentDisposition = value; -} - -utility::string_t HttpContent::getName() const -{ - return m_Name; -} - -void HttpContent::setName( const utility::string_t & value ) -{ - m_Name = value; -} - -utility::string_t HttpContent::getFileName() const -{ - return m_FileName; -} - -void HttpContent::setFileName( const utility::string_t & value ) -{ - m_FileName = value; -} - -utility::string_t HttpContent::getContentType() const -{ - return m_ContentType; -} - -void HttpContent::setContentType( const utility::string_t & value ) -{ - m_ContentType = value; -} - -std::shared_ptr HttpContent::getData() const -{ - return m_Data; -} - -void HttpContent::setData( std::shared_ptr value ) -{ - m_Data = value; -} - -void HttpContent::writeTo( std::ostream& stream ) -{ - m_Data->seekg( 0, m_Data->beg ); - stream << m_Data->rdbuf(); -} - -} -} -} -} diff --git a/cpp-restsdk/src/JsonBody.cpp b/cpp-restsdk/src/JsonBody.cpp deleted file mode 100644 index 1723591..0000000 --- a/cpp-restsdk/src/JsonBody.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/JsonBody.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -JsonBody::JsonBody( const web::json::value& json) - : m_Json(json) -{ -} - -JsonBody::~JsonBody() -{ -} - -void JsonBody::writeTo( std::ostream& target ) -{ - m_Json.serialize(target); -} - -} -} -} -} diff --git a/cpp-restsdk/src/ModelBase.cpp b/cpp-restsdk/src/ModelBase.cpp deleted file mode 100644 index 8b18764..0000000 --- a/cpp-restsdk/src/ModelBase.cpp +++ /dev/null @@ -1,666 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/ModelBase.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -ModelBase::ModelBase(): m_IsSet(false) -{ -} -ModelBase::~ModelBase() -{ -} -bool ModelBase::isSet() const -{ - return m_IsSet; -} -utility::string_t ModelBase::toString( const bool val ) -{ - utility::stringstream_t ss; - ss << val; - return utility::string_t(ss.str()); -} -utility::string_t ModelBase::toString( const float val ) -{ - utility::stringstream_t ss; - ss << val; - return utility::string_t(ss.str()); -} -utility::string_t ModelBase::toString( const double val ) -{ - utility::stringstream_t ss; - ss << val; - return utility::string_t(ss.str()); -} -utility::string_t ModelBase::toString( const int32_t val ) -{ - utility::stringstream_t ss; - ss << val; - return utility::string_t(ss.str()); -} -utility::string_t ModelBase::toString( const int64_t val ) -{ - utility::stringstream_t ss; - ss << val; - return utility::string_t(ss.str()); -} -utility::string_t ModelBase::toString (const utility::string_t &val ) -{ - utility::stringstream_t ss; - ss << val; - return utility::string_t(ss.str()); -} -utility::string_t ModelBase::toString( const utility::datetime &val ) -{ - return val.to_string(utility::datetime::ISO_8601); -} -utility::string_t ModelBase::toString( const web::json::value &val ) -{ - return val.serialize(); -} -utility::string_t ModelBase::toString( const std::shared_ptr& val ) -{ - utility::stringstream_t ss; - if( val != nullptr ) - { - ss << val->getData(); - } - return utility::string_t(ss.str()); -} -web::json::value ModelBase::toJson(bool value) -{ - return web::json::value::boolean(value); -} -web::json::value ModelBase::toJson( float value ) -{ - return web::json::value::number(value); -} -web::json::value ModelBase::toJson( double value ) -{ - return web::json::value::number(value); -} -web::json::value ModelBase::toJson( int32_t value ) -{ - return web::json::value::number(value); -} -web::json::value ModelBase::toJson( int64_t value ) -{ - return web::json::value::number(value); -} -web::json::value ModelBase::toJson( const utility::string_t& value ) -{ - return web::json::value::string(value); -} -web::json::value ModelBase::toJson( const utility::datetime& value ) -{ - return web::json::value::string(value.to_string(utility::datetime::ISO_8601)); -} -web::json::value ModelBase::toJson( const web::json::value& value ) -{ - return value; -} -web::json::value ModelBase::toJson( const std::shared_ptr& content ) -{ - web::json::value value; - if(content != nullptr) - { - value[utility::conversions::to_string_t("ContentDisposition")] = ModelBase::toJson(content->getContentDisposition()); - value[utility::conversions::to_string_t("ContentType")] = ModelBase::toJson(content->getContentType()); - value[utility::conversions::to_string_t("FileName")] = ModelBase::toJson(content->getFileName()); - value[utility::conversions::to_string_t("InputStream")] = web::json::value::string( ModelBase::toBase64(content->getData()) ); - } - return value; -} -web::json::value ModelBase::toJson( const std::shared_ptr& val ) -{ - web::json::value retVal; - if(val != nullptr) - { - retVal = toJson(*val); - } - return retVal; -} -bool ModelBase::fromString( const utility::string_t& val, bool &outVal ) -{ - utility::stringstream_t ss(val); - bool success = true; - try - { - ss >> outVal; - } - catch (...) - { - success = false; - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, float &outVal ) -{ - utility::stringstream_t ss(val); - bool success = true; - try - { - ss >> outVal; - } - catch (...) - { - int64_t intVal = 0; - success = ModelBase::fromString(val, intVal); - if(success) - { - outVal = static_cast(intVal); - } - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, double &outVal ) -{ - utility::stringstream_t ss(val); - bool success = true; - try - { - ss >> outVal; - } - catch (...) - { - int64_t intVal = 0; - success = ModelBase::fromString(val, intVal); - if(success) - { - outVal = static_cast(intVal); - } - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, int32_t &outVal ) -{ - utility::stringstream_t ss(val); - bool success = true; - try - { - ss >> outVal; - } - catch (...) - { - success = false; - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, int64_t &outVal ) -{ - utility::stringstream_t ss(val); - bool success = true; - try - { - ss >> outVal; - } - catch (...) - { - success = false; - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, utility::string_t &outVal ) -{ - utility::stringstream_t ss(val); - bool success = true; - try - { - ss >> outVal; - } - catch (...) - { - success = false; - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, utility::datetime &outVal ) -{ - bool success = true; - auto dt = utility::datetime::from_string(val, utility::datetime::ISO_8601); - if( dt.is_initialized() ) - { - outVal = dt; - } - else - { - success = false; - } - return success; -} -bool ModelBase::fromString( const utility::string_t& val, web::json::value &outVal ) -{ - outVal = web::json::value::parse(val); - return !outVal.is_null(); -} -bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr& outVal ) -{ - bool ok = true; - if(outVal == nullptr) - { - outVal = std::shared_ptr(new HttpContent()); - } - if(outVal != nullptr) - { - outVal->setData(std::shared_ptr(new std::stringstream(utility::conversions::to_utf8string(val)))); - } - else - { - ok = false; - } - return ok; -} -bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr& outVal ) -{ - bool ok = false; - if(outVal == nullptr) - { - outVal = std::shared_ptr(new utility::datetime()); - } - if( outVal != nullptr ) - { - ok = fromJson(web::json::value::parse(val), *outVal); - } - return ok; -} -bool ModelBase::fromJson( const web::json::value& val, bool & outVal ) -{ - outVal = !val.is_boolean() ? false : val.as_bool(); - return val.is_boolean(); -} -bool ModelBase::fromJson( const web::json::value& val, float & outVal ) -{ - outVal = (!val.is_double() && !val.is_integer()) ? std::numeric_limits::quiet_NaN(): static_cast(val.as_double()); - return val.is_double() || val.is_integer(); -} -bool ModelBase::fromJson( const web::json::value& val, double & outVal ) -{ - outVal = (!val.is_double() && !val.is_integer()) ? std::numeric_limits::quiet_NaN(): val.as_double(); - return val.is_double() || val.is_integer(); -} -bool ModelBase::fromJson( const web::json::value& val, int32_t & outVal ) -{ - outVal = !val.is_integer() ? std::numeric_limits::quiet_NaN() : val.as_integer(); - return val.is_integer(); -} -bool ModelBase::fromJson( const web::json::value& val, int64_t & outVal ) -{ - outVal = !val.is_number() ? std::numeric_limits::quiet_NaN() : val.as_number().to_int64(); - return val.is_number(); -} -bool ModelBase::fromJson( const web::json::value& val, utility::string_t & outVal ) -{ - outVal = val.is_string() ? val.as_string() : utility::conversions::to_string_t(""); - return val.is_string(); -} -bool ModelBase::fromJson( const web::json::value& val, utility::datetime & outVal ) -{ - outVal = val.is_null() ? utility::datetime::from_string(utility::conversions::to_string_t("NULL"), utility::datetime::ISO_8601) : utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601); - return outVal.is_initialized(); -} -bool ModelBase::fromJson( const web::json::value& val, web::json::value & outVal ) -{ - outVal = val; - return !val.is_null(); -} -bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr& content ) -{ - bool result = false; - if( content != nullptr) - { - result = true; - if(content == nullptr) - { - content = std::shared_ptr(new HttpContent()); - } - if(val.has_field(utility::conversions::to_string_t("ContentDisposition"))) - { - utility::string_t value; - result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("ContentDisposition")), value); - content->setContentDisposition( value ); - } - if(val.has_field(utility::conversions::to_string_t("ContentType"))) - { - utility::string_t value; - result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("ContentType")), value); - content->setContentType( value ); - } - if(val.has_field(utility::conversions::to_string_t("FileName"))) - { - utility::string_t value; - result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("FileName")), value); - content->setFileName( value ); - } - if(val.has_field(utility::conversions::to_string_t("InputStream"))) - { - utility::string_t value; - result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("InputStream")), value); - content->setData( ModelBase::fromBase64( value ) ); - } - } - return result; -} -bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr &outVal ) -{ - bool ok = false; - if(outVal == nullptr) - { - outVal = std::shared_ptr(new utility::datetime()); - } - if( outVal != nullptr ) - { - ok = fromJson(val, *outVal); - } - return ok; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, bool value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - std::stringstream* valueAsStringStream = new std::stringstream(); - (*valueAsStringStream) << value; - content->setData( std::shared_ptr( valueAsStringStream ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, float value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - std::stringstream* valueAsStringStream = new std::stringstream(); - (*valueAsStringStream) << value; - content->setData( std::shared_ptr( valueAsStringStream ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, double value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - std::stringstream* valueAsStringStream = new std::stringstream(); - (*valueAsStringStream) << value; - content->setData( std::shared_ptr( valueAsStringStream ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, int32_t value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - std::stringstream* valueAsStringStream = new std::stringstream(); - (*valueAsStringStream) << value; - content->setData( std::shared_ptr( valueAsStringStream ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, int64_t value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - std::stringstream* valueAsStringStream = new std::stringstream(); - (*valueAsStringStream) << value; - content->setData( std::shared_ptr( valueAsStringStream) ) ; - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType) -{ - std::shared_ptr content(new HttpContent); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string(value) ) ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string(value.to_string(utility::datetime::ISO_8601) ) ) ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, const web::json::value& value, const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string(value.serialize()) ) ) ); - return content; -} -std::shared_ptr ModelBase::toHttpContent( const utility::string_t& name, const std::shared_ptr& value ) -{ - std::shared_ptr content( new HttpContent ); - if( value != nullptr ) - { - content->setName( name ); - content->setContentDisposition( value->getContentDisposition() ); - content->setContentType( value->getContentType() ); - content->setData( value->getData() ); - content->setFileName( value->getFileName() ); - } - return content; -} -std::shared_ptr ModelBase::toHttpContent(const utility::string_t& name, const std::shared_ptr& value , const utility::string_t& contentType ) -{ - std::shared_ptr content( new HttpContent ); - if (value != nullptr ) - { - content->setName( name ); - content->setContentDisposition( utility::conversions::to_string_t("form-data") ); - content->setContentType( contentType ); - content->setData( std::shared_ptr( new std::stringstream( utility::conversions::to_utf8string( toJson(*value).serialize() ) ) ) ); - } - return content; -} -bool ModelBase::fromHttpContent(std::shared_ptr val, bool & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -bool ModelBase::fromHttpContent(std::shared_ptr val, float & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -bool ModelBase::fromHttpContent(std::shared_ptr val, double & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -bool ModelBase::fromHttpContent(std::shared_ptr val, int32_t & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -bool ModelBase::fromHttpContent(std::shared_ptr val, int64_t & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -bool ModelBase::fromHttpContent(std::shared_ptr val, utility::string_t & outVal ) -{ - if( val == nullptr ) return false; - std::shared_ptr data = val->getData(); - data->seekg( 0, data->beg ); - - std::string str((std::istreambuf_iterator(*data.get())), - std::istreambuf_iterator()); - outVal = utility::conversions::to_string_t(str); - return true; -} -bool ModelBase::fromHttpContent(std::shared_ptr val, utility::datetime & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - outVal = utility::datetime::from_string(str, utility::datetime::ISO_8601); - return true; -} -bool ModelBase::fromHttpContent(std::shared_ptr val, web::json::value & outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -bool ModelBase::fromHttpContent(std::shared_ptr val, std::shared_ptr& outVal ) -{ - utility::string_t str; - if( val == nullptr ) return false; - if( outVal == nullptr ) - { - outVal = std::shared_ptr(new HttpContent()); - } - ModelBase::fromHttpContent(val, str); - return fromString(str, outVal); -} -// base64 encoding/decoding based on : https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64#C.2B.2B -const static char Base64Chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -const static char Base64PadChar = '='; -utility::string_t ModelBase::toBase64( utility::string_t value ) -{ - std::shared_ptr source( new std::stringstream( utility::conversions::to_utf8string(value) ) ); - return ModelBase::toBase64(source); -} -utility::string_t ModelBase::toBase64( std::shared_ptr value ) -{ - value->seekg( 0, value->end ); - size_t length = value->tellg(); - value->seekg( 0, value->beg ); - utility::string_t base64; - base64.reserve( ((length / 3) + (length % 3 > 0)) * 4 ); - char read[3] = { 0 }; - uint32_t temp; - for ( size_t idx = 0; idx < length / 3; idx++ ) - { - value->read( read, 3 ); - temp = (read[0]) << 16; - temp += (read[1]) << 8; - temp += (read[2]); - base64.append( 1, Base64Chars[(temp & 0x00FC0000) >> 18] ); - base64.append( 1, Base64Chars[(temp & 0x0003F000) >> 12] ); - base64.append( 1, Base64Chars[(temp & 0x00000FC0) >> 6] ); - base64.append( 1, Base64Chars[(temp & 0x0000003F)] ); - } - switch ( length % 3 ) - { - case 1: - value->read( read, 1 ); - temp = read[0] << 16; - base64.append( 1, Base64Chars[(temp & 0x00FC0000) >> 18] ); - base64.append( 1, Base64Chars[(temp & 0x0003F000) >> 12] ); - base64.append( 2, Base64PadChar ); - break; - case 2: - value->read( read, 2 ); - temp = read[0] << 16; - temp += read[1] << 8; - base64.append( 1, Base64Chars[(temp & 0x00FC0000) >> 18] ); - base64.append( 1, Base64Chars[(temp & 0x0003F000) >> 12] ); - base64.append( 1, Base64Chars[(temp & 0x00000FC0) >> 6] ); - base64.append( 1, Base64PadChar ); - break; - } - return base64; -} -std::shared_ptr ModelBase::fromBase64( const utility::string_t& encoded ) -{ - std::shared_ptr result(new std::stringstream); - - char outBuf[3] = { 0 }; - uint32_t temp = 0; - - utility::string_t::const_iterator cursor = encoded.begin(); - while ( cursor < encoded.end() ) - { - for ( size_t quantumPosition = 0; quantumPosition < 4; quantumPosition++ ) - { - temp <<= 6; - if ( *cursor >= 0x41 && *cursor <= 0x5A ) - { - temp |= *cursor - 0x41; - } - else if ( *cursor >= 0x61 && *cursor <= 0x7A ) - { - temp |= *cursor - 0x47; - } - else if ( *cursor >= 0x30 && *cursor <= 0x39 ) - { - temp |= *cursor + 0x04; - } - else if ( *cursor == 0x2B ) - { - temp |= 0x3E; //change to 0x2D for URL alphabet - } - else if ( *cursor == 0x2F ) - { - temp |= 0x3F; //change to 0x5F for URL alphabet - } - else if ( *cursor == Base64PadChar ) //pad - { - switch ( encoded.end() - cursor ) - { - case 1: //One pad character - outBuf[0] = (temp >> 16) & 0x000000FF; - outBuf[1] = (temp >> 8) & 0x000000FF; - result->write( outBuf, 2 ); - return result; - case 2: //Two pad characters - outBuf[0] = (temp >> 10) & 0x000000FF; - result->write( outBuf, 1 ); - return result; - default: - throw web::json::json_exception( utility::conversions::to_string_t( "Invalid Padding in Base 64!" ).c_str() ); - } - } - else - { - throw web::json::json_exception( utility::conversions::to_string_t( "Non-Valid Character in Base 64!" ).c_str() ); - } - ++cursor; - } - - outBuf[0] = (temp >> 16) & 0x000000FF; - outBuf[1] = (temp >> 8) & 0x000000FF; - outBuf[2] = (temp) & 0x000000FF; - result->write( outBuf, 3 ); - } - - return result; -} - -} -} -} -} diff --git a/cpp-restsdk/src/MultipartFormData.cpp b/cpp-restsdk/src/MultipartFormData.cpp deleted file mode 100644 index 984083c..0000000 --- a/cpp-restsdk/src/MultipartFormData.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/MultipartFormData.h" -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -MultipartFormData::MultipartFormData() -{ - utility::stringstream_t uuidString; - uuidString << boost::uuids::random_generator()(); - m_Boundary = uuidString.str(); -} - -MultipartFormData::MultipartFormData(const utility::string_t& boundary) - : m_Boundary(boundary) -{ - -} - -MultipartFormData::~MultipartFormData() -{ -} - -utility::string_t MultipartFormData::getBoundary() -{ - return m_Boundary; -} - -void MultipartFormData::add( std::shared_ptr content ) -{ - m_Contents.push_back( content ); - m_ContentLookup[content->getName()] = content; -} - -bool MultipartFormData::hasContent(const utility::string_t& name) const -{ - return m_ContentLookup.find(name) != m_ContentLookup.end(); -} - -std::shared_ptr MultipartFormData::getContent(const utility::string_t& name) const -{ - auto result = m_ContentLookup.find(name); - if(result == m_ContentLookup.end()) - { - return std::shared_ptr(nullptr); - } - return result->second; -} - -void MultipartFormData::writeTo( std::ostream& target ) -{ - for ( size_t i = 0; i < m_Contents.size(); i++ ) - { - std::shared_ptr content = m_Contents[i]; - - // boundary - target << "\r\n" << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n"; - - // headers - target << "Content-Disposition: " << utility::conversions::to_utf8string( content->getContentDisposition() ); - if ( content->getName().size() > 0 ) - { - target << "; name=\"" << utility::conversions::to_utf8string( content->getName() ) << "\""; - } - if ( content->getFileName().size() > 0 ) - { - target << "; filename=\"" << utility::conversions::to_utf8string( content->getFileName() ) << "\""; - } - target << "\r\n"; - - if ( content->getContentType().size() > 0 ) - { - target << "Content-Type: " << utility::conversions::to_utf8string( content->getContentType() ) << "\r\n"; - } - - target << "\r\n"; - - // body - std::shared_ptr data = content->getData(); - - data->seekg( 0, data->end ); - std::vector dataBytes( data->tellg() ); - - data->seekg( 0, data->beg ); - data->read( &dataBytes[0], dataBytes.size() ); - - std::copy( dataBytes.begin(), dataBytes.end(), std::ostreambuf_iterator( target ) ); - } - - target << "\r\n--" << utility::conversions::to_utf8string( m_Boundary ) << "--\r\n"; -} - -} -} -} -} diff --git a/cpp-restsdk/src/Object.cpp b/cpp-restsdk/src/Object.cpp deleted file mode 100644 index fceb0f0..0000000 --- a/cpp-restsdk/src/Object.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -#include "CppRestOpenAPIClient/Object.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -Object::Object() -{ - m_object = web::json::value::object(); -} - -Object::~Object() -{ -} - -void Object::validate() -{ - -} - -web::json::value Object::toJson() const -{ - return m_object; -} - -bool Object::fromJson(const web::json::value& val) -{ - if (val.is_object()) - { - m_object = val; - m_IsSet = true; - } - return isSet(); -} - -void Object::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) - { - namePrefix += utility::conversions::to_string_t("."); - } - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("object"), m_object)); -} - -bool Object::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) - { - namePrefix += utility::conversions::to_string_t("."); - } - - if( ModelBase::fromHttpContent(multipart->getContent(namePrefix + utility::conversions::to_string_t("object")), m_object ) ) - { - m_IsSet = true; - } - return isSet(); -} - -web::json::value Object::getValue(const utility::string_t& key) const -{ - return m_object.at(key); -} - - -void Object::setValue(const utility::string_t& key, const web::json::value& value) -{ - if( !value.is_null() ) - { - m_object[key] = value; - m_IsSet = true; - } -} - -} -} -} -} diff --git a/cpp-restsdk/src/api/ChannelApi.cpp b/cpp-restsdk/src/api/ChannelApi.cpp deleted file mode 100644 index 39010d6..0000000 --- a/cpp-restsdk/src/api/ChannelApi.cpp +++ /dev/null @@ -1,1266 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -#include "CppRestOpenAPIClient/api/ChannelApi.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/JsonBody.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -ChannelApi::ChannelApi( std::shared_ptr apiClient ) - : m_ApiClient(apiClient) -{ -} - -ChannelApi::~ChannelApi() -{ -} - -pplx::task> ChannelApi::getCommerce() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/commerce"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->getCommerce does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->getCommerce does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getCommerce: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getCommerce: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new GetCommerce()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getCommerce: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::getExtendedStatistics() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/extendedStatistics"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->getExtendedStatistics does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->getExtendedStatistics does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getExtendedStatistics: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getExtendedStatistics: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new ChannelExtendedStatistics()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getExtendedStatistics: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::getMe() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/me"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->getMe does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->getMe does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getMe: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getMe: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new GetMe()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getMe: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::getSettings() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/settings"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->getSettings does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->getSettings does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getSettings: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getSettings: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new Settings()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getSettings: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::getStatistics(boost::optional date) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/statistics"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->getStatistics does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (date) - { - localVarQueryParams[utility::conversions::to_string_t("date")] = ApiClient::parameterToString(*date); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->getStatistics does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getStatistics: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getStatistics: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new ChannelStatistics()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getStatistics: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::getStatus() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/status"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->getStatus does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->getStatus does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getStatus: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getStatus: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new ChannelStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getStatus: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::outputIP() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/outputIP"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->outputIP does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->outputIP does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling outputIP: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling outputIP: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new GetIP()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling outputIP: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::setMe(std::shared_ptr setMeRequest) const -{ - - // verify the required parameter 'setMeRequest' is set - if (setMeRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'setMeRequest' when calling ChannelApi->setMe")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/me"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->setMe does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(setMeRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(setMeRequest.get()) - { - setMeRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("setMeRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->setMe does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling setMe: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setMe: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SetMe()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setMe: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ChannelApi::setSettings(std::shared_ptr settings) const -{ - - // verify the required parameter 'settings' is set - if (settings == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'settings' when calling ChannelApi->setSettings")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/settings"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ChannelApi->setSettings does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(settings); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(settings.get()) - { - settings->toMultipart(localVarMultipart, utility::conversions::to_string_t("settings")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ChannelApi->setSettings does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling setSettings: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setSettings: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SetSettings_200_response()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setSettings: unsupported response type")); - } - - return localVarResult; - }); -} - -} -} -} -} - diff --git a/cpp-restsdk/src/api/MediaApi.cpp b/cpp-restsdk/src/api/MediaApi.cpp deleted file mode 100644 index 1a07c32..0000000 --- a/cpp-restsdk/src/api/MediaApi.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -#include "CppRestOpenAPIClient/api/MediaApi.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/JsonBody.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -MediaApi::MediaApi( std::shared_ptr apiClient ) - : m_ApiClient(apiClient) -{ -} - -MediaApi::~MediaApi() -{ -} - -pplx::task> MediaApi::uploadMedia(std::shared_ptr uploadMedia) const -{ - - // verify the required parameter 'uploadMedia' is set - if (uploadMedia == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'uploadMedia' when calling MediaApi->uploadMedia")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/uploadMedia"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MediaApi->uploadMedia does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(uploadMedia); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(uploadMedia.get()) - { - uploadMedia->toMultipart(localVarMultipart, utility::conversions::to_string_t("uploadMedia")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MediaApi->uploadMedia does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling uploadMedia: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling uploadMedia: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new MediaId()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling uploadMedia: unsupported response type")); - } - - return localVarResult; - }); -} - -} -} -} -} - diff --git a/cpp-restsdk/src/api/MessagingApi.cpp b/cpp-restsdk/src/api/MessagingApi.cpp deleted file mode 100644 index e45fe96..0000000 --- a/cpp-restsdk/src/api/MessagingApi.cpp +++ /dev/null @@ -1,1124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -#include "CppRestOpenAPIClient/api/MessagingApi.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/JsonBody.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -MessagingApi::MessagingApi( std::shared_ptr apiClient ) - : m_ApiClient(apiClient) -{ -} - -MessagingApi::~MessagingApi() -{ -} - -pplx::task> MessagingApi::messagesList(boost::optional last, boost::optional lastMessageNumber, boost::optional firstMessageNumber, boost::optional limit, boost::optional chatId, boost::optional minTime, boost::optional maxTime, boost::optional msgId) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/messages"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->messagesList does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (last) - { - localVarQueryParams[utility::conversions::to_string_t("last")] = ApiClient::parameterToString(*last); - } - if (lastMessageNumber) - { - localVarQueryParams[utility::conversions::to_string_t("lastMessageNumber")] = ApiClient::parameterToString(*lastMessageNumber); - } - if (firstMessageNumber) - { - localVarQueryParams[utility::conversions::to_string_t("firstMessageNumber")] = ApiClient::parameterToString(*firstMessageNumber); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } - if (chatId) - { - localVarQueryParams[utility::conversions::to_string_t("chatId")] = ApiClient::parameterToString(*chatId); - } - if (minTime) - { - localVarQueryParams[utility::conversions::to_string_t("min_time")] = ApiClient::parameterToString(*minTime); - } - if (maxTime) - { - localVarQueryParams[utility::conversions::to_string_t("max_time")] = ApiClient::parameterToString(*maxTime); - } - if (msgId) - { - localVarQueryParams[utility::conversions::to_string_t("msgId")] = ApiClient::parameterToString(*msgId); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->messagesList does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling messagesList: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling messagesList: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new GetMessages()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling messagesList: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> MessagingApi::readMessage(boost::optional> readMessageRequest) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/readMessage"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->readMessage does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - if (readMessageRequest) - localVarJson = ModelBase::toJson(*readMessageRequest); - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(readMessageRequest && (*readMessageRequest).get()) - { - (*readMessageRequest)->toMultipart(localVarMultipart, utility::conversions::to_string_t("readMessageRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->readMessage does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling readMessage: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling readMessage: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SetMe()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling readMessage: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> MessagingApi::sendContact(std::shared_ptr sendContactRequest) const -{ - - // verify the required parameter 'sendContactRequest' is set - if (sendContactRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendContactRequest' when calling MessagingApi->sendContact")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendContact"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->sendContact does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendContactRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendContactRequest.get()) - { - sendContactRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendContactRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->sendContact does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendContact: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendContact: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendContact: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> MessagingApi::sendFile(std::shared_ptr sendFileRequest) const -{ - - // verify the required parameter 'sendFileRequest' is set - if (sendFileRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendFileRequest' when calling MessagingApi->sendFile")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendFile"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->sendFile does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendFileRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendFileRequest.get()) - { - sendFileRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendFileRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->sendFile does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendFile: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendFile: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendFile: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> MessagingApi::sendList(std::shared_ptr sendListRequest) const -{ - - // verify the required parameter 'sendListRequest' is set - if (sendListRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendListRequest' when calling MessagingApi->sendList")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendList"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->sendList does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendListRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendListRequest.get()) - { - sendListRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendListRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->sendList does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendList: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendList: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendList: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> MessagingApi::sendLocation(std::shared_ptr sendLocationRequest) const -{ - - // verify the required parameter 'sendLocationRequest' is set - if (sendLocationRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendLocationRequest' when calling MessagingApi->sendLocation")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendLocation"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->sendLocation does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendLocationRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendLocationRequest.get()) - { - sendLocationRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendLocationRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->sendLocation does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendLocation: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendLocation: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendLocation: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> MessagingApi::sendMessage(std::shared_ptr sendMessageRequest) const -{ - - // verify the required parameter 'sendMessageRequest' is set - if (sendMessageRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendMessageRequest' when calling MessagingApi->sendMessage")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendMessage"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("MessagingApi->sendMessage does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendMessageRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendMessageRequest.get()) - { - sendMessageRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendMessageRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("MessagingApi->sendMessage does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendMessage: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendMessage: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendMessage: unsupported response type")); - } - - return localVarResult; - }); -} - -} -} -} -} - diff --git a/cpp-restsdk/src/api/ProductsCatalogsApi.cpp b/cpp-restsdk/src/api/ProductsCatalogsApi.cpp deleted file mode 100644 index b116d5a..0000000 --- a/cpp-restsdk/src/api/ProductsCatalogsApi.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -#include "CppRestOpenAPIClient/api/ProductsCatalogsApi.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/JsonBody.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -ProductsCatalogsApi::ProductsCatalogsApi( std::shared_ptr apiClient ) - : m_ApiClient(apiClient) -{ -} - -ProductsCatalogsApi::~ProductsCatalogsApi() -{ -} - -pplx::task> ProductsCatalogsApi::sendProduct(std::shared_ptr sendProductRequest) const -{ - - // verify the required parameter 'sendProductRequest' is set - if (sendProductRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendProductRequest' when calling ProductsCatalogsApi->sendProduct")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendProduct"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ProductsCatalogsApi->sendProduct does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendProductRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendProductRequest.get()) - { - sendProductRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendProductRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ProductsCatalogsApi->sendProduct does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendProduct: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendProduct: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendProduct: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> ProductsCatalogsApi::setCommerce(std::shared_ptr commerce) const -{ - - // verify the required parameter 'commerce' is set - if (commerce == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'commerce' when calling ProductsCatalogsApi->setCommerce")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/commerce"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("ProductsCatalogsApi->setCommerce does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(commerce); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(commerce.get()) - { - commerce->toMultipart(localVarMultipart, utility::conversions::to_string_t("commerce")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("ProductsCatalogsApi->setCommerce does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling setCommerce: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setCommerce: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SetCommerce()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setCommerce: unsupported response type")); - } - - return localVarResult; - }); -} - -} -} -} -} - diff --git a/cpp-restsdk/src/api/TemplatesApi.cpp b/cpp-restsdk/src/api/TemplatesApi.cpp deleted file mode 100644 index 68a27db..0000000 --- a/cpp-restsdk/src/api/TemplatesApi.cpp +++ /dev/null @@ -1,636 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -#include "CppRestOpenAPIClient/api/TemplatesApi.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/JsonBody.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -TemplatesApi::TemplatesApi( std::shared_ptr apiClient ) - : m_ApiClient(apiClient) -{ -} - -TemplatesApi::~TemplatesApi() -{ -} - -pplx::task> TemplatesApi::addTemplate(std::shared_ptr addTemplateRequest) const -{ - - // verify the required parameter 'addTemplateRequest' is set - if (addTemplateRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'addTemplateRequest' when calling TemplatesApi->addTemplate")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/addTemplate"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("TemplatesApi->addTemplate does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(addTemplateRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(addTemplateRequest.get()) - { - addTemplateRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("addTemplateRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("TemplatesApi->addTemplate does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling addTemplate: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling addTemplate: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new Object()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling addTemplate: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> TemplatesApi::removeTemplate(std::shared_ptr removeTemplateRequest) const -{ - - // verify the required parameter 'removeTemplateRequest' is set - if (removeTemplateRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'removeTemplateRequest' when calling TemplatesApi->removeTemplate")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/removeTemplate"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("TemplatesApi->removeTemplate does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(removeTemplateRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(removeTemplateRequest.get()) - { - removeTemplateRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("removeTemplateRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("TemplatesApi->removeTemplate does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling removeTemplate: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling removeTemplate: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SetMe()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling removeTemplate: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> TemplatesApi::sendTemplate(std::shared_ptr sendTemplateRequest) const -{ - - // verify the required parameter 'sendTemplateRequest' is set - if (sendTemplateRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'sendTemplateRequest' when calling TemplatesApi->sendTemplate")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/sendTemplate"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("TemplatesApi->sendTemplate does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(sendTemplateRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(sendTemplateRequest.get()) - { - sendTemplateRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("sendTemplateRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("TemplatesApi->sendTemplate does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling sendTemplate: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendTemplate: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SendMessageStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling sendTemplate: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> TemplatesApi::templatesList() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/templates"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("TemplatesApi->templatesList does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("TemplatesApi->templatesList does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling templatesList: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling templatesList: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new GetTemplates()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling templatesList: unsupported response type")); - } - - return localVarResult; - }); -} - -} -} -} -} - diff --git a/cpp-restsdk/src/api/WebhooksApi.cpp b/cpp-restsdk/src/api/WebhooksApi.cpp deleted file mode 100644 index 86cd92a..0000000 --- a/cpp-restsdk/src/api/WebhooksApi.cpp +++ /dev/null @@ -1,331 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -#include "CppRestOpenAPIClient/api/WebhooksApi.h" -#include "CppRestOpenAPIClient/IHttpBody.h" -#include "CppRestOpenAPIClient/JsonBody.h" -#include "CppRestOpenAPIClient/MultipartFormData.h" - -#include - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace api { - -using namespace org::openapitools::client::model; - -WebhooksApi::WebhooksApi( std::shared_ptr apiClient ) - : m_ApiClient(apiClient) -{ -} - -WebhooksApi::~WebhooksApi() -{ -} - -pplx::task> WebhooksApi::ackHookInfo(utility::string_t messageId) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/hookInfo"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("WebhooksApi->ackHookInfo does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("messageId")] = ApiClient::parameterToString(messageId); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("WebhooksApi->ackHookInfo does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling ackHookInfo: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling ackHookInfo: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new GetAckInfo()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling ackHookInfo: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> WebhooksApi::setWebhook(std::shared_ptr webhookUrl) const -{ - - // verify the required parameter 'webhookUrl' is set - if (webhookUrl == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'webhookUrl' when calling WebhooksApi->setWebhook")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/webhook"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("WebhooksApi->setWebhook does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(webhookUrl); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(webhookUrl.get()) - { - webhookUrl->toMultipart(localVarMultipart, utility::conversions::to_string_t("webhookUrl")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("WebhooksApi->setWebhook does not consume any supported media type")); - } - - // authentication (token) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("token")); - if ( localVarApiKey.size() > 0 ) - { - localVarQueryParams[utility::conversions::to_string_t("token")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling setWebhook: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setWebhook: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new SetWebhookStatus()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling setWebhook: unsupported response type")); - } - - return localVarResult; - }); -} - -} -} -} -} - diff --git a/cpp-restsdk/src/model/Ack.cpp b/cpp-restsdk/src/model/Ack.cpp deleted file mode 100644 index 06d3b29..0000000 --- a/cpp-restsdk/src/model/Ack.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Ack.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Ack::Ack() -{ - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; -} - -Ack::~Ack() -{ -} - -void Ack::validate() -{ - // TODO: implement validation -} - -web::json::value Ack::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_StatusIsSet) - { - val[utility::conversions::to_string_t(U("status"))] = ModelBase::toJson(m_Status); - } - - return val; -} - -bool Ack::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - } - } - return ok; -} - -void Ack::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status)); - } -} - -bool Ack::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - return ok; -} - -utility::string_t Ack::getId() const -{ - return m_Id; -} - -void Ack::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool Ack::idIsSet() const -{ - return m_IdIsSet; -} - -void Ack::unsetId() -{ - m_IdIsSet = false; -} -utility::string_t Ack::getChatId() const -{ - return m_ChatId; -} - -void Ack::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool Ack::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void Ack::unsetChatId() -{ - m_ChatIdIsSet = false; -} -utility::string_t Ack::getStatus() const -{ - return m_Status; -} - -void Ack::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool Ack::statusIsSet() const -{ - return m_StatusIsSet; -} - -void Ack::unsetStatus() -{ - m_StatusIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/AddTemplateRequest.cpp b/cpp-restsdk/src/model/AddTemplateRequest.cpp deleted file mode 100644 index b013f91..0000000 --- a/cpp-restsdk/src/model/AddTemplateRequest.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/AddTemplateRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -AddTemplateRequest::AddTemplateRequest() -{ - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; - m_CategoryIsSet = false; - m_ComponentsIsSet = false; - m_LanguageIsSet = false; -} - -AddTemplateRequest::~AddTemplateRequest() -{ -} - -void AddTemplateRequest::validate() -{ - // TODO: implement validation -} - -web::json::value AddTemplateRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_NameIsSet) - { - val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name); - } - if(m_CategoryIsSet) - { - val[utility::conversions::to_string_t(U("category"))] = ModelBase::toJson(m_Category); - } - if(m_ComponentsIsSet) - { - val[utility::conversions::to_string_t(U("components"))] = ModelBase::toJson(m_Components); - } - if(m_LanguageIsSet) - { - val[utility::conversions::to_string_t(U("language"))] = ModelBase::toJson(m_Language); - } - - return val; -} - -bool AddTemplateRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - } - } - if(val.has_field(utility::conversions::to_string_t(U("category")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("category"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setCategory; - ok &= ModelBase::fromJson(fieldValue, refVal_setCategory); - setCategory(refVal_setCategory); - } - } - if(val.has_field(utility::conversions::to_string_t(U("components")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("components"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setComponents; - ok &= ModelBase::fromJson(fieldValue, refVal_setComponents); - setComponents(refVal_setComponents); - } - } - if(val.has_field(utility::conversions::to_string_t(U("language")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("language"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setLanguage; - ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage); - setLanguage(refVal_setLanguage); - } - } - return ok; -} - -void AddTemplateRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name)); - } - if(m_CategoryIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("category")), m_Category)); - } - if(m_ComponentsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("components")), m_Components)); - } - if(m_LanguageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("language")), m_Language)); - } -} - -bool AddTemplateRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName ); - setName(refVal_setName); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("category")))) - { - std::shared_ptr refVal_setCategory; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("category"))), refVal_setCategory ); - setCategory(refVal_setCategory); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("components")))) - { - std::shared_ptr refVal_setComponents; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("components"))), refVal_setComponents ); - setComponents(refVal_setComponents); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("language")))) - { - std::shared_ptr refVal_setLanguage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("language"))), refVal_setLanguage ); - setLanguage(refVal_setLanguage); - } - return ok; -} - -utility::string_t AddTemplateRequest::getName() const -{ - return m_Name; -} - -void AddTemplateRequest::setName(const utility::string_t& value) -{ - m_Name = value; - m_NameIsSet = true; -} - -bool AddTemplateRequest::nameIsSet() const -{ - return m_NameIsSet; -} - -void AddTemplateRequest::unsetName() -{ - m_NameIsSet = false; -} -std::shared_ptr AddTemplateRequest::getCategory() const -{ - return m_Category; -} - -void AddTemplateRequest::setCategory(const std::shared_ptr& value) -{ - m_Category = value; - m_CategoryIsSet = true; -} - -bool AddTemplateRequest::categoryIsSet() const -{ - return m_CategoryIsSet; -} - -void AddTemplateRequest::unsetCategory() -{ - m_CategoryIsSet = false; -} -std::shared_ptr AddTemplateRequest::getComponents() const -{ - return m_Components; -} - -void AddTemplateRequest::setComponents(const std::shared_ptr& value) -{ - m_Components = value; - m_ComponentsIsSet = true; -} - -bool AddTemplateRequest::componentsIsSet() const -{ - return m_ComponentsIsSet; -} - -void AddTemplateRequest::unsetComponents() -{ - m_ComponentsIsSet = false; -} -std::shared_ptr AddTemplateRequest::getLanguage() const -{ - return m_Language; -} - -void AddTemplateRequest::setLanguage(const std::shared_ptr& value) -{ - m_Language = value; - m_LanguageIsSet = true; -} - -bool AddTemplateRequest::languageIsSet() const -{ - return m_LanguageIsSet; -} - -void AddTemplateRequest::unsetLanguage() -{ - m_LanguageIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ChannelExtendedStatistics.cpp b/cpp-restsdk/src/model/ChannelExtendedStatistics.cpp deleted file mode 100644 index 7e37a57..0000000 --- a/cpp-restsdk/src/model/ChannelExtendedStatistics.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ChannelExtendedStatistics.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ChannelExtendedStatistics::ChannelExtendedStatistics() -{ -} - -ChannelExtendedStatistics::~ChannelExtendedStatistics() -{ -} - -void ChannelExtendedStatistics::validate() -{ - // TODO: implement validation -} - -web::json::value ChannelExtendedStatistics::toJson() const -{ - - web::json::value val = web::json::value::object(); - - - return val; -} - -bool ChannelExtendedStatistics::fromJson(const web::json::value& val) -{ - bool ok = true; - - return ok; -} - -void ChannelExtendedStatistics::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } -} - -bool ChannelExtendedStatistics::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - return ok; -} - -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ChannelExtendedStatistics_inner.cpp b/cpp-restsdk/src/model/ChannelExtendedStatistics_inner.cpp deleted file mode 100644 index dcea8c7..0000000 --- a/cpp-restsdk/src/model/ChannelExtendedStatistics_inner.cpp +++ /dev/null @@ -1,677 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ChannelExtendedStatistics_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ChannelExtendedStatistics_inner::ChannelExtendedStatistics_inner() -{ - m_Business_initiated_paid_quantity = 0; - m_Business_initiated_paid_quantityIsSet = false; - m_Business_initiated_price = 0.0; - m_Business_initiated_priceIsSet = false; - m_Business_initiated_quantity = 0; - m_Business_initiated_quantityIsSet = false; - m_Free_entry_point = 0; - m_Free_entry_pointIsSet = false; - m_Free_quantity = 0; - m_Free_quantityIsSet = false; - m_Free_tier = 0; - m_Free_tierIsSet = false; - m_Paid_quantity = 0; - m_Paid_quantityIsSet = false; - m_Period_date = utility::conversions::to_string_t(""); - m_Period_dateIsSet = false; - m_Quantity = 0.0; - m_QuantityIsSet = false; - m_Total_price = 0.0; - m_Total_priceIsSet = false; - m_User_initiated_paid_quantity = 0; - m_User_initiated_paid_quantityIsSet = false; - m_User_initiated_price = 0.0; - m_User_initiated_priceIsSet = false; - m_User_initiated_quantity = 0; - m_User_initiated_quantityIsSet = false; -} - -ChannelExtendedStatistics_inner::~ChannelExtendedStatistics_inner() -{ -} - -void ChannelExtendedStatistics_inner::validate() -{ - // TODO: implement validation -} - -web::json::value ChannelExtendedStatistics_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Business_initiated_paid_quantityIsSet) - { - val[utility::conversions::to_string_t(U("business_initiated_paid_quantity"))] = ModelBase::toJson(m_Business_initiated_paid_quantity); - } - if(m_Business_initiated_priceIsSet) - { - val[utility::conversions::to_string_t(U("business_initiated_price"))] = ModelBase::toJson(m_Business_initiated_price); - } - if(m_Business_initiated_quantityIsSet) - { - val[utility::conversions::to_string_t(U("business_initiated_quantity"))] = ModelBase::toJson(m_Business_initiated_quantity); - } - if(m_Free_entry_pointIsSet) - { - val[utility::conversions::to_string_t(U("free_entry_point"))] = ModelBase::toJson(m_Free_entry_point); - } - if(m_Free_quantityIsSet) - { - val[utility::conversions::to_string_t(U("free_quantity"))] = ModelBase::toJson(m_Free_quantity); - } - if(m_Free_tierIsSet) - { - val[utility::conversions::to_string_t(U("free_tier"))] = ModelBase::toJson(m_Free_tier); - } - if(m_Paid_quantityIsSet) - { - val[utility::conversions::to_string_t(U("paid_quantity"))] = ModelBase::toJson(m_Paid_quantity); - } - if(m_Period_dateIsSet) - { - val[utility::conversions::to_string_t(U("period_date"))] = ModelBase::toJson(m_Period_date); - } - if(m_QuantityIsSet) - { - val[utility::conversions::to_string_t(U("quantity"))] = ModelBase::toJson(m_Quantity); - } - if(m_Total_priceIsSet) - { - val[utility::conversions::to_string_t(U("total_price"))] = ModelBase::toJson(m_Total_price); - } - if(m_User_initiated_paid_quantityIsSet) - { - val[utility::conversions::to_string_t(U("user_initiated_paid_quantity"))] = ModelBase::toJson(m_User_initiated_paid_quantity); - } - if(m_User_initiated_priceIsSet) - { - val[utility::conversions::to_string_t(U("user_initiated_price"))] = ModelBase::toJson(m_User_initiated_price); - } - if(m_User_initiated_quantityIsSet) - { - val[utility::conversions::to_string_t(U("user_initiated_quantity"))] = ModelBase::toJson(m_User_initiated_quantity); - } - - return val; -} - -bool ChannelExtendedStatistics_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("business_initiated_paid_quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("business_initiated_paid_quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setBusinessInitiatedPaidQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setBusinessInitiatedPaidQuantity); - setBusinessInitiatedPaidQuantity(refVal_setBusinessInitiatedPaidQuantity); - } - } - if(val.has_field(utility::conversions::to_string_t(U("business_initiated_price")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("business_initiated_price"))); - if(!fieldValue.is_null()) - { - double refVal_setBusinessInitiatedPrice; - ok &= ModelBase::fromJson(fieldValue, refVal_setBusinessInitiatedPrice); - setBusinessInitiatedPrice(refVal_setBusinessInitiatedPrice); - } - } - if(val.has_field(utility::conversions::to_string_t(U("business_initiated_quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("business_initiated_quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setBusinessInitiatedQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setBusinessInitiatedQuantity); - setBusinessInitiatedQuantity(refVal_setBusinessInitiatedQuantity); - } - } - if(val.has_field(utility::conversions::to_string_t(U("free_entry_point")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("free_entry_point"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setFreeEntryPoint; - ok &= ModelBase::fromJson(fieldValue, refVal_setFreeEntryPoint); - setFreeEntryPoint(refVal_setFreeEntryPoint); - } - } - if(val.has_field(utility::conversions::to_string_t(U("free_quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("free_quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setFreeQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setFreeQuantity); - setFreeQuantity(refVal_setFreeQuantity); - } - } - if(val.has_field(utility::conversions::to_string_t(U("free_tier")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("free_tier"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setFreeTier; - ok &= ModelBase::fromJson(fieldValue, refVal_setFreeTier); - setFreeTier(refVal_setFreeTier); - } - } - if(val.has_field(utility::conversions::to_string_t(U("paid_quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("paid_quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPaidQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setPaidQuantity); - setPaidQuantity(refVal_setPaidQuantity); - } - } - if(val.has_field(utility::conversions::to_string_t(U("period_date")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("period_date"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPeriodDate; - ok &= ModelBase::fromJson(fieldValue, refVal_setPeriodDate); - setPeriodDate(refVal_setPeriodDate); - } - } - if(val.has_field(utility::conversions::to_string_t(U("quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("quantity"))); - if(!fieldValue.is_null()) - { - double refVal_setQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setQuantity); - setQuantity(refVal_setQuantity); - } - } - if(val.has_field(utility::conversions::to_string_t(U("total_price")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("total_price"))); - if(!fieldValue.is_null()) - { - double refVal_setTotalPrice; - ok &= ModelBase::fromJson(fieldValue, refVal_setTotalPrice); - setTotalPrice(refVal_setTotalPrice); - } - } - if(val.has_field(utility::conversions::to_string_t(U("user_initiated_paid_quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("user_initiated_paid_quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setUserInitiatedPaidQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setUserInitiatedPaidQuantity); - setUserInitiatedPaidQuantity(refVal_setUserInitiatedPaidQuantity); - } - } - if(val.has_field(utility::conversions::to_string_t(U("user_initiated_price")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("user_initiated_price"))); - if(!fieldValue.is_null()) - { - double refVal_setUserInitiatedPrice; - ok &= ModelBase::fromJson(fieldValue, refVal_setUserInitiatedPrice); - setUserInitiatedPrice(refVal_setUserInitiatedPrice); - } - } - if(val.has_field(utility::conversions::to_string_t(U("user_initiated_quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("user_initiated_quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setUserInitiatedQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setUserInitiatedQuantity); - setUserInitiatedQuantity(refVal_setUserInitiatedQuantity); - } - } - return ok; -} - -void ChannelExtendedStatistics_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Business_initiated_paid_quantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("business_initiated_paid_quantity")), m_Business_initiated_paid_quantity)); - } - if(m_Business_initiated_priceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("business_initiated_price")), m_Business_initiated_price)); - } - if(m_Business_initiated_quantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("business_initiated_quantity")), m_Business_initiated_quantity)); - } - if(m_Free_entry_pointIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("free_entry_point")), m_Free_entry_point)); - } - if(m_Free_quantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("free_quantity")), m_Free_quantity)); - } - if(m_Free_tierIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("free_tier")), m_Free_tier)); - } - if(m_Paid_quantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("paid_quantity")), m_Paid_quantity)); - } - if(m_Period_dateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("period_date")), m_Period_date)); - } - if(m_QuantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("quantity")), m_Quantity)); - } - if(m_Total_priceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("total_price")), m_Total_price)); - } - if(m_User_initiated_paid_quantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_initiated_paid_quantity")), m_User_initiated_paid_quantity)); - } - if(m_User_initiated_priceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_initiated_price")), m_User_initiated_price)); - } - if(m_User_initiated_quantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_initiated_quantity")), m_User_initiated_quantity)); - } -} - -bool ChannelExtendedStatistics_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("business_initiated_paid_quantity")))) - { - int32_t refVal_setBusinessInitiatedPaidQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("business_initiated_paid_quantity"))), refVal_setBusinessInitiatedPaidQuantity ); - setBusinessInitiatedPaidQuantity(refVal_setBusinessInitiatedPaidQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("business_initiated_price")))) - { - double refVal_setBusinessInitiatedPrice; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("business_initiated_price"))), refVal_setBusinessInitiatedPrice ); - setBusinessInitiatedPrice(refVal_setBusinessInitiatedPrice); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("business_initiated_quantity")))) - { - int32_t refVal_setBusinessInitiatedQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("business_initiated_quantity"))), refVal_setBusinessInitiatedQuantity ); - setBusinessInitiatedQuantity(refVal_setBusinessInitiatedQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("free_entry_point")))) - { - int32_t refVal_setFreeEntryPoint; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("free_entry_point"))), refVal_setFreeEntryPoint ); - setFreeEntryPoint(refVal_setFreeEntryPoint); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("free_quantity")))) - { - int32_t refVal_setFreeQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("free_quantity"))), refVal_setFreeQuantity ); - setFreeQuantity(refVal_setFreeQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("free_tier")))) - { - int32_t refVal_setFreeTier; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("free_tier"))), refVal_setFreeTier ); - setFreeTier(refVal_setFreeTier); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("paid_quantity")))) - { - int32_t refVal_setPaidQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("paid_quantity"))), refVal_setPaidQuantity ); - setPaidQuantity(refVal_setPaidQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("period_date")))) - { - utility::string_t refVal_setPeriodDate; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("period_date"))), refVal_setPeriodDate ); - setPeriodDate(refVal_setPeriodDate); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("quantity")))) - { - double refVal_setQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("quantity"))), refVal_setQuantity ); - setQuantity(refVal_setQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("total_price")))) - { - double refVal_setTotalPrice; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("total_price"))), refVal_setTotalPrice ); - setTotalPrice(refVal_setTotalPrice); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("user_initiated_paid_quantity")))) - { - int32_t refVal_setUserInitiatedPaidQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_initiated_paid_quantity"))), refVal_setUserInitiatedPaidQuantity ); - setUserInitiatedPaidQuantity(refVal_setUserInitiatedPaidQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("user_initiated_price")))) - { - double refVal_setUserInitiatedPrice; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_initiated_price"))), refVal_setUserInitiatedPrice ); - setUserInitiatedPrice(refVal_setUserInitiatedPrice); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("user_initiated_quantity")))) - { - int32_t refVal_setUserInitiatedQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_initiated_quantity"))), refVal_setUserInitiatedQuantity ); - setUserInitiatedQuantity(refVal_setUserInitiatedQuantity); - } - return ok; -} - -int32_t ChannelExtendedStatistics_inner::getBusinessInitiatedPaidQuantity() const -{ - return m_Business_initiated_paid_quantity; -} - -void ChannelExtendedStatistics_inner::setBusinessInitiatedPaidQuantity(int32_t value) -{ - m_Business_initiated_paid_quantity = value; - m_Business_initiated_paid_quantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::businessInitiatedPaidQuantityIsSet() const -{ - return m_Business_initiated_paid_quantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetBusiness_initiated_paid_quantity() -{ - m_Business_initiated_paid_quantityIsSet = false; -} -double ChannelExtendedStatistics_inner::getBusinessInitiatedPrice() const -{ - return m_Business_initiated_price; -} - -void ChannelExtendedStatistics_inner::setBusinessInitiatedPrice(double value) -{ - m_Business_initiated_price = value; - m_Business_initiated_priceIsSet = true; -} - -bool ChannelExtendedStatistics_inner::businessInitiatedPriceIsSet() const -{ - return m_Business_initiated_priceIsSet; -} - -void ChannelExtendedStatistics_inner::unsetBusiness_initiated_price() -{ - m_Business_initiated_priceIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getBusinessInitiatedQuantity() const -{ - return m_Business_initiated_quantity; -} - -void ChannelExtendedStatistics_inner::setBusinessInitiatedQuantity(int32_t value) -{ - m_Business_initiated_quantity = value; - m_Business_initiated_quantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::businessInitiatedQuantityIsSet() const -{ - return m_Business_initiated_quantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetBusiness_initiated_quantity() -{ - m_Business_initiated_quantityIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getFreeEntryPoint() const -{ - return m_Free_entry_point; -} - -void ChannelExtendedStatistics_inner::setFreeEntryPoint(int32_t value) -{ - m_Free_entry_point = value; - m_Free_entry_pointIsSet = true; -} - -bool ChannelExtendedStatistics_inner::freeEntryPointIsSet() const -{ - return m_Free_entry_pointIsSet; -} - -void ChannelExtendedStatistics_inner::unsetFree_entry_point() -{ - m_Free_entry_pointIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getFreeQuantity() const -{ - return m_Free_quantity; -} - -void ChannelExtendedStatistics_inner::setFreeQuantity(int32_t value) -{ - m_Free_quantity = value; - m_Free_quantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::freeQuantityIsSet() const -{ - return m_Free_quantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetFree_quantity() -{ - m_Free_quantityIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getFreeTier() const -{ - return m_Free_tier; -} - -void ChannelExtendedStatistics_inner::setFreeTier(int32_t value) -{ - m_Free_tier = value; - m_Free_tierIsSet = true; -} - -bool ChannelExtendedStatistics_inner::freeTierIsSet() const -{ - return m_Free_tierIsSet; -} - -void ChannelExtendedStatistics_inner::unsetFree_tier() -{ - m_Free_tierIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getPaidQuantity() const -{ - return m_Paid_quantity; -} - -void ChannelExtendedStatistics_inner::setPaidQuantity(int32_t value) -{ - m_Paid_quantity = value; - m_Paid_quantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::paidQuantityIsSet() const -{ - return m_Paid_quantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetPaid_quantity() -{ - m_Paid_quantityIsSet = false; -} -utility::string_t ChannelExtendedStatistics_inner::getPeriodDate() const -{ - return m_Period_date; -} - -void ChannelExtendedStatistics_inner::setPeriodDate(const utility::string_t& value) -{ - m_Period_date = value; - m_Period_dateIsSet = true; -} - -bool ChannelExtendedStatistics_inner::periodDateIsSet() const -{ - return m_Period_dateIsSet; -} - -void ChannelExtendedStatistics_inner::unsetPeriod_date() -{ - m_Period_dateIsSet = false; -} -double ChannelExtendedStatistics_inner::getQuantity() const -{ - return m_Quantity; -} - -void ChannelExtendedStatistics_inner::setQuantity(double value) -{ - m_Quantity = value; - m_QuantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::quantityIsSet() const -{ - return m_QuantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetQuantity() -{ - m_QuantityIsSet = false; -} -double ChannelExtendedStatistics_inner::getTotalPrice() const -{ - return m_Total_price; -} - -void ChannelExtendedStatistics_inner::setTotalPrice(double value) -{ - m_Total_price = value; - m_Total_priceIsSet = true; -} - -bool ChannelExtendedStatistics_inner::totalPriceIsSet() const -{ - return m_Total_priceIsSet; -} - -void ChannelExtendedStatistics_inner::unsetTotal_price() -{ - m_Total_priceIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getUserInitiatedPaidQuantity() const -{ - return m_User_initiated_paid_quantity; -} - -void ChannelExtendedStatistics_inner::setUserInitiatedPaidQuantity(int32_t value) -{ - m_User_initiated_paid_quantity = value; - m_User_initiated_paid_quantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::userInitiatedPaidQuantityIsSet() const -{ - return m_User_initiated_paid_quantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetUser_initiated_paid_quantity() -{ - m_User_initiated_paid_quantityIsSet = false; -} -double ChannelExtendedStatistics_inner::getUserInitiatedPrice() const -{ - return m_User_initiated_price; -} - -void ChannelExtendedStatistics_inner::setUserInitiatedPrice(double value) -{ - m_User_initiated_price = value; - m_User_initiated_priceIsSet = true; -} - -bool ChannelExtendedStatistics_inner::userInitiatedPriceIsSet() const -{ - return m_User_initiated_priceIsSet; -} - -void ChannelExtendedStatistics_inner::unsetUser_initiated_price() -{ - m_User_initiated_priceIsSet = false; -} -int32_t ChannelExtendedStatistics_inner::getUserInitiatedQuantity() const -{ - return m_User_initiated_quantity; -} - -void ChannelExtendedStatistics_inner::setUserInitiatedQuantity(int32_t value) -{ - m_User_initiated_quantity = value; - m_User_initiated_quantityIsSet = true; -} - -bool ChannelExtendedStatistics_inner::userInitiatedQuantityIsSet() const -{ - return m_User_initiated_quantityIsSet; -} - -void ChannelExtendedStatistics_inner::unsetUser_initiated_quantity() -{ - m_User_initiated_quantityIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ChannelStatistics.cpp b/cpp-restsdk/src/model/ChannelStatistics.cpp deleted file mode 100644 index 0744de6..0000000 --- a/cpp-restsdk/src/model/ChannelStatistics.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ChannelStatistics.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ChannelStatistics::ChannelStatistics() -{ - m_date = utility::conversions::to_string_t(""); - m_dateIsSet = false; - m_Templates_cost = 0.0; - m_Templates_costIsSet = false; -} - -ChannelStatistics::~ChannelStatistics() -{ -} - -void ChannelStatistics::validate() -{ - // TODO: implement validation -} - -web::json::value ChannelStatistics::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_dateIsSet) - { - val[utility::conversions::to_string_t(U("date"))] = ModelBase::toJson(m_date); - } - if(m_Templates_costIsSet) - { - val[utility::conversions::to_string_t(U("templates_cost"))] = ModelBase::toJson(m_Templates_cost); - } - - return val; -} - -bool ChannelStatistics::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("date")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("date"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDate; - ok &= ModelBase::fromJson(fieldValue, refVal_setDate); - setDate(refVal_setDate); - } - } - if(val.has_field(utility::conversions::to_string_t(U("templates_cost")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("templates_cost"))); - if(!fieldValue.is_null()) - { - double refVal_setTemplatesCost; - ok &= ModelBase::fromJson(fieldValue, refVal_setTemplatesCost); - setTemplatesCost(refVal_setTemplatesCost); - } - } - return ok; -} - -void ChannelStatistics::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_dateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("date")), m_date)); - } - if(m_Templates_costIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("templates_cost")), m_Templates_cost)); - } -} - -bool ChannelStatistics::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("date")))) - { - utility::string_t refVal_setDate; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("date"))), refVal_setDate ); - setDate(refVal_setDate); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("templates_cost")))) - { - double refVal_setTemplatesCost; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("templates_cost"))), refVal_setTemplatesCost ); - setTemplatesCost(refVal_setTemplatesCost); - } - return ok; -} - -utility::string_t ChannelStatistics::getDate() const -{ - return m_date; -} - -void ChannelStatistics::setDate(const utility::string_t& value) -{ - m_date = value; - m_dateIsSet = true; -} - -bool ChannelStatistics::dateIsSet() const -{ - return m_dateIsSet; -} - -void ChannelStatistics::unsetdate() -{ - m_dateIsSet = false; -} -double ChannelStatistics::getTemplatesCost() const -{ - return m_Templates_cost; -} - -void ChannelStatistics::setTemplatesCost(double value) -{ - m_Templates_cost = value; - m_Templates_costIsSet = true; -} - -bool ChannelStatistics::templatesCostIsSet() const -{ - return m_Templates_costIsSet; -} - -void ChannelStatistics::unsetTemplates_cost() -{ - m_Templates_costIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ChannelStatus.cpp b/cpp-restsdk/src/model/ChannelStatus.cpp deleted file mode 100644 index 21a2639..0000000 --- a/cpp-restsdk/src/model/ChannelStatus.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ChannelStatus.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ChannelStatus::ChannelStatus() -{ - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; -} - -ChannelStatus::~ChannelStatus() -{ -} - -void ChannelStatus::validate() -{ - // TODO: implement validation -} - -web::json::value ChannelStatus::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_StatusIsSet) - { - val[utility::conversions::to_string_t(U("status"))] = ModelBase::toJson(m_Status); - } - - return val; -} - -bool ChannelStatus::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - } - } - return ok; -} - -void ChannelStatus::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status)); - } -} - -bool ChannelStatus::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - return ok; -} - -utility::string_t ChannelStatus::getStatus() const -{ - return m_Status; -} - -void ChannelStatus::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool ChannelStatus::statusIsSet() const -{ - return m_StatusIsSet; -} - -void ChannelStatus::unsetStatus() -{ - m_StatusIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ChatIdProp.cpp b/cpp-restsdk/src/model/ChatIdProp.cpp deleted file mode 100644 index 9c1092c..0000000 --- a/cpp-restsdk/src/model/ChatIdProp.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ChatIdProp.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ChatIdProp::ChatIdProp() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; -} - -ChatIdProp::~ChatIdProp() -{ -} - -void ChatIdProp::validate() -{ - // TODO: implement validation -} - -web::json::value ChatIdProp::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - - return val; -} - -bool ChatIdProp::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - return ok; -} - -void ChatIdProp::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } -} - -bool ChatIdProp::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - return ok; -} - -utility::string_t ChatIdProp::getChatId() const -{ - return m_ChatId; -} - -void ChatIdProp::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool ChatIdProp::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void ChatIdProp::unsetChatId() -{ - m_ChatIdIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/Commerce.cpp b/cpp-restsdk/src/model/Commerce.cpp deleted file mode 100644 index 0ecf3c6..0000000 --- a/cpp-restsdk/src/model/Commerce.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Commerce.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Commerce::Commerce() -{ - m_ParamsIsSet = false; -} - -Commerce::~Commerce() -{ -} - -void Commerce::validate() -{ - // TODO: implement validation -} - -web::json::value Commerce::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ParamsIsSet) - { - val[utility::conversions::to_string_t(U("params"))] = ModelBase::toJson(m_Params); - } - - return val; -} - -bool Commerce::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("params")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("params"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setParams; - ok &= ModelBase::fromJson(fieldValue, refVal_setParams); - setParams(refVal_setParams); - } - } - return ok; -} - -void Commerce::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ParamsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("params")), m_Params)); - } -} - -bool Commerce::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("params")))) - { - std::shared_ptr refVal_setParams; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("params"))), refVal_setParams ); - setParams(refVal_setParams); - } - return ok; -} - -std::shared_ptr Commerce::getParams() const -{ - return m_Params; -} - -void Commerce::setParams(const std::shared_ptr& value) -{ - m_Params = value; - m_ParamsIsSet = true; -} - -bool Commerce::paramsIsSet() const -{ - return m_ParamsIsSet; -} - -void Commerce::unsetParams() -{ - m_ParamsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/Commerce_params.cpp b/cpp-restsdk/src/model/Commerce_params.cpp deleted file mode 100644 index 0fa0d78..0000000 --- a/cpp-restsdk/src/model/Commerce_params.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Commerce_params.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Commerce_params::Commerce_params() -{ - m_Is_cart_enabled = false; - m_Is_cart_enabledIsSet = false; - m_Is_catalog_visible = false; - m_Is_catalog_visibleIsSet = false; -} - -Commerce_params::~Commerce_params() -{ -} - -void Commerce_params::validate() -{ - // TODO: implement validation -} - -web::json::value Commerce_params::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Is_cart_enabledIsSet) - { - val[utility::conversions::to_string_t(U("is_cart_enabled"))] = ModelBase::toJson(m_Is_cart_enabled); - } - if(m_Is_catalog_visibleIsSet) - { - val[utility::conversions::to_string_t(U("is_catalog_visible"))] = ModelBase::toJson(m_Is_catalog_visible); - } - - return val; -} - -bool Commerce_params::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("is_cart_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("is_cart_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsCartEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsCartEnabled); - setIsCartEnabled(refVal_setIsCartEnabled); - } - } - if(val.has_field(utility::conversions::to_string_t(U("is_catalog_visible")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("is_catalog_visible"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsCatalogVisible; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsCatalogVisible); - setIsCatalogVisible(refVal_setIsCatalogVisible); - } - } - return ok; -} - -void Commerce_params::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Is_cart_enabledIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("is_cart_enabled")), m_Is_cart_enabled)); - } - if(m_Is_catalog_visibleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("is_catalog_visible")), m_Is_catalog_visible)); - } -} - -bool Commerce_params::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("is_cart_enabled")))) - { - bool refVal_setIsCartEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("is_cart_enabled"))), refVal_setIsCartEnabled ); - setIsCartEnabled(refVal_setIsCartEnabled); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("is_catalog_visible")))) - { - bool refVal_setIsCatalogVisible; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("is_catalog_visible"))), refVal_setIsCatalogVisible ); - setIsCatalogVisible(refVal_setIsCatalogVisible); - } - return ok; -} - -bool Commerce_params::isIsCartEnabled() const -{ - return m_Is_cart_enabled; -} - -void Commerce_params::setIsCartEnabled(bool value) -{ - m_Is_cart_enabled = value; - m_Is_cart_enabledIsSet = true; -} - -bool Commerce_params::isCartEnabledIsSet() const -{ - return m_Is_cart_enabledIsSet; -} - -void Commerce_params::unsetIs_cart_enabled() -{ - m_Is_cart_enabledIsSet = false; -} -bool Commerce_params::isIsCatalogVisible() const -{ - return m_Is_catalog_visible; -} - -void Commerce_params::setIsCatalogVisible(bool value) -{ - m_Is_catalog_visible = value; - m_Is_catalog_visibleIsSet = true; -} - -bool Commerce_params::isCatalogVisibleIsSet() const -{ - return m_Is_catalog_visibleIsSet; -} - -void Commerce_params::unsetIs_catalog_visible() -{ - m_Is_catalog_visibleIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/Contacts.cpp b/cpp-restsdk/src/model/Contacts.cpp deleted file mode 100644 index cb48715..0000000 --- a/cpp-restsdk/src/model/Contacts.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Contacts.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Contacts::Contacts() -{ - m_ContactsIsSet = false; -} - -Contacts::~Contacts() -{ -} - -void Contacts::validate() -{ - // TODO: implement validation -} - -web::json::value Contacts::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ContactsIsSet) - { - val[utility::conversions::to_string_t(U("contacts"))] = ModelBase::toJson(m_Contacts); - } - - return val; -} - -bool Contacts::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("contacts")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contacts"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setContacts; - ok &= ModelBase::fromJson(fieldValue, refVal_setContacts); - setContacts(refVal_setContacts); - } - } - return ok; -} - -void Contacts::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ContactsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("contacts")), m_Contacts)); - } -} - -bool Contacts::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("contacts")))) - { - std::vector> refVal_setContacts; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contacts"))), refVal_setContacts ); - setContacts(refVal_setContacts); - } - return ok; -} - -std::vector>& Contacts::getContacts() -{ - return m_Contacts; -} - -void Contacts::setContacts(const std::vector>& value) -{ - m_Contacts = value; - m_ContactsIsSet = true; -} - -bool Contacts::contactsIsSet() const -{ - return m_ContactsIsSet; -} - -void Contacts::unsetContacts() -{ - m_ContactsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ContactsRequest.cpp b/cpp-restsdk/src/model/ContactsRequest.cpp deleted file mode 100644 index ee9ecbe..0000000 --- a/cpp-restsdk/src/model/ContactsRequest.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ContactsRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ContactsRequest::ContactsRequest() -{ - m_Blocking = utility::conversions::to_string_t(""); - m_BlockingIsSet = false; - m_Force_check = false; - m_Force_checkIsSet = false; - m_ContactsIsSet = false; -} - -ContactsRequest::~ContactsRequest() -{ -} - -void ContactsRequest::validate() -{ - // TODO: implement validation -} - -web::json::value ContactsRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_BlockingIsSet) - { - val[utility::conversions::to_string_t(U("blocking"))] = ModelBase::toJson(m_Blocking); - } - if(m_Force_checkIsSet) - { - val[utility::conversions::to_string_t(U("force_check"))] = ModelBase::toJson(m_Force_check); - } - if(m_ContactsIsSet) - { - val[utility::conversions::to_string_t(U("contacts"))] = ModelBase::toJson(m_Contacts); - } - - return val; -} - -bool ContactsRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("blocking")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("blocking"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBlocking; - ok &= ModelBase::fromJson(fieldValue, refVal_setBlocking); - setBlocking(refVal_setBlocking); - } - } - if(val.has_field(utility::conversions::to_string_t(U("force_check")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("force_check"))); - if(!fieldValue.is_null()) - { - bool refVal_setForceCheck; - ok &= ModelBase::fromJson(fieldValue, refVal_setForceCheck); - setForceCheck(refVal_setForceCheck); - } - } - if(val.has_field(utility::conversions::to_string_t(U("contacts")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contacts"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setContacts; - ok &= ModelBase::fromJson(fieldValue, refVal_setContacts); - setContacts(refVal_setContacts); - } - } - return ok; -} - -void ContactsRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_BlockingIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("blocking")), m_Blocking)); - } - if(m_Force_checkIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("force_check")), m_Force_check)); - } - if(m_ContactsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("contacts")), m_Contacts)); - } -} - -bool ContactsRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("blocking")))) - { - utility::string_t refVal_setBlocking; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("blocking"))), refVal_setBlocking ); - setBlocking(refVal_setBlocking); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("force_check")))) - { - bool refVal_setForceCheck; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("force_check"))), refVal_setForceCheck ); - setForceCheck(refVal_setForceCheck); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("contacts")))) - { - std::vector refVal_setContacts; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contacts"))), refVal_setContacts ); - setContacts(refVal_setContacts); - } - return ok; -} - -utility::string_t ContactsRequest::getBlocking() const -{ - return m_Blocking; -} - -void ContactsRequest::setBlocking(const utility::string_t& value) -{ - m_Blocking = value; - m_BlockingIsSet = true; -} - -bool ContactsRequest::blockingIsSet() const -{ - return m_BlockingIsSet; -} - -void ContactsRequest::unsetBlocking() -{ - m_BlockingIsSet = false; -} -bool ContactsRequest::isForceCheck() const -{ - return m_Force_check; -} - -void ContactsRequest::setForceCheck(bool value) -{ - m_Force_check = value; - m_Force_checkIsSet = true; -} - -bool ContactsRequest::forceCheckIsSet() const -{ - return m_Force_checkIsSet; -} - -void ContactsRequest::unsetForce_check() -{ - m_Force_checkIsSet = false; -} -std::vector& ContactsRequest::getContacts() -{ - return m_Contacts; -} - -void ContactsRequest::setContacts(const std::vector& value) -{ - m_Contacts = value; - m_ContactsIsSet = true; -} - -bool ContactsRequest::contactsIsSet() const -{ - return m_ContactsIsSet; -} - -void ContactsRequest::unsetContacts() -{ - m_ContactsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/Contacts_contacts_inner.cpp b/cpp-restsdk/src/model/Contacts_contacts_inner.cpp deleted file mode 100644 index deee68f..0000000 --- a/cpp-restsdk/src/model/Contacts_contacts_inner.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Contacts_contacts_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Contacts_contacts_inner::Contacts_contacts_inner() -{ - m_Input = utility::conversions::to_string_t(""); - m_InputIsSet = false; - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; - m_Wa_id = utility::conversions::to_string_t(""); - m_Wa_idIsSet = false; -} - -Contacts_contacts_inner::~Contacts_contacts_inner() -{ -} - -void Contacts_contacts_inner::validate() -{ - // TODO: implement validation -} - -web::json::value Contacts_contacts_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_InputIsSet) - { - val[utility::conversions::to_string_t(U("input"))] = ModelBase::toJson(m_Input); - } - if(m_StatusIsSet) - { - val[utility::conversions::to_string_t(U("status"))] = ModelBase::toJson(m_Status); - } - if(m_Wa_idIsSet) - { - val[utility::conversions::to_string_t(U("wa_id"))] = ModelBase::toJson(m_Wa_id); - } - - return val; -} - -bool Contacts_contacts_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("input")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("input"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setInput; - ok &= ModelBase::fromJson(fieldValue, refVal_setInput); - setInput(refVal_setInput); - } - } - if(val.has_field(utility::conversions::to_string_t(U("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - } - } - if(val.has_field(utility::conversions::to_string_t(U("wa_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("wa_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWaId; - ok &= ModelBase::fromJson(fieldValue, refVal_setWaId); - setWaId(refVal_setWaId); - } - } - return ok; -} - -void Contacts_contacts_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_InputIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("input")), m_Input)); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status)); - } - if(m_Wa_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("wa_id")), m_Wa_id)); - } -} - -bool Contacts_contacts_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("input")))) - { - utility::string_t refVal_setInput; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("input"))), refVal_setInput ); - setInput(refVal_setInput); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("wa_id")))) - { - utility::string_t refVal_setWaId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("wa_id"))), refVal_setWaId ); - setWaId(refVal_setWaId); - } - return ok; -} - -utility::string_t Contacts_contacts_inner::getInput() const -{ - return m_Input; -} - -void Contacts_contacts_inner::setInput(const utility::string_t& value) -{ - m_Input = value; - m_InputIsSet = true; -} - -bool Contacts_contacts_inner::inputIsSet() const -{ - return m_InputIsSet; -} - -void Contacts_contacts_inner::unsetInput() -{ - m_InputIsSet = false; -} -utility::string_t Contacts_contacts_inner::getStatus() const -{ - return m_Status; -} - -void Contacts_contacts_inner::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool Contacts_contacts_inner::statusIsSet() const -{ - return m_StatusIsSet; -} - -void Contacts_contacts_inner::unsetStatus() -{ - m_StatusIsSet = false; -} -utility::string_t Contacts_contacts_inner::getWaId() const -{ - return m_Wa_id; -} - -void Contacts_contacts_inner::setWaId(const utility::string_t& value) -{ - m_Wa_id = value; - m_Wa_idIsSet = true; -} - -bool Contacts_contacts_inner::waIdIsSet() const -{ - return m_Wa_idIsSet; -} - -void Contacts_contacts_inner::unsetWa_id() -{ - m_Wa_idIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetAckInfo.cpp b/cpp-restsdk/src/model/GetAckInfo.cpp deleted file mode 100644 index 84aae12..0000000 --- a/cpp-restsdk/src/model/GetAckInfo.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetAckInfo.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetAckInfo::GetAckInfo() -{ - m_HooksIsSet = false; -} - -GetAckInfo::~GetAckInfo() -{ -} - -void GetAckInfo::validate() -{ - // TODO: implement validation -} - -web::json::value GetAckInfo::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_HooksIsSet) - { - val[utility::conversions::to_string_t(U("hooks"))] = ModelBase::toJson(m_Hooks); - } - - return val; -} - -bool GetAckInfo::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("hooks")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("hooks"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setHooks; - ok &= ModelBase::fromJson(fieldValue, refVal_setHooks); - setHooks(refVal_setHooks); - } - } - return ok; -} - -void GetAckInfo::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_HooksIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("hooks")), m_Hooks)); - } -} - -bool GetAckInfo::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("hooks")))) - { - std::vector> refVal_setHooks; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("hooks"))), refVal_setHooks ); - setHooks(refVal_setHooks); - } - return ok; -} - -std::vector>& GetAckInfo::getHooks() -{ - return m_Hooks; -} - -void GetAckInfo::setHooks(const std::vector>& value) -{ - m_Hooks = value; - m_HooksIsSet = true; -} - -bool GetAckInfo::hooksIsSet() const -{ - return m_HooksIsSet; -} - -void GetAckInfo::unsetHooks() -{ - m_HooksIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetAckInfo_hooks_inner.cpp b/cpp-restsdk/src/model/GetAckInfo_hooks_inner.cpp deleted file mode 100644 index 889496b..0000000 --- a/cpp-restsdk/src/model/GetAckInfo_hooks_inner.cpp +++ /dev/null @@ -1,399 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetAckInfo_hooks_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetAckInfo_hooks_inner::GetAckInfo_hooks_inner() -{ - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Type = utility::conversions::to_string_t(""); - m_TypeIsSet = false; - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; - m_PricingIsSet = false; - m_Timestamp = utility::conversions::to_string_t(""); - m_TimestampIsSet = false; - m_ConversationIsSet = false; - m_Recipient_id = utility::conversions::to_string_t(""); - m_Recipient_idIsSet = false; -} - -GetAckInfo_hooks_inner::~GetAckInfo_hooks_inner() -{ -} - -void GetAckInfo_hooks_inner::validate() -{ - // TODO: implement validation -} - -web::json::value GetAckInfo_hooks_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_TypeIsSet) - { - val[utility::conversions::to_string_t(U("type"))] = ModelBase::toJson(m_Type); - } - if(m_StatusIsSet) - { - val[utility::conversions::to_string_t(U("status"))] = ModelBase::toJson(m_Status); - } - if(m_PricingIsSet) - { - val[utility::conversions::to_string_t(U("pricing"))] = ModelBase::toJson(m_Pricing); - } - if(m_TimestampIsSet) - { - val[utility::conversions::to_string_t(U("timestamp"))] = ModelBase::toJson(m_Timestamp); - } - if(m_ConversationIsSet) - { - val[utility::conversions::to_string_t(U("conversation"))] = ModelBase::toJson(m_Conversation); - } - if(m_Recipient_idIsSet) - { - val[utility::conversions::to_string_t(U("recipient_id"))] = ModelBase::toJson(m_Recipient_id); - } - - return val; -} - -bool GetAckInfo_hooks_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromJson(fieldValue, refVal_setType); - setType(refVal_setType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - } - } - if(val.has_field(utility::conversions::to_string_t(U("pricing")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("pricing"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setPricing; - ok &= ModelBase::fromJson(fieldValue, refVal_setPricing); - setPricing(refVal_setPricing); - } - } - if(val.has_field(utility::conversions::to_string_t(U("timestamp")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("timestamp"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTimestamp; - ok &= ModelBase::fromJson(fieldValue, refVal_setTimestamp); - setTimestamp(refVal_setTimestamp); - } - } - if(val.has_field(utility::conversions::to_string_t(U("conversation")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("conversation"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setConversation; - ok &= ModelBase::fromJson(fieldValue, refVal_setConversation); - setConversation(refVal_setConversation); - } - } - if(val.has_field(utility::conversions::to_string_t(U("recipient_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("recipient_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRecipientId; - ok &= ModelBase::fromJson(fieldValue, refVal_setRecipientId); - setRecipientId(refVal_setRecipientId); - } - } - return ok; -} - -void GetAckInfo_hooks_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_TypeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type)); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status)); - } - if(m_PricingIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("pricing")), m_Pricing)); - } - if(m_TimestampIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("timestamp")), m_Timestamp)); - } - if(m_ConversationIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("conversation")), m_Conversation)); - } - if(m_Recipient_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("recipient_id")), m_Recipient_id)); - } -} - -bool GetAckInfo_hooks_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("type")))) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType ); - setType(refVal_setType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("pricing")))) - { - std::shared_ptr refVal_setPricing; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("pricing"))), refVal_setPricing ); - setPricing(refVal_setPricing); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("timestamp")))) - { - utility::string_t refVal_setTimestamp; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("timestamp"))), refVal_setTimestamp ); - setTimestamp(refVal_setTimestamp); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("conversation")))) - { - std::shared_ptr refVal_setConversation; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("conversation"))), refVal_setConversation ); - setConversation(refVal_setConversation); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("recipient_id")))) - { - utility::string_t refVal_setRecipientId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("recipient_id"))), refVal_setRecipientId ); - setRecipientId(refVal_setRecipientId); - } - return ok; -} - -utility::string_t GetAckInfo_hooks_inner::getId() const -{ - return m_Id; -} - -void GetAckInfo_hooks_inner::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool GetAckInfo_hooks_inner::idIsSet() const -{ - return m_IdIsSet; -} - -void GetAckInfo_hooks_inner::unsetId() -{ - m_IdIsSet = false; -} -utility::string_t GetAckInfo_hooks_inner::getType() const -{ - return m_Type; -} - -void GetAckInfo_hooks_inner::setType(const utility::string_t& value) -{ - m_Type = value; - m_TypeIsSet = true; -} - -bool GetAckInfo_hooks_inner::typeIsSet() const -{ - return m_TypeIsSet; -} - -void GetAckInfo_hooks_inner::unsetType() -{ - m_TypeIsSet = false; -} -utility::string_t GetAckInfo_hooks_inner::getStatus() const -{ - return m_Status; -} - -void GetAckInfo_hooks_inner::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool GetAckInfo_hooks_inner::statusIsSet() const -{ - return m_StatusIsSet; -} - -void GetAckInfo_hooks_inner::unsetStatus() -{ - m_StatusIsSet = false; -} -std::shared_ptr GetAckInfo_hooks_inner::getPricing() const -{ - return m_Pricing; -} - -void GetAckInfo_hooks_inner::setPricing(const std::shared_ptr& value) -{ - m_Pricing = value; - m_PricingIsSet = true; -} - -bool GetAckInfo_hooks_inner::pricingIsSet() const -{ - return m_PricingIsSet; -} - -void GetAckInfo_hooks_inner::unsetPricing() -{ - m_PricingIsSet = false; -} -utility::string_t GetAckInfo_hooks_inner::getTimestamp() const -{ - return m_Timestamp; -} - -void GetAckInfo_hooks_inner::setTimestamp(const utility::string_t& value) -{ - m_Timestamp = value; - m_TimestampIsSet = true; -} - -bool GetAckInfo_hooks_inner::timestampIsSet() const -{ - return m_TimestampIsSet; -} - -void GetAckInfo_hooks_inner::unsetTimestamp() -{ - m_TimestampIsSet = false; -} -std::shared_ptr GetAckInfo_hooks_inner::getConversation() const -{ - return m_Conversation; -} - -void GetAckInfo_hooks_inner::setConversation(const std::shared_ptr& value) -{ - m_Conversation = value; - m_ConversationIsSet = true; -} - -bool GetAckInfo_hooks_inner::conversationIsSet() const -{ - return m_ConversationIsSet; -} - -void GetAckInfo_hooks_inner::unsetConversation() -{ - m_ConversationIsSet = false; -} -utility::string_t GetAckInfo_hooks_inner::getRecipientId() const -{ - return m_Recipient_id; -} - -void GetAckInfo_hooks_inner::setRecipientId(const utility::string_t& value) -{ - m_Recipient_id = value; - m_Recipient_idIsSet = true; -} - -bool GetAckInfo_hooks_inner::recipientIdIsSet() const -{ - return m_Recipient_idIsSet; -} - -void GetAckInfo_hooks_inner::unsetRecipient_id() -{ - m_Recipient_idIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetCommerce.cpp b/cpp-restsdk/src/model/GetCommerce.cpp deleted file mode 100644 index 7f428f3..0000000 --- a/cpp-restsdk/src/model/GetCommerce.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetCommerce.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetCommerce::GetCommerce() -{ -} - -GetCommerce::~GetCommerce() -{ -} - -void GetCommerce::validate() -{ - // TODO: implement validation -} - -web::json::value GetCommerce::toJson() const -{ - - web::json::value val = web::json::value::object(); - - - return val; -} - -bool GetCommerce::fromJson(const web::json::value& val) -{ - bool ok = true; - - return ok; -} - -void GetCommerce::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } -} - -bool GetCommerce::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - return ok; -} - -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetCommerce_inner.cpp b/cpp-restsdk/src/model/GetCommerce_inner.cpp deleted file mode 100644 index ac7e19e..0000000 --- a/cpp-restsdk/src/model/GetCommerce_inner.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetCommerce_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetCommerce_inner::GetCommerce_inner() -{ - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Is_cart_enabled = false; - m_Is_cart_enabledIsSet = false; - m_Is_catalog_visible = false; - m_Is_catalog_visibleIsSet = false; -} - -GetCommerce_inner::~GetCommerce_inner() -{ -} - -void GetCommerce_inner::validate() -{ - // TODO: implement validation -} - -web::json::value GetCommerce_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_Is_cart_enabledIsSet) - { - val[utility::conversions::to_string_t(U("is_cart_enabled"))] = ModelBase::toJson(m_Is_cart_enabled); - } - if(m_Is_catalog_visibleIsSet) - { - val[utility::conversions::to_string_t(U("is_catalog_visible"))] = ModelBase::toJson(m_Is_catalog_visible); - } - - return val; -} - -bool GetCommerce_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("is_cart_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("is_cart_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsCartEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsCartEnabled); - setIsCartEnabled(refVal_setIsCartEnabled); - } - } - if(val.has_field(utility::conversions::to_string_t(U("is_catalog_visible")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("is_catalog_visible"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsCatalogVisible; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsCatalogVisible); - setIsCatalogVisible(refVal_setIsCatalogVisible); - } - } - return ok; -} - -void GetCommerce_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_Is_cart_enabledIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("is_cart_enabled")), m_Is_cart_enabled)); - } - if(m_Is_catalog_visibleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("is_catalog_visible")), m_Is_catalog_visible)); - } -} - -bool GetCommerce_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("is_cart_enabled")))) - { - bool refVal_setIsCartEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("is_cart_enabled"))), refVal_setIsCartEnabled ); - setIsCartEnabled(refVal_setIsCartEnabled); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("is_catalog_visible")))) - { - bool refVal_setIsCatalogVisible; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("is_catalog_visible"))), refVal_setIsCatalogVisible ); - setIsCatalogVisible(refVal_setIsCatalogVisible); - } - return ok; -} - -utility::string_t GetCommerce_inner::getId() const -{ - return m_Id; -} - -void GetCommerce_inner::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool GetCommerce_inner::idIsSet() const -{ - return m_IdIsSet; -} - -void GetCommerce_inner::unsetId() -{ - m_IdIsSet = false; -} -bool GetCommerce_inner::isIsCartEnabled() const -{ - return m_Is_cart_enabled; -} - -void GetCommerce_inner::setIsCartEnabled(bool value) -{ - m_Is_cart_enabled = value; - m_Is_cart_enabledIsSet = true; -} - -bool GetCommerce_inner::isCartEnabledIsSet() const -{ - return m_Is_cart_enabledIsSet; -} - -void GetCommerce_inner::unsetIs_cart_enabled() -{ - m_Is_cart_enabledIsSet = false; -} -bool GetCommerce_inner::isIsCatalogVisible() const -{ - return m_Is_catalog_visible; -} - -void GetCommerce_inner::setIsCatalogVisible(bool value) -{ - m_Is_catalog_visible = value; - m_Is_catalog_visibleIsSet = true; -} - -bool GetCommerce_inner::isCatalogVisibleIsSet() const -{ - return m_Is_catalog_visibleIsSet; -} - -void GetCommerce_inner::unsetIs_catalog_visible() -{ - m_Is_catalog_visibleIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetIP.cpp b/cpp-restsdk/src/model/GetIP.cpp deleted file mode 100644 index 9f9cfcd..0000000 --- a/cpp-restsdk/src/model/GetIP.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetIP.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetIP::GetIP() -{ - m_Result = utility::conversions::to_string_t(""); - m_ResultIsSet = false; -} - -GetIP::~GetIP() -{ -} - -void GetIP::validate() -{ - // TODO: implement validation -} - -web::json::value GetIP::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ResultIsSet) - { - val[utility::conversions::to_string_t(U("result"))] = ModelBase::toJson(m_Result); - } - - return val; -} - -bool GetIP::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("result")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("result"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setResult; - ok &= ModelBase::fromJson(fieldValue, refVal_setResult); - setResult(refVal_setResult); - } - } - return ok; -} - -void GetIP::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ResultIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("result")), m_Result)); - } -} - -bool GetIP::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("result")))) - { - utility::string_t refVal_setResult; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("result"))), refVal_setResult ); - setResult(refVal_setResult); - } - return ok; -} - -utility::string_t GetIP::getResult() const -{ - return m_Result; -} - -void GetIP::setResult(const utility::string_t& value) -{ - m_Result = value; - m_ResultIsSet = true; -} - -bool GetIP::resultIsSet() const -{ - return m_ResultIsSet; -} - -void GetIP::unsetResult() -{ - m_ResultIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetMe.cpp b/cpp-restsdk/src/model/GetMe.cpp deleted file mode 100644 index c1cf5a6..0000000 --- a/cpp-restsdk/src/model/GetMe.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetMe.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetMe::GetMe() -{ - m_About = utility::conversions::to_string_t(""); - m_AboutIsSet = false; - m_Address = utility::conversions::to_string_t(""); - m_AddressIsSet = false; - m_Description = utility::conversions::to_string_t(""); - m_DescriptionIsSet = false; - m_Email = utility::conversions::to_string_t(""); - m_EmailIsSet = false; - m_Phone = utility::conversions::to_string_t(""); - m_PhoneIsSet = false; - m_Vertical = utility::conversions::to_string_t(""); - m_VerticalIsSet = false; - m_Photo = utility::conversions::to_string_t(""); - m_PhotoIsSet = false; -} - -GetMe::~GetMe() -{ -} - -void GetMe::validate() -{ - // TODO: implement validation -} - -web::json::value GetMe::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_AboutIsSet) - { - val[utility::conversions::to_string_t(U("about"))] = ModelBase::toJson(m_About); - } - if(m_AddressIsSet) - { - val[utility::conversions::to_string_t(U("address"))] = ModelBase::toJson(m_Address); - } - if(m_DescriptionIsSet) - { - val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description); - } - if(m_EmailIsSet) - { - val[utility::conversions::to_string_t(U("email"))] = ModelBase::toJson(m_Email); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_VerticalIsSet) - { - val[utility::conversions::to_string_t(U("vertical"))] = ModelBase::toJson(m_Vertical); - } - if(m_PhotoIsSet) - { - val[utility::conversions::to_string_t(U("photo"))] = ModelBase::toJson(m_Photo); - } - - return val; -} - -bool GetMe::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("about")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("about"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAbout; - ok &= ModelBase::fromJson(fieldValue, refVal_setAbout); - setAbout(refVal_setAbout); - } - } - if(val.has_field(utility::conversions::to_string_t(U("address")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("address"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromJson(fieldValue, refVal_setAddress); - setAddress(refVal_setAddress); - } - } - if(val.has_field(utility::conversions::to_string_t(U("description")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); - setDescription(refVal_setDescription); - } - } - if(val.has_field(utility::conversions::to_string_t(U("email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setEmail); - setEmail(refVal_setEmail); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("vertical")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("vertical"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setVertical; - ok &= ModelBase::fromJson(fieldValue, refVal_setVertical); - setVertical(refVal_setVertical); - } - } - if(val.has_field(utility::conversions::to_string_t(U("photo")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photo"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhoto; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhoto); - setPhoto(refVal_setPhoto); - } - } - return ok; -} - -void GetMe::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_AboutIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("about")), m_About)); - } - if(m_AddressIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address)); - } - if(m_DescriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description)); - } - if(m_EmailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email")), m_Email)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_VerticalIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("vertical")), m_Vertical)); - } - if(m_PhotoIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo")), m_Photo)); - } -} - -bool GetMe::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("about")))) - { - utility::string_t refVal_setAbout; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("about"))), refVal_setAbout ); - setAbout(refVal_setAbout); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("address")))) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))), refVal_setAddress ); - setAddress(refVal_setAddress); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("description")))) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription ); - setDescription(refVal_setDescription); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("email")))) - { - utility::string_t refVal_setEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_setEmail ); - setEmail(refVal_setEmail); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - utility::string_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("vertical")))) - { - utility::string_t refVal_setVertical; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("vertical"))), refVal_setVertical ); - setVertical(refVal_setVertical); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("photo")))) - { - utility::string_t refVal_setPhoto; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo"))), refVal_setPhoto ); - setPhoto(refVal_setPhoto); - } - return ok; -} - -utility::string_t GetMe::getAbout() const -{ - return m_About; -} - -void GetMe::setAbout(const utility::string_t& value) -{ - m_About = value; - m_AboutIsSet = true; -} - -bool GetMe::aboutIsSet() const -{ - return m_AboutIsSet; -} - -void GetMe::unsetAbout() -{ - m_AboutIsSet = false; -} -utility::string_t GetMe::getAddress() const -{ - return m_Address; -} - -void GetMe::setAddress(const utility::string_t& value) -{ - m_Address = value; - m_AddressIsSet = true; -} - -bool GetMe::addressIsSet() const -{ - return m_AddressIsSet; -} - -void GetMe::unsetAddress() -{ - m_AddressIsSet = false; -} -utility::string_t GetMe::getDescription() const -{ - return m_Description; -} - -void GetMe::setDescription(const utility::string_t& value) -{ - m_Description = value; - m_DescriptionIsSet = true; -} - -bool GetMe::descriptionIsSet() const -{ - return m_DescriptionIsSet; -} - -void GetMe::unsetDescription() -{ - m_DescriptionIsSet = false; -} -utility::string_t GetMe::getEmail() const -{ - return m_Email; -} - -void GetMe::setEmail(const utility::string_t& value) -{ - m_Email = value; - m_EmailIsSet = true; -} - -bool GetMe::emailIsSet() const -{ - return m_EmailIsSet; -} - -void GetMe::unsetEmail() -{ - m_EmailIsSet = false; -} -utility::string_t GetMe::getPhone() const -{ - return m_Phone; -} - -void GetMe::setPhone(const utility::string_t& value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool GetMe::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void GetMe::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t GetMe::getVertical() const -{ - return m_Vertical; -} - -void GetMe::setVertical(const utility::string_t& value) -{ - m_Vertical = value; - m_VerticalIsSet = true; -} - -bool GetMe::verticalIsSet() const -{ - return m_VerticalIsSet; -} - -void GetMe::unsetVertical() -{ - m_VerticalIsSet = false; -} -utility::string_t GetMe::getPhoto() const -{ - return m_Photo; -} - -void GetMe::setPhoto(const utility::string_t& value) -{ - m_Photo = value; - m_PhotoIsSet = true; -} - -bool GetMe::photoIsSet() const -{ - return m_PhotoIsSet; -} - -void GetMe::unsetPhoto() -{ - m_PhotoIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetMe_401_response.cpp b/cpp-restsdk/src/model/GetMe_401_response.cpp deleted file mode 100644 index 7502b27..0000000 --- a/cpp-restsdk/src/model/GetMe_401_response.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetMe_401_response.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetMe_401_response::GetMe_401_response() -{ - m_Error = utility::conversions::to_string_t(""); - m_ErrorIsSet = false; -} - -GetMe_401_response::~GetMe_401_response() -{ -} - -void GetMe_401_response::validate() -{ - // TODO: implement validation -} - -web::json::value GetMe_401_response::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ErrorIsSet) - { - val[utility::conversions::to_string_t(U("error"))] = ModelBase::toJson(m_Error); - } - - return val; -} - -bool GetMe_401_response::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("error")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("error"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setError; - ok &= ModelBase::fromJson(fieldValue, refVal_setError); - setError(refVal_setError); - } - } - return ok; -} - -void GetMe_401_response::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ErrorIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("error")), m_Error)); - } -} - -bool GetMe_401_response::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("error")))) - { - utility::string_t refVal_setError; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("error"))), refVal_setError ); - setError(refVal_setError); - } - return ok; -} - -utility::string_t GetMe_401_response::getError() const -{ - return m_Error; -} - -void GetMe_401_response::setError(const utility::string_t& value) -{ - m_Error = value; - m_ErrorIsSet = true; -} - -bool GetMe_401_response::errorIsSet() const -{ - return m_ErrorIsSet; -} - -void GetMe_401_response::unsetError() -{ - m_ErrorIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetMessages.cpp b/cpp-restsdk/src/model/GetMessages.cpp deleted file mode 100644 index 648e698..0000000 --- a/cpp-restsdk/src/model/GetMessages.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetMessages.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetMessages::GetMessages() -{ - m_MessagesIsSet = false; -} - -GetMessages::~GetMessages() -{ -} - -void GetMessages::validate() -{ - // TODO: implement validation -} - -web::json::value GetMessages::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_MessagesIsSet) - { - val[utility::conversions::to_string_t(U("messages"))] = ModelBase::toJson(m_Messages); - } - - return val; -} - -bool GetMessages::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("messages")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("messages"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setMessages; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessages); - setMessages(refVal_setMessages); - } - } - return ok; -} - -void GetMessages::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_MessagesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("messages")), m_Messages)); - } -} - -bool GetMessages::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("messages")))) - { - std::vector> refVal_setMessages; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("messages"))), refVal_setMessages ); - setMessages(refVal_setMessages); - } - return ok; -} - -std::vector>& GetMessages::getMessages() -{ - return m_Messages; -} - -void GetMessages::setMessages(const std::vector>& value) -{ - m_Messages = value; - m_MessagesIsSet = true; -} - -bool GetMessages::messagesIsSet() const -{ - return m_MessagesIsSet; -} - -void GetMessages::unsetMessages() -{ - m_MessagesIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetMessages_messages_inner.cpp b/cpp-restsdk/src/model/GetMessages_messages_inner.cpp deleted file mode 100644 index 52aa5a8..0000000 --- a/cpp-restsdk/src/model/GetMessages_messages_inner.cpp +++ /dev/null @@ -1,768 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetMessages_messages_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetMessages_messages_inner::GetMessages_messages_inner() -{ - m_MessageNumber = 0; - m_MessageNumberIsSet = false; - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; - m_FromMe = false; - m_FromMeIsSet = false; - m_Self = 0; - m_SelfIsSet = false; - m_IsForwarded = 0; - m_IsForwardedIsSet = false; - m_Author = utility::conversions::to_string_t(""); - m_AuthorIsSet = false; - m_Time = 0; - m_TimeIsSet = false; - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Type = utility::conversions::to_string_t(""); - m_TypeIsSet = false; - m_SenderName = utility::conversions::to_string_t(""); - m_SenderNameIsSet = false; - m_Caption = utility::conversions::to_string_t(""); - m_CaptionIsSet = false; - m_QuotedMsgId = utility::conversions::to_string_t(""); - m_QuotedMsgIdIsSet = false; - m_MetadataIsSet = false; - m_ChatName = utility::conversions::to_string_t(""); - m_ChatNameIsSet = false; -} - -GetMessages_messages_inner::~GetMessages_messages_inner() -{ -} - -void GetMessages_messages_inner::validate() -{ - // TODO: implement validation -} - -web::json::value GetMessages_messages_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_MessageNumberIsSet) - { - val[utility::conversions::to_string_t(U("messageNumber"))] = ModelBase::toJson(m_MessageNumber); - } - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - if(m_FromMeIsSet) - { - val[utility::conversions::to_string_t(U("fromMe"))] = ModelBase::toJson(m_FromMe); - } - if(m_SelfIsSet) - { - val[utility::conversions::to_string_t(U("self"))] = ModelBase::toJson(m_Self); - } - if(m_IsForwardedIsSet) - { - val[utility::conversions::to_string_t(U("isForwarded"))] = ModelBase::toJson(m_IsForwarded); - } - if(m_AuthorIsSet) - { - val[utility::conversions::to_string_t(U("author"))] = ModelBase::toJson(m_Author); - } - if(m_TimeIsSet) - { - val[utility::conversions::to_string_t(U("time"))] = ModelBase::toJson(m_Time); - } - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_TypeIsSet) - { - val[utility::conversions::to_string_t(U("type"))] = ModelBase::toJson(m_Type); - } - if(m_SenderNameIsSet) - { - val[utility::conversions::to_string_t(U("senderName"))] = ModelBase::toJson(m_SenderName); - } - if(m_CaptionIsSet) - { - val[utility::conversions::to_string_t(U("caption"))] = ModelBase::toJson(m_Caption); - } - if(m_QuotedMsgIdIsSet) - { - val[utility::conversions::to_string_t(U("quotedMsgId"))] = ModelBase::toJson(m_QuotedMsgId); - } - if(m_MetadataIsSet) - { - val[utility::conversions::to_string_t(U("metadata"))] = ModelBase::toJson(m_Metadata); - } - if(m_ChatNameIsSet) - { - val[utility::conversions::to_string_t(U("chatName"))] = ModelBase::toJson(m_ChatName); - } - - return val; -} - -bool GetMessages_messages_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("messageNumber")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("messageNumber"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setMessageNumber; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessageNumber); - setMessageNumber(refVal_setMessageNumber); - } - } - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - if(val.has_field(utility::conversions::to_string_t(U("fromMe")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("fromMe"))); - if(!fieldValue.is_null()) - { - bool refVal_setFromMe; - ok &= ModelBase::fromJson(fieldValue, refVal_setFromMe); - setFromMe(refVal_setFromMe); - } - } - if(val.has_field(utility::conversions::to_string_t(U("self")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("self"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setSelf; - ok &= ModelBase::fromJson(fieldValue, refVal_setSelf); - setSelf(refVal_setSelf); - } - } - if(val.has_field(utility::conversions::to_string_t(U("isForwarded")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("isForwarded"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setIsForwarded; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsForwarded); - setIsForwarded(refVal_setIsForwarded); - } - } - if(val.has_field(utility::conversions::to_string_t(U("author")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("author"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAuthor; - ok &= ModelBase::fromJson(fieldValue, refVal_setAuthor); - setAuthor(refVal_setAuthor); - } - } - if(val.has_field(utility::conversions::to_string_t(U("time")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("time"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setTime; - ok &= ModelBase::fromJson(fieldValue, refVal_setTime); - setTime(refVal_setTime); - } - } - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromJson(fieldValue, refVal_setType); - setType(refVal_setType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("senderName")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("senderName"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setSenderName; - ok &= ModelBase::fromJson(fieldValue, refVal_setSenderName); - setSenderName(refVal_setSenderName); - } - } - if(val.has_field(utility::conversions::to_string_t(U("caption")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("caption"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCaption; - ok &= ModelBase::fromJson(fieldValue, refVal_setCaption); - setCaption(refVal_setCaption); - } - } - if(val.has_field(utility::conversions::to_string_t(U("quotedMsgId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("quotedMsgId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setQuotedMsgId; - ok &= ModelBase::fromJson(fieldValue, refVal_setQuotedMsgId); - setQuotedMsgId(refVal_setQuotedMsgId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("metadata")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("metadata"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setMetadata; - ok &= ModelBase::fromJson(fieldValue, refVal_setMetadata); - setMetadata(refVal_setMetadata); - } - } - if(val.has_field(utility::conversions::to_string_t(U("chatName")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatName"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatName; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatName); - setChatName(refVal_setChatName); - } - } - return ok; -} - -void GetMessages_messages_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_MessageNumberIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("messageNumber")), m_MessageNumber)); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } - if(m_FromMeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("fromMe")), m_FromMe)); - } - if(m_SelfIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("self")), m_Self)); - } - if(m_IsForwardedIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isForwarded")), m_IsForwarded)); - } - if(m_AuthorIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("author")), m_Author)); - } - if(m_TimeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("time")), m_Time)); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_TypeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type)); - } - if(m_SenderNameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("senderName")), m_SenderName)); - } - if(m_CaptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("caption")), m_Caption)); - } - if(m_QuotedMsgIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("quotedMsgId")), m_QuotedMsgId)); - } - if(m_MetadataIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("metadata")), m_Metadata)); - } - if(m_ChatNameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatName")), m_ChatName)); - } -} - -bool GetMessages_messages_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("messageNumber")))) - { - int32_t refVal_setMessageNumber; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("messageNumber"))), refVal_setMessageNumber ); - setMessageNumber(refVal_setMessageNumber); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("fromMe")))) - { - bool refVal_setFromMe; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fromMe"))), refVal_setFromMe ); - setFromMe(refVal_setFromMe); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("self")))) - { - int32_t refVal_setSelf; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("self"))), refVal_setSelf ); - setSelf(refVal_setSelf); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("isForwarded")))) - { - int32_t refVal_setIsForwarded; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isForwarded"))), refVal_setIsForwarded ); - setIsForwarded(refVal_setIsForwarded); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("author")))) - { - utility::string_t refVal_setAuthor; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("author"))), refVal_setAuthor ); - setAuthor(refVal_setAuthor); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("time")))) - { - int32_t refVal_setTime; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("time"))), refVal_setTime ); - setTime(refVal_setTime); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("type")))) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType ); - setType(refVal_setType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("senderName")))) - { - utility::string_t refVal_setSenderName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("senderName"))), refVal_setSenderName ); - setSenderName(refVal_setSenderName); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("caption")))) - { - utility::string_t refVal_setCaption; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("caption"))), refVal_setCaption ); - setCaption(refVal_setCaption); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("quotedMsgId")))) - { - utility::string_t refVal_setQuotedMsgId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("quotedMsgId"))), refVal_setQuotedMsgId ); - setQuotedMsgId(refVal_setQuotedMsgId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("metadata")))) - { - std::shared_ptr refVal_setMetadata; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("metadata"))), refVal_setMetadata ); - setMetadata(refVal_setMetadata); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("chatName")))) - { - utility::string_t refVal_setChatName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatName"))), refVal_setChatName ); - setChatName(refVal_setChatName); - } - return ok; -} - -int32_t GetMessages_messages_inner::getMessageNumber() const -{ - return m_MessageNumber; -} - -void GetMessages_messages_inner::setMessageNumber(int32_t value) -{ - m_MessageNumber = value; - m_MessageNumberIsSet = true; -} - -bool GetMessages_messages_inner::messageNumberIsSet() const -{ - return m_MessageNumberIsSet; -} - -void GetMessages_messages_inner::unsetMessageNumber() -{ - m_MessageNumberIsSet = false; -} -utility::string_t GetMessages_messages_inner::getId() const -{ - return m_Id; -} - -void GetMessages_messages_inner::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool GetMessages_messages_inner::idIsSet() const -{ - return m_IdIsSet; -} - -void GetMessages_messages_inner::unsetId() -{ - m_IdIsSet = false; -} -utility::string_t GetMessages_messages_inner::getBody() const -{ - return m_Body; -} - -void GetMessages_messages_inner::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool GetMessages_messages_inner::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void GetMessages_messages_inner::unsetBody() -{ - m_BodyIsSet = false; -} -bool GetMessages_messages_inner::isFromMe() const -{ - return m_FromMe; -} - -void GetMessages_messages_inner::setFromMe(bool value) -{ - m_FromMe = value; - m_FromMeIsSet = true; -} - -bool GetMessages_messages_inner::fromMeIsSet() const -{ - return m_FromMeIsSet; -} - -void GetMessages_messages_inner::unsetFromMe() -{ - m_FromMeIsSet = false; -} -int32_t GetMessages_messages_inner::getSelf() const -{ - return m_Self; -} - -void GetMessages_messages_inner::setSelf(int32_t value) -{ - m_Self = value; - m_SelfIsSet = true; -} - -bool GetMessages_messages_inner::selfIsSet() const -{ - return m_SelfIsSet; -} - -void GetMessages_messages_inner::unsetSelf() -{ - m_SelfIsSet = false; -} -int32_t GetMessages_messages_inner::getIsForwarded() const -{ - return m_IsForwarded; -} - -void GetMessages_messages_inner::setIsForwarded(int32_t value) -{ - m_IsForwarded = value; - m_IsForwardedIsSet = true; -} - -bool GetMessages_messages_inner::isForwardedIsSet() const -{ - return m_IsForwardedIsSet; -} - -void GetMessages_messages_inner::unsetIsForwarded() -{ - m_IsForwardedIsSet = false; -} -utility::string_t GetMessages_messages_inner::getAuthor() const -{ - return m_Author; -} - -void GetMessages_messages_inner::setAuthor(const utility::string_t& value) -{ - m_Author = value; - m_AuthorIsSet = true; -} - -bool GetMessages_messages_inner::authorIsSet() const -{ - return m_AuthorIsSet; -} - -void GetMessages_messages_inner::unsetAuthor() -{ - m_AuthorIsSet = false; -} -int32_t GetMessages_messages_inner::getTime() const -{ - return m_Time; -} - -void GetMessages_messages_inner::setTime(int32_t value) -{ - m_Time = value; - m_TimeIsSet = true; -} - -bool GetMessages_messages_inner::timeIsSet() const -{ - return m_TimeIsSet; -} - -void GetMessages_messages_inner::unsetTime() -{ - m_TimeIsSet = false; -} -utility::string_t GetMessages_messages_inner::getChatId() const -{ - return m_ChatId; -} - -void GetMessages_messages_inner::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool GetMessages_messages_inner::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void GetMessages_messages_inner::unsetChatId() -{ - m_ChatIdIsSet = false; -} -utility::string_t GetMessages_messages_inner::getType() const -{ - return m_Type; -} - -void GetMessages_messages_inner::setType(const utility::string_t& value) -{ - m_Type = value; - m_TypeIsSet = true; -} - -bool GetMessages_messages_inner::typeIsSet() const -{ - return m_TypeIsSet; -} - -void GetMessages_messages_inner::unsetType() -{ - m_TypeIsSet = false; -} -utility::string_t GetMessages_messages_inner::getSenderName() const -{ - return m_SenderName; -} - -void GetMessages_messages_inner::setSenderName(const utility::string_t& value) -{ - m_SenderName = value; - m_SenderNameIsSet = true; -} - -bool GetMessages_messages_inner::senderNameIsSet() const -{ - return m_SenderNameIsSet; -} - -void GetMessages_messages_inner::unsetSenderName() -{ - m_SenderNameIsSet = false; -} -utility::string_t GetMessages_messages_inner::getCaption() const -{ - return m_Caption; -} - -void GetMessages_messages_inner::setCaption(const utility::string_t& value) -{ - m_Caption = value; - m_CaptionIsSet = true; -} - -bool GetMessages_messages_inner::captionIsSet() const -{ - return m_CaptionIsSet; -} - -void GetMessages_messages_inner::unsetCaption() -{ - m_CaptionIsSet = false; -} -utility::string_t GetMessages_messages_inner::getQuotedMsgId() const -{ - return m_QuotedMsgId; -} - -void GetMessages_messages_inner::setQuotedMsgId(const utility::string_t& value) -{ - m_QuotedMsgId = value; - m_QuotedMsgIdIsSet = true; -} - -bool GetMessages_messages_inner::quotedMsgIdIsSet() const -{ - return m_QuotedMsgIdIsSet; -} - -void GetMessages_messages_inner::unsetQuotedMsgId() -{ - m_QuotedMsgIdIsSet = false; -} -std::shared_ptr GetMessages_messages_inner::getMetadata() const -{ - return m_Metadata; -} - -void GetMessages_messages_inner::setMetadata(const std::shared_ptr& value) -{ - m_Metadata = value; - m_MetadataIsSet = true; -} - -bool GetMessages_messages_inner::metadataIsSet() const -{ - return m_MetadataIsSet; -} - -void GetMessages_messages_inner::unsetMetadata() -{ - m_MetadataIsSet = false; -} -utility::string_t GetMessages_messages_inner::getChatName() const -{ - return m_ChatName; -} - -void GetMessages_messages_inner::setChatName(const utility::string_t& value) -{ - m_ChatName = value; - m_ChatNameIsSet = true; -} - -bool GetMessages_messages_inner::chatNameIsSet() const -{ - return m_ChatNameIsSet; -} - -void GetMessages_messages_inner::unsetChatName() -{ - m_ChatNameIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetTemplates.cpp b/cpp-restsdk/src/model/GetTemplates.cpp deleted file mode 100644 index adab83e..0000000 --- a/cpp-restsdk/src/model/GetTemplates.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetTemplates.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetTemplates::GetTemplates() -{ - m_Total = 0; - m_TotalIsSet = false; - m_TemplatesIsSet = false; -} - -GetTemplates::~GetTemplates() -{ -} - -void GetTemplates::validate() -{ - // TODO: implement validation -} - -web::json::value GetTemplates::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TotalIsSet) - { - val[utility::conversions::to_string_t(U("total"))] = ModelBase::toJson(m_Total); - } - if(m_TemplatesIsSet) - { - val[utility::conversions::to_string_t(U("templates"))] = ModelBase::toJson(m_Templates); - } - - return val; -} - -bool GetTemplates::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("total")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("total"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setTotal; - ok &= ModelBase::fromJson(fieldValue, refVal_setTotal); - setTotal(refVal_setTotal); - } - } - if(val.has_field(utility::conversions::to_string_t(U("templates")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("templates"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setTemplates; - ok &= ModelBase::fromJson(fieldValue, refVal_setTemplates); - setTemplates(refVal_setTemplates); - } - } - return ok; -} - -void GetTemplates::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TotalIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("total")), m_Total)); - } - if(m_TemplatesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("templates")), m_Templates)); - } -} - -bool GetTemplates::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("total")))) - { - int32_t refVal_setTotal; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("total"))), refVal_setTotal ); - setTotal(refVal_setTotal); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("templates")))) - { - std::vector> refVal_setTemplates; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("templates"))), refVal_setTemplates ); - setTemplates(refVal_setTemplates); - } - return ok; -} - -int32_t GetTemplates::getTotal() const -{ - return m_Total; -} - -void GetTemplates::setTotal(int32_t value) -{ - m_Total = value; - m_TotalIsSet = true; -} - -bool GetTemplates::totalIsSet() const -{ - return m_TotalIsSet; -} - -void GetTemplates::unsetTotal() -{ - m_TotalIsSet = false; -} -std::vector>& GetTemplates::getTemplates() -{ - return m_Templates; -} - -void GetTemplates::setTemplates(const std::vector>& value) -{ - m_Templates = value; - m_TemplatesIsSet = true; -} - -bool GetTemplates::templatesIsSet() const -{ - return m_TemplatesIsSet; -} - -void GetTemplates::unsetTemplates() -{ - m_TemplatesIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/GetTemplates_templates_inner.cpp b/cpp-restsdk/src/model/GetTemplates_templates_inner.cpp deleted file mode 100644 index 73f9e70..0000000 --- a/cpp-restsdk/src/model/GetTemplates_templates_inner.cpp +++ /dev/null @@ -1,398 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/GetTemplates_templates_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -GetTemplates_templates_inner::GetTemplates_templates_inner() -{ - m_CategoryIsSet = false; - m_ComponentsIsSet = false; - m_LanguageIsSet = false; - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; - m_r_namespace = utility::conversions::to_string_t(""); - m_r_namespaceIsSet = false; - m_Rejected_reason = utility::conversions::to_string_t(""); - m_Rejected_reasonIsSet = false; - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; -} - -GetTemplates_templates_inner::~GetTemplates_templates_inner() -{ -} - -void GetTemplates_templates_inner::validate() -{ - // TODO: implement validation -} - -web::json::value GetTemplates_templates_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_CategoryIsSet) - { - val[utility::conversions::to_string_t(U("category"))] = ModelBase::toJson(m_Category); - } - if(m_ComponentsIsSet) - { - val[utility::conversions::to_string_t(U("components"))] = ModelBase::toJson(m_Components); - } - if(m_LanguageIsSet) - { - val[utility::conversions::to_string_t(U("language"))] = ModelBase::toJson(m_Language); - } - if(m_NameIsSet) - { - val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name); - } - if(m_r_namespaceIsSet) - { - val[utility::conversions::to_string_t(U("namespace"))] = ModelBase::toJson(m_r_namespace); - } - if(m_Rejected_reasonIsSet) - { - val[utility::conversions::to_string_t(U("rejected_reason"))] = ModelBase::toJson(m_Rejected_reason); - } - if(m_StatusIsSet) - { - val[utility::conversions::to_string_t(U("status"))] = ModelBase::toJson(m_Status); - } - - return val; -} - -bool GetTemplates_templates_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("category")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("category"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setCategory; - ok &= ModelBase::fromJson(fieldValue, refVal_setCategory); - setCategory(refVal_setCategory); - } - } - if(val.has_field(utility::conversions::to_string_t(U("components")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("components"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setComponents; - ok &= ModelBase::fromJson(fieldValue, refVal_setComponents); - setComponents(refVal_setComponents); - } - } - if(val.has_field(utility::conversions::to_string_t(U("language")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("language"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setLanguage; - ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage); - setLanguage(refVal_setLanguage); - } - } - if(val.has_field(utility::conversions::to_string_t(U("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - } - } - if(val.has_field(utility::conversions::to_string_t(U("namespace")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("namespace"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRNamespace; - ok &= ModelBase::fromJson(fieldValue, refVal_setRNamespace); - setRNamespace(refVal_setRNamespace); - } - } - if(val.has_field(utility::conversions::to_string_t(U("rejected_reason")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("rejected_reason"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRejectedReason; - ok &= ModelBase::fromJson(fieldValue, refVal_setRejectedReason); - setRejectedReason(refVal_setRejectedReason); - } - } - if(val.has_field(utility::conversions::to_string_t(U("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - } - } - return ok; -} - -void GetTemplates_templates_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_CategoryIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("category")), m_Category)); - } - if(m_ComponentsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("components")), m_Components)); - } - if(m_LanguageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("language")), m_Language)); - } - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name)); - } - if(m_r_namespaceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("namespace")), m_r_namespace)); - } - if(m_Rejected_reasonIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rejected_reason")), m_Rejected_reason)); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status)); - } -} - -bool GetTemplates_templates_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("category")))) - { - std::shared_ptr refVal_setCategory; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("category"))), refVal_setCategory ); - setCategory(refVal_setCategory); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("components")))) - { - std::shared_ptr refVal_setComponents; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("components"))), refVal_setComponents ); - setComponents(refVal_setComponents); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("language")))) - { - std::shared_ptr refVal_setLanguage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("language"))), refVal_setLanguage ); - setLanguage(refVal_setLanguage); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName ); - setName(refVal_setName); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("namespace")))) - { - utility::string_t refVal_setRNamespace; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("namespace"))), refVal_setRNamespace ); - setRNamespace(refVal_setRNamespace); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("rejected_reason")))) - { - utility::string_t refVal_setRejectedReason; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rejected_reason"))), refVal_setRejectedReason ); - setRejectedReason(refVal_setRejectedReason); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - return ok; -} - -std::shared_ptr GetTemplates_templates_inner::getCategory() const -{ - return m_Category; -} - -void GetTemplates_templates_inner::setCategory(const std::shared_ptr& value) -{ - m_Category = value; - m_CategoryIsSet = true; -} - -bool GetTemplates_templates_inner::categoryIsSet() const -{ - return m_CategoryIsSet; -} - -void GetTemplates_templates_inner::unsetCategory() -{ - m_CategoryIsSet = false; -} -std::shared_ptr GetTemplates_templates_inner::getComponents() const -{ - return m_Components; -} - -void GetTemplates_templates_inner::setComponents(const std::shared_ptr& value) -{ - m_Components = value; - m_ComponentsIsSet = true; -} - -bool GetTemplates_templates_inner::componentsIsSet() const -{ - return m_ComponentsIsSet; -} - -void GetTemplates_templates_inner::unsetComponents() -{ - m_ComponentsIsSet = false; -} -std::shared_ptr GetTemplates_templates_inner::getLanguage() const -{ - return m_Language; -} - -void GetTemplates_templates_inner::setLanguage(const std::shared_ptr& value) -{ - m_Language = value; - m_LanguageIsSet = true; -} - -bool GetTemplates_templates_inner::languageIsSet() const -{ - return m_LanguageIsSet; -} - -void GetTemplates_templates_inner::unsetLanguage() -{ - m_LanguageIsSet = false; -} -utility::string_t GetTemplates_templates_inner::getName() const -{ - return m_Name; -} - -void GetTemplates_templates_inner::setName(const utility::string_t& value) -{ - m_Name = value; - m_NameIsSet = true; -} - -bool GetTemplates_templates_inner::nameIsSet() const -{ - return m_NameIsSet; -} - -void GetTemplates_templates_inner::unsetName() -{ - m_NameIsSet = false; -} -utility::string_t GetTemplates_templates_inner::getRNamespace() const -{ - return m_r_namespace; -} - -void GetTemplates_templates_inner::setRNamespace(const utility::string_t& value) -{ - m_r_namespace = value; - m_r_namespaceIsSet = true; -} - -bool GetTemplates_templates_inner::rNamespaceIsSet() const -{ - return m_r_namespaceIsSet; -} - -void GetTemplates_templates_inner::unsetr_namespace() -{ - m_r_namespaceIsSet = false; -} -utility::string_t GetTemplates_templates_inner::getRejectedReason() const -{ - return m_Rejected_reason; -} - -void GetTemplates_templates_inner::setRejectedReason(const utility::string_t& value) -{ - m_Rejected_reason = value; - m_Rejected_reasonIsSet = true; -} - -bool GetTemplates_templates_inner::rejectedReasonIsSet() const -{ - return m_Rejected_reasonIsSet; -} - -void GetTemplates_templates_inner::unsetRejected_reason() -{ - m_Rejected_reasonIsSet = false; -} -utility::string_t GetTemplates_templates_inner::getStatus() const -{ - return m_Status; -} - -void GetTemplates_templates_inner::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool GetTemplates_templates_inner::statusIsSet() const -{ - return m_StatusIsSet; -} - -void GetTemplates_templates_inner::unsetStatus() -{ - m_StatusIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/MeComponents.cpp b/cpp-restsdk/src/model/MeComponents.cpp deleted file mode 100644 index ba99f2f..0000000 --- a/cpp-restsdk/src/model/MeComponents.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/MeComponents.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -MeComponents::MeComponents() -{ - m_About = utility::conversions::to_string_t(""); - m_AboutIsSet = false; - m_Address = utility::conversions::to_string_t(""); - m_AddressIsSet = false; - m_Description = utility::conversions::to_string_t(""); - m_DescriptionIsSet = false; - m_Email = utility::conversions::to_string_t(""); - m_EmailIsSet = false; - m_Phone = utility::conversions::to_string_t(""); - m_PhoneIsSet = false; - m_Vertical = utility::conversions::to_string_t(""); - m_VerticalIsSet = false; - m_Photo = utility::conversions::to_string_t(""); - m_PhotoIsSet = false; -} - -MeComponents::~MeComponents() -{ -} - -void MeComponents::validate() -{ - // TODO: implement validation -} - -web::json::value MeComponents::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_AboutIsSet) - { - val[utility::conversions::to_string_t(U("about"))] = ModelBase::toJson(m_About); - } - if(m_AddressIsSet) - { - val[utility::conversions::to_string_t(U("address"))] = ModelBase::toJson(m_Address); - } - if(m_DescriptionIsSet) - { - val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description); - } - if(m_EmailIsSet) - { - val[utility::conversions::to_string_t(U("email"))] = ModelBase::toJson(m_Email); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_VerticalIsSet) - { - val[utility::conversions::to_string_t(U("vertical"))] = ModelBase::toJson(m_Vertical); - } - if(m_PhotoIsSet) - { - val[utility::conversions::to_string_t(U("photo"))] = ModelBase::toJson(m_Photo); - } - - return val; -} - -bool MeComponents::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("about")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("about"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAbout; - ok &= ModelBase::fromJson(fieldValue, refVal_setAbout); - setAbout(refVal_setAbout); - } - } - if(val.has_field(utility::conversions::to_string_t(U("address")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("address"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromJson(fieldValue, refVal_setAddress); - setAddress(refVal_setAddress); - } - } - if(val.has_field(utility::conversions::to_string_t(U("description")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); - setDescription(refVal_setDescription); - } - } - if(val.has_field(utility::conversions::to_string_t(U("email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setEmail); - setEmail(refVal_setEmail); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("vertical")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("vertical"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setVertical; - ok &= ModelBase::fromJson(fieldValue, refVal_setVertical); - setVertical(refVal_setVertical); - } - } - if(val.has_field(utility::conversions::to_string_t(U("photo")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photo"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhoto; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhoto); - setPhoto(refVal_setPhoto); - } - } - return ok; -} - -void MeComponents::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_AboutIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("about")), m_About)); - } - if(m_AddressIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address)); - } - if(m_DescriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description)); - } - if(m_EmailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email")), m_Email)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_VerticalIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("vertical")), m_Vertical)); - } - if(m_PhotoIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo")), m_Photo)); - } -} - -bool MeComponents::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("about")))) - { - utility::string_t refVal_setAbout; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("about"))), refVal_setAbout ); - setAbout(refVal_setAbout); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("address")))) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))), refVal_setAddress ); - setAddress(refVal_setAddress); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("description")))) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription ); - setDescription(refVal_setDescription); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("email")))) - { - utility::string_t refVal_setEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_setEmail ); - setEmail(refVal_setEmail); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - utility::string_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("vertical")))) - { - utility::string_t refVal_setVertical; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("vertical"))), refVal_setVertical ); - setVertical(refVal_setVertical); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("photo")))) - { - utility::string_t refVal_setPhoto; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo"))), refVal_setPhoto ); - setPhoto(refVal_setPhoto); - } - return ok; -} - -utility::string_t MeComponents::getAbout() const -{ - return m_About; -} - -void MeComponents::setAbout(const utility::string_t& value) -{ - m_About = value; - m_AboutIsSet = true; -} - -bool MeComponents::aboutIsSet() const -{ - return m_AboutIsSet; -} - -void MeComponents::unsetAbout() -{ - m_AboutIsSet = false; -} -utility::string_t MeComponents::getAddress() const -{ - return m_Address; -} - -void MeComponents::setAddress(const utility::string_t& value) -{ - m_Address = value; - m_AddressIsSet = true; -} - -bool MeComponents::addressIsSet() const -{ - return m_AddressIsSet; -} - -void MeComponents::unsetAddress() -{ - m_AddressIsSet = false; -} -utility::string_t MeComponents::getDescription() const -{ - return m_Description; -} - -void MeComponents::setDescription(const utility::string_t& value) -{ - m_Description = value; - m_DescriptionIsSet = true; -} - -bool MeComponents::descriptionIsSet() const -{ - return m_DescriptionIsSet; -} - -void MeComponents::unsetDescription() -{ - m_DescriptionIsSet = false; -} -utility::string_t MeComponents::getEmail() const -{ - return m_Email; -} - -void MeComponents::setEmail(const utility::string_t& value) -{ - m_Email = value; - m_EmailIsSet = true; -} - -bool MeComponents::emailIsSet() const -{ - return m_EmailIsSet; -} - -void MeComponents::unsetEmail() -{ - m_EmailIsSet = false; -} -utility::string_t MeComponents::getPhone() const -{ - return m_Phone; -} - -void MeComponents::setPhone(const utility::string_t& value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool MeComponents::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void MeComponents::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t MeComponents::getVertical() const -{ - return m_Vertical; -} - -void MeComponents::setVertical(const utility::string_t& value) -{ - m_Vertical = value; - m_VerticalIsSet = true; -} - -bool MeComponents::verticalIsSet() const -{ - return m_VerticalIsSet; -} - -void MeComponents::unsetVertical() -{ - m_VerticalIsSet = false; -} -utility::string_t MeComponents::getPhoto() const -{ - return m_Photo; -} - -void MeComponents::setPhoto(const utility::string_t& value) -{ - m_Photo = value; - m_PhotoIsSet = true; -} - -bool MeComponents::photoIsSet() const -{ - return m_PhotoIsSet; -} - -void MeComponents::unsetPhoto() -{ - m_PhotoIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/MediaId.cpp b/cpp-restsdk/src/model/MediaId.cpp deleted file mode 100644 index b4ead08..0000000 --- a/cpp-restsdk/src/model/MediaId.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/MediaId.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -MediaId::MediaId() -{ - m_MediaId = utility::conversions::to_string_t(""); - m_MediaIdIsSet = false; -} - -MediaId::~MediaId() -{ -} - -void MediaId::validate() -{ - // TODO: implement validation -} - -web::json::value MediaId::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_MediaIdIsSet) - { - val[utility::conversions::to_string_t(U("mediaId"))] = ModelBase::toJson(m_MediaId); - } - - return val; -} - -bool MediaId::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("mediaId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("mediaId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMediaId; - ok &= ModelBase::fromJson(fieldValue, refVal_setMediaId); - setMediaId(refVal_setMediaId); - } - } - return ok; -} - -void MediaId::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_MediaIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("mediaId")), m_MediaId)); - } -} - -bool MediaId::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("mediaId")))) - { - utility::string_t refVal_setMediaId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("mediaId"))), refVal_setMediaId ); - setMediaId(refVal_setMediaId); - } - return ok; -} - -utility::string_t MediaId::getMediaId() const -{ - return m_MediaId; -} - -void MediaId::setMediaId(const utility::string_t& value) -{ - m_MediaId = value; - m_MediaIdIsSet = true; -} - -bool MediaId::mediaIdIsSet() const -{ - return m_MediaIdIsSet; -} - -void MediaId::unsetMediaId() -{ - m_MediaIdIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/Message.cpp b/cpp-restsdk/src/model/Message.cpp deleted file mode 100644 index 621d352..0000000 --- a/cpp-restsdk/src/model/Message.cpp +++ /dev/null @@ -1,631 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Message.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Message::Message() -{ - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; - m_FromMe = false; - m_FromMeIsSet = false; - m_Self = 0; - m_SelfIsSet = false; - m_IsForwarded = false; - m_IsForwardedIsSet = false; - m_Author = utility::conversions::to_string_t(""); - m_AuthorIsSet = false; - m_Time = 0; - m_TimeIsSet = false; - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Type = utility::conversions::to_string_t(""); - m_TypeIsSet = false; - m_SenderName = utility::conversions::to_string_t(""); - m_SenderNameIsSet = false; - m_Caption = utility::conversions::to_string_t(""); - m_CaptionIsSet = false; - m_QuotedMsgId = utility::conversions::to_string_t(""); - m_QuotedMsgIdIsSet = false; -} - -Message::~Message() -{ -} - -void Message::validate() -{ - // TODO: implement validation -} - -web::json::value Message::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - if(m_FromMeIsSet) - { - val[utility::conversions::to_string_t(U("fromMe"))] = ModelBase::toJson(m_FromMe); - } - if(m_SelfIsSet) - { - val[utility::conversions::to_string_t(U("self"))] = ModelBase::toJson(m_Self); - } - if(m_IsForwardedIsSet) - { - val[utility::conversions::to_string_t(U("isForwarded"))] = ModelBase::toJson(m_IsForwarded); - } - if(m_AuthorIsSet) - { - val[utility::conversions::to_string_t(U("author"))] = ModelBase::toJson(m_Author); - } - if(m_TimeIsSet) - { - val[utility::conversions::to_string_t(U("time"))] = ModelBase::toJson(m_Time); - } - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_TypeIsSet) - { - val[utility::conversions::to_string_t(U("type"))] = ModelBase::toJson(m_Type); - } - if(m_SenderNameIsSet) - { - val[utility::conversions::to_string_t(U("senderName"))] = ModelBase::toJson(m_SenderName); - } - if(m_CaptionIsSet) - { - val[utility::conversions::to_string_t(U("caption"))] = ModelBase::toJson(m_Caption); - } - if(m_QuotedMsgIdIsSet) - { - val[utility::conversions::to_string_t(U("quotedMsgId"))] = ModelBase::toJson(m_QuotedMsgId); - } - - return val; -} - -bool Message::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - if(val.has_field(utility::conversions::to_string_t(U("fromMe")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("fromMe"))); - if(!fieldValue.is_null()) - { - bool refVal_setFromMe; - ok &= ModelBase::fromJson(fieldValue, refVal_setFromMe); - setFromMe(refVal_setFromMe); - } - } - if(val.has_field(utility::conversions::to_string_t(U("self")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("self"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setSelf; - ok &= ModelBase::fromJson(fieldValue, refVal_setSelf); - setSelf(refVal_setSelf); - } - } - if(val.has_field(utility::conversions::to_string_t(U("isForwarded")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("isForwarded"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsForwarded; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsForwarded); - setIsForwarded(refVal_setIsForwarded); - } - } - if(val.has_field(utility::conversions::to_string_t(U("author")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("author"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAuthor; - ok &= ModelBase::fromJson(fieldValue, refVal_setAuthor); - setAuthor(refVal_setAuthor); - } - } - if(val.has_field(utility::conversions::to_string_t(U("time")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("time"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setTime; - ok &= ModelBase::fromJson(fieldValue, refVal_setTime); - setTime(refVal_setTime); - } - } - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromJson(fieldValue, refVal_setType); - setType(refVal_setType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("senderName")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("senderName"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setSenderName; - ok &= ModelBase::fromJson(fieldValue, refVal_setSenderName); - setSenderName(refVal_setSenderName); - } - } - if(val.has_field(utility::conversions::to_string_t(U("caption")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("caption"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCaption; - ok &= ModelBase::fromJson(fieldValue, refVal_setCaption); - setCaption(refVal_setCaption); - } - } - if(val.has_field(utility::conversions::to_string_t(U("quotedMsgId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("quotedMsgId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setQuotedMsgId; - ok &= ModelBase::fromJson(fieldValue, refVal_setQuotedMsgId); - setQuotedMsgId(refVal_setQuotedMsgId); - } - } - return ok; -} - -void Message::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } - if(m_FromMeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("fromMe")), m_FromMe)); - } - if(m_SelfIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("self")), m_Self)); - } - if(m_IsForwardedIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isForwarded")), m_IsForwarded)); - } - if(m_AuthorIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("author")), m_Author)); - } - if(m_TimeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("time")), m_Time)); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_TypeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type)); - } - if(m_SenderNameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("senderName")), m_SenderName)); - } - if(m_CaptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("caption")), m_Caption)); - } - if(m_QuotedMsgIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("quotedMsgId")), m_QuotedMsgId)); - } -} - -bool Message::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("fromMe")))) - { - bool refVal_setFromMe; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fromMe"))), refVal_setFromMe ); - setFromMe(refVal_setFromMe); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("self")))) - { - int32_t refVal_setSelf; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("self"))), refVal_setSelf ); - setSelf(refVal_setSelf); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("isForwarded")))) - { - bool refVal_setIsForwarded; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isForwarded"))), refVal_setIsForwarded ); - setIsForwarded(refVal_setIsForwarded); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("author")))) - { - utility::string_t refVal_setAuthor; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("author"))), refVal_setAuthor ); - setAuthor(refVal_setAuthor); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("time")))) - { - int32_t refVal_setTime; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("time"))), refVal_setTime ); - setTime(refVal_setTime); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("type")))) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType ); - setType(refVal_setType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("senderName")))) - { - utility::string_t refVal_setSenderName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("senderName"))), refVal_setSenderName ); - setSenderName(refVal_setSenderName); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("caption")))) - { - utility::string_t refVal_setCaption; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("caption"))), refVal_setCaption ); - setCaption(refVal_setCaption); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("quotedMsgId")))) - { - utility::string_t refVal_setQuotedMsgId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("quotedMsgId"))), refVal_setQuotedMsgId ); - setQuotedMsgId(refVal_setQuotedMsgId); - } - return ok; -} - -utility::string_t Message::getId() const -{ - return m_Id; -} - -void Message::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool Message::idIsSet() const -{ - return m_IdIsSet; -} - -void Message::unsetId() -{ - m_IdIsSet = false; -} -utility::string_t Message::getBody() const -{ - return m_Body; -} - -void Message::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool Message::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void Message::unsetBody() -{ - m_BodyIsSet = false; -} -bool Message::isFromMe() const -{ - return m_FromMe; -} - -void Message::setFromMe(bool value) -{ - m_FromMe = value; - m_FromMeIsSet = true; -} - -bool Message::fromMeIsSet() const -{ - return m_FromMeIsSet; -} - -void Message::unsetFromMe() -{ - m_FromMeIsSet = false; -} -int32_t Message::getSelf() const -{ - return m_Self; -} - -void Message::setSelf(int32_t value) -{ - m_Self = value; - m_SelfIsSet = true; -} - -bool Message::selfIsSet() const -{ - return m_SelfIsSet; -} - -void Message::unsetSelf() -{ - m_SelfIsSet = false; -} -bool Message::isIsForwarded() const -{ - return m_IsForwarded; -} - -void Message::setIsForwarded(bool value) -{ - m_IsForwarded = value; - m_IsForwardedIsSet = true; -} - -bool Message::isForwardedIsSet() const -{ - return m_IsForwardedIsSet; -} - -void Message::unsetIsForwarded() -{ - m_IsForwardedIsSet = false; -} -utility::string_t Message::getAuthor() const -{ - return m_Author; -} - -void Message::setAuthor(const utility::string_t& value) -{ - m_Author = value; - m_AuthorIsSet = true; -} - -bool Message::authorIsSet() const -{ - return m_AuthorIsSet; -} - -void Message::unsetAuthor() -{ - m_AuthorIsSet = false; -} -int32_t Message::getTime() const -{ - return m_Time; -} - -void Message::setTime(int32_t value) -{ - m_Time = value; - m_TimeIsSet = true; -} - -bool Message::timeIsSet() const -{ - return m_TimeIsSet; -} - -void Message::unsetTime() -{ - m_TimeIsSet = false; -} -utility::string_t Message::getChatId() const -{ - return m_ChatId; -} - -void Message::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool Message::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void Message::unsetChatId() -{ - m_ChatIdIsSet = false; -} -utility::string_t Message::getType() const -{ - return m_Type; -} - -void Message::setType(const utility::string_t& value) -{ - m_Type = value; - m_TypeIsSet = true; -} - -bool Message::typeIsSet() const -{ - return m_TypeIsSet; -} - -void Message::unsetType() -{ - m_TypeIsSet = false; -} -utility::string_t Message::getSenderName() const -{ - return m_SenderName; -} - -void Message::setSenderName(const utility::string_t& value) -{ - m_SenderName = value; - m_SenderNameIsSet = true; -} - -bool Message::senderNameIsSet() const -{ - return m_SenderNameIsSet; -} - -void Message::unsetSenderName() -{ - m_SenderNameIsSet = false; -} -utility::string_t Message::getCaption() const -{ - return m_Caption; -} - -void Message::setCaption(const utility::string_t& value) -{ - m_Caption = value; - m_CaptionIsSet = true; -} - -bool Message::captionIsSet() const -{ - return m_CaptionIsSet; -} - -void Message::unsetCaption() -{ - m_CaptionIsSet = false; -} -utility::string_t Message::getQuotedMsgId() const -{ - return m_QuotedMsgId; -} - -void Message::setQuotedMsgId(const utility::string_t& value) -{ - m_QuotedMsgId = value; - m_QuotedMsgIdIsSet = true; -} - -bool Message::quotedMsgIdIsSet() const -{ - return m_QuotedMsgIdIsSet; -} - -void Message::unsetQuotedMsgId() -{ - m_QuotedMsgIdIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/MessageIdProp.cpp b/cpp-restsdk/src/model/MessageIdProp.cpp deleted file mode 100644 index 3cf8b58..0000000 --- a/cpp-restsdk/src/model/MessageIdProp.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/MessageIdProp.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -MessageIdProp::MessageIdProp() -{ - m_MessageId = utility::conversions::to_string_t(""); - m_MessageIdIsSet = false; -} - -MessageIdProp::~MessageIdProp() -{ -} - -void MessageIdProp::validate() -{ - // TODO: implement validation -} - -web::json::value MessageIdProp::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_MessageIdIsSet) - { - val[utility::conversions::to_string_t(U("messageId"))] = ModelBase::toJson(m_MessageId); - } - - return val; -} - -bool MessageIdProp::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("messageId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("messageId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMessageId; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessageId); - setMessageId(refVal_setMessageId); - } - } - return ok; -} - -void MessageIdProp::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_MessageIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("messageId")), m_MessageId)); - } -} - -bool MessageIdProp::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("messageId")))) - { - utility::string_t refVal_setMessageId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("messageId"))), refVal_setMessageId ); - setMessageId(refVal_setMessageId); - } - return ok; -} - -utility::string_t MessageIdProp::getMessageId() const -{ - return m_MessageId; -} - -void MessageIdProp::setMessageId(const utility::string_t& value) -{ - m_MessageId = value; - m_MessageIdIsSet = true; -} - -bool MessageIdProp::messageIdIsSet() const -{ - return m_MessageIdIsSet; -} - -void MessageIdProp::unsetMessageId() -{ - m_MessageIdIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/PhoneProp.cpp b/cpp-restsdk/src/model/PhoneProp.cpp deleted file mode 100644 index abf3315..0000000 --- a/cpp-restsdk/src/model/PhoneProp.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/PhoneProp.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -PhoneProp::PhoneProp() -{ - m_Phone = 0; - m_PhoneIsSet = false; -} - -PhoneProp::~PhoneProp() -{ -} - -void PhoneProp::validate() -{ - // TODO: implement validation -} - -web::json::value PhoneProp::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - - return val; -} - -bool PhoneProp::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - return ok; -} - -void PhoneProp::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } -} - -bool PhoneProp::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - return ok; -} - -int32_t PhoneProp::getPhone() const -{ - return m_Phone; -} - -void PhoneProp::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool PhoneProp::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void PhoneProp::unsetPhone() -{ - m_PhoneIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/ReadMessageRequest.cpp b/cpp-restsdk/src/model/ReadMessageRequest.cpp deleted file mode 100644 index 75fc3d9..0000000 --- a/cpp-restsdk/src/model/ReadMessageRequest.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ReadMessageRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -ReadMessageRequest::ReadMessageRequest() -{ - m_MessageId = utility::conversions::to_string_t(""); - m_MessageIdIsSet = false; -} - -ReadMessageRequest::~ReadMessageRequest() -{ -} - -void ReadMessageRequest::validate() -{ - // TODO: implement validation -} - -web::json::value ReadMessageRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_MessageIdIsSet) - { - val[utility::conversions::to_string_t(U("messageId"))] = ModelBase::toJson(m_MessageId); - } - - return val; -} - -bool ReadMessageRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("messageId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("messageId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMessageId; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessageId); - setMessageId(refVal_setMessageId); - } - } - return ok; -} - -void ReadMessageRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_MessageIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("messageId")), m_MessageId)); - } -} - -bool ReadMessageRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("messageId")))) - { - utility::string_t refVal_setMessageId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("messageId"))), refVal_setMessageId ); - setMessageId(refVal_setMessageId); - } - return ok; -} - -utility::string_t ReadMessageRequest::getMessageId() const -{ - return m_MessageId; -} - -void ReadMessageRequest::setMessageId(const utility::string_t& value) -{ - m_MessageId = value; - m_MessageIdIsSet = true; -} - -bool ReadMessageRequest::messageIdIsSet() const -{ - return m_MessageIdIsSet; -} - -void ReadMessageRequest::unsetMessageId() -{ - m_MessageIdIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/RemoveTemplateRequest.cpp b/cpp-restsdk/src/model/RemoveTemplateRequest.cpp deleted file mode 100644 index 5f5f01f..0000000 --- a/cpp-restsdk/src/model/RemoveTemplateRequest.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/RemoveTemplateRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -RemoveTemplateRequest::RemoveTemplateRequest() -{ - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; -} - -RemoveTemplateRequest::~RemoveTemplateRequest() -{ -} - -void RemoveTemplateRequest::validate() -{ - // TODO: implement validation -} - -web::json::value RemoveTemplateRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_NameIsSet) - { - val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name); - } - - return val; -} - -bool RemoveTemplateRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - } - } - return ok; -} - -void RemoveTemplateRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name)); - } -} - -bool RemoveTemplateRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName ); - setName(refVal_setName); - } - return ok; -} - -utility::string_t RemoveTemplateRequest::getName() const -{ - return m_Name; -} - -void RemoveTemplateRequest::setName(const utility::string_t& value) -{ - m_Name = value; - m_NameIsSet = true; -} - -bool RemoveTemplateRequest::nameIsSet() const -{ - return m_NameIsSet; -} - -void RemoveTemplateRequest::unsetName() -{ - m_NameIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendContactRequest.cpp b/cpp-restsdk/src/model/SendContactRequest.cpp deleted file mode 100644 index 53a329f..0000000 --- a/cpp-restsdk/src/model/SendContactRequest.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendContactRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendContactRequest::SendContactRequest() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_ContactsIsSet = false; -} - -SendContactRequest::~SendContactRequest() -{ -} - -void SendContactRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendContactRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_ContactsIsSet) - { - val[utility::conversions::to_string_t(U("contacts"))] = ModelBase::toJson(m_Contacts); - } - - return val; -} - -bool SendContactRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("contacts")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contacts"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setContacts; - ok &= ModelBase::fromJson(fieldValue, refVal_setContacts); - setContacts(refVal_setContacts); - } - } - return ok; -} - -void SendContactRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_ContactsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("contacts")), m_Contacts)); - } -} - -bool SendContactRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("contacts")))) - { - std::vector> refVal_setContacts; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contacts"))), refVal_setContacts ); - setContacts(refVal_setContacts); - } - return ok; -} - -utility::string_t SendContactRequest::getChatId() const -{ - return m_ChatId; -} - -void SendContactRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendContactRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendContactRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendContactRequest::getPhone() const -{ - return m_Phone; -} - -void SendContactRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendContactRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendContactRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -std::vector>& SendContactRequest::getContacts() -{ - return m_Contacts; -} - -void SendContactRequest::setContacts(const std::vector>& value) -{ - m_Contacts = value; - m_ContactsIsSet = true; -} - -bool SendContactRequest::contactsIsSet() const -{ - return m_ContactsIsSet; -} - -void SendContactRequest::unsetContacts() -{ - m_ContactsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendFileRequest.cpp b/cpp-restsdk/src/model/SendFileRequest.cpp deleted file mode 100644 index 6fbbfde..0000000 --- a/cpp-restsdk/src/model/SendFileRequest.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendFileRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendFileRequest::SendFileRequest() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; - m_Filename = utility::conversions::to_string_t(""); - m_FilenameIsSet = false; - m_Caption = utility::conversions::to_string_t(""); - m_CaptionIsSet = false; -} - -SendFileRequest::~SendFileRequest() -{ -} - -void SendFileRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendFileRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - if(m_FilenameIsSet) - { - val[utility::conversions::to_string_t(U("filename"))] = ModelBase::toJson(m_Filename); - } - if(m_CaptionIsSet) - { - val[utility::conversions::to_string_t(U("caption"))] = ModelBase::toJson(m_Caption); - } - - return val; -} - -bool SendFileRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - if(val.has_field(utility::conversions::to_string_t(U("filename")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("filename"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setFilename; - ok &= ModelBase::fromJson(fieldValue, refVal_setFilename); - setFilename(refVal_setFilename); - } - } - if(val.has_field(utility::conversions::to_string_t(U("caption")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("caption"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCaption; - ok &= ModelBase::fromJson(fieldValue, refVal_setCaption); - setCaption(refVal_setCaption); - } - } - return ok; -} - -void SendFileRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } - if(m_FilenameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("filename")), m_Filename)); - } - if(m_CaptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("caption")), m_Caption)); - } -} - -bool SendFileRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("filename")))) - { - utility::string_t refVal_setFilename; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("filename"))), refVal_setFilename ); - setFilename(refVal_setFilename); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("caption")))) - { - utility::string_t refVal_setCaption; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("caption"))), refVal_setCaption ); - setCaption(refVal_setCaption); - } - return ok; -} - -utility::string_t SendFileRequest::getChatId() const -{ - return m_ChatId; -} - -void SendFileRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendFileRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendFileRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendFileRequest::getPhone() const -{ - return m_Phone; -} - -void SendFileRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendFileRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendFileRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t SendFileRequest::getBody() const -{ - return m_Body; -} - -void SendFileRequest::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool SendFileRequest::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void SendFileRequest::unsetBody() -{ - m_BodyIsSet = false; -} -utility::string_t SendFileRequest::getFilename() const -{ - return m_Filename; -} - -void SendFileRequest::setFilename(const utility::string_t& value) -{ - m_Filename = value; - m_FilenameIsSet = true; -} - -bool SendFileRequest::filenameIsSet() const -{ - return m_FilenameIsSet; -} - -void SendFileRequest::unsetFilename() -{ - m_FilenameIsSet = false; -} -utility::string_t SendFileRequest::getCaption() const -{ - return m_Caption; -} - -void SendFileRequest::setCaption(const utility::string_t& value) -{ - m_Caption = value; - m_CaptionIsSet = true; -} - -bool SendFileRequest::captionIsSet() const -{ - return m_CaptionIsSet; -} - -void SendFileRequest::unsetCaption() -{ - m_CaptionIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendListRequest.cpp b/cpp-restsdk/src/model/SendListRequest.cpp deleted file mode 100644 index e338a4b..0000000 --- a/cpp-restsdk/src/model/SendListRequest.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendListRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendListRequest::SendListRequest() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; - m_Header = utility::conversions::to_string_t(""); - m_HeaderIsSet = false; - m_Footer = utility::conversions::to_string_t(""); - m_FooterIsSet = false; - m_Action = utility::conversions::to_string_t(""); - m_ActionIsSet = false; - m_SectionsIsSet = false; -} - -SendListRequest::~SendListRequest() -{ -} - -void SendListRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendListRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - if(m_HeaderIsSet) - { - val[utility::conversions::to_string_t(U("header"))] = ModelBase::toJson(m_Header); - } - if(m_FooterIsSet) - { - val[utility::conversions::to_string_t(U("footer"))] = ModelBase::toJson(m_Footer); - } - if(m_ActionIsSet) - { - val[utility::conversions::to_string_t(U("action"))] = ModelBase::toJson(m_Action); - } - if(m_SectionsIsSet) - { - val[utility::conversions::to_string_t(U("sections"))] = ModelBase::toJson(m_Sections); - } - - return val; -} - -bool SendListRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - if(val.has_field(utility::conversions::to_string_t(U("header")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("header"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setHeader; - ok &= ModelBase::fromJson(fieldValue, refVal_setHeader); - setHeader(refVal_setHeader); - } - } - if(val.has_field(utility::conversions::to_string_t(U("footer")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("footer"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setFooter; - ok &= ModelBase::fromJson(fieldValue, refVal_setFooter); - setFooter(refVal_setFooter); - } - } - if(val.has_field(utility::conversions::to_string_t(U("action")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("action"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAction; - ok &= ModelBase::fromJson(fieldValue, refVal_setAction); - setAction(refVal_setAction); - } - } - if(val.has_field(utility::conversions::to_string_t(U("sections")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("sections"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setSections; - ok &= ModelBase::fromJson(fieldValue, refVal_setSections); - setSections(refVal_setSections); - } - } - return ok; -} - -void SendListRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } - if(m_HeaderIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("header")), m_Header)); - } - if(m_FooterIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("footer")), m_Footer)); - } - if(m_ActionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("action")), m_Action)); - } - if(m_SectionsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("sections")), m_Sections)); - } -} - -bool SendListRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("header")))) - { - utility::string_t refVal_setHeader; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("header"))), refVal_setHeader ); - setHeader(refVal_setHeader); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("footer")))) - { - utility::string_t refVal_setFooter; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("footer"))), refVal_setFooter ); - setFooter(refVal_setFooter); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("action")))) - { - utility::string_t refVal_setAction; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("action"))), refVal_setAction ); - setAction(refVal_setAction); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("sections")))) - { - std::vector> refVal_setSections; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("sections"))), refVal_setSections ); - setSections(refVal_setSections); - } - return ok; -} - -utility::string_t SendListRequest::getChatId() const -{ - return m_ChatId; -} - -void SendListRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendListRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendListRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendListRequest::getPhone() const -{ - return m_Phone; -} - -void SendListRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendListRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendListRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t SendListRequest::getBody() const -{ - return m_Body; -} - -void SendListRequest::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool SendListRequest::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void SendListRequest::unsetBody() -{ - m_BodyIsSet = false; -} -utility::string_t SendListRequest::getHeader() const -{ - return m_Header; -} - -void SendListRequest::setHeader(const utility::string_t& value) -{ - m_Header = value; - m_HeaderIsSet = true; -} - -bool SendListRequest::headerIsSet() const -{ - return m_HeaderIsSet; -} - -void SendListRequest::unsetHeader() -{ - m_HeaderIsSet = false; -} -utility::string_t SendListRequest::getFooter() const -{ - return m_Footer; -} - -void SendListRequest::setFooter(const utility::string_t& value) -{ - m_Footer = value; - m_FooterIsSet = true; -} - -bool SendListRequest::footerIsSet() const -{ - return m_FooterIsSet; -} - -void SendListRequest::unsetFooter() -{ - m_FooterIsSet = false; -} -utility::string_t SendListRequest::getAction() const -{ - return m_Action; -} - -void SendListRequest::setAction(const utility::string_t& value) -{ - m_Action = value; - m_ActionIsSet = true; -} - -bool SendListRequest::actionIsSet() const -{ - return m_ActionIsSet; -} - -void SendListRequest::unsetAction() -{ - m_ActionIsSet = false; -} -std::vector>& SendListRequest::getSections() -{ - return m_Sections; -} - -void SendListRequest::setSections(const std::vector>& value) -{ - m_Sections = value; - m_SectionsIsSet = true; -} - -bool SendListRequest::sectionsIsSet() const -{ - return m_SectionsIsSet; -} - -void SendListRequest::unsetSections() -{ - m_SectionsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendListRequest_allOf_rows.cpp b/cpp-restsdk/src/model/SendListRequest_allOf_rows.cpp deleted file mode 100644 index 21923b8..0000000 --- a/cpp-restsdk/src/model/SendListRequest_allOf_rows.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendListRequest_allOf_rows.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendListRequest_allOf_rows::SendListRequest_allOf_rows() -{ - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Title = utility::conversions::to_string_t(""); - m_TitleIsSet = false; - m_Description = utility::conversions::to_string_t(""); - m_DescriptionIsSet = false; -} - -SendListRequest_allOf_rows::~SendListRequest_allOf_rows() -{ -} - -void SendListRequest_allOf_rows::validate() -{ - // TODO: implement validation -} - -web::json::value SendListRequest_allOf_rows::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_TitleIsSet) - { - val[utility::conversions::to_string_t(U("title"))] = ModelBase::toJson(m_Title); - } - if(m_DescriptionIsSet) - { - val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description); - } - - return val; -} - -bool SendListRequest_allOf_rows::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("title")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("title"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromJson(fieldValue, refVal_setTitle); - setTitle(refVal_setTitle); - } - } - if(val.has_field(utility::conversions::to_string_t(U("description")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); - setDescription(refVal_setDescription); - } - } - return ok; -} - -void SendListRequest_allOf_rows::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_TitleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("title")), m_Title)); - } - if(m_DescriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description)); - } -} - -bool SendListRequest_allOf_rows::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("title")))) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("title"))), refVal_setTitle ); - setTitle(refVal_setTitle); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("description")))) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription ); - setDescription(refVal_setDescription); - } - return ok; -} - -utility::string_t SendListRequest_allOf_rows::getId() const -{ - return m_Id; -} - -void SendListRequest_allOf_rows::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool SendListRequest_allOf_rows::idIsSet() const -{ - return m_IdIsSet; -} - -void SendListRequest_allOf_rows::unsetId() -{ - m_IdIsSet = false; -} -utility::string_t SendListRequest_allOf_rows::getTitle() const -{ - return m_Title; -} - -void SendListRequest_allOf_rows::setTitle(const utility::string_t& value) -{ - m_Title = value; - m_TitleIsSet = true; -} - -bool SendListRequest_allOf_rows::titleIsSet() const -{ - return m_TitleIsSet; -} - -void SendListRequest_allOf_rows::unsetTitle() -{ - m_TitleIsSet = false; -} -utility::string_t SendListRequest_allOf_rows::getDescription() const -{ - return m_Description; -} - -void SendListRequest_allOf_rows::setDescription(const utility::string_t& value) -{ - m_Description = value; - m_DescriptionIsSet = true; -} - -bool SendListRequest_allOf_rows::descriptionIsSet() const -{ - return m_DescriptionIsSet; -} - -void SendListRequest_allOf_rows::unsetDescription() -{ - m_DescriptionIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendListRequest_allOf_sections.cpp b/cpp-restsdk/src/model/SendListRequest_allOf_sections.cpp deleted file mode 100644 index c8cca7f..0000000 --- a/cpp-restsdk/src/model/SendListRequest_allOf_sections.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendListRequest_allOf_sections.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendListRequest_allOf_sections::SendListRequest_allOf_sections() -{ - m_Title = utility::conversions::to_string_t(""); - m_TitleIsSet = false; - m_RowsIsSet = false; -} - -SendListRequest_allOf_sections::~SendListRequest_allOf_sections() -{ -} - -void SendListRequest_allOf_sections::validate() -{ - // TODO: implement validation -} - -web::json::value SendListRequest_allOf_sections::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TitleIsSet) - { - val[utility::conversions::to_string_t(U("title"))] = ModelBase::toJson(m_Title); - } - if(m_RowsIsSet) - { - val[utility::conversions::to_string_t(U("rows"))] = ModelBase::toJson(m_Rows); - } - - return val; -} - -bool SendListRequest_allOf_sections::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("title")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("title"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromJson(fieldValue, refVal_setTitle); - setTitle(refVal_setTitle); - } - } - if(val.has_field(utility::conversions::to_string_t(U("rows")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("rows"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setRows; - ok &= ModelBase::fromJson(fieldValue, refVal_setRows); - setRows(refVal_setRows); - } - } - return ok; -} - -void SendListRequest_allOf_sections::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TitleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("title")), m_Title)); - } - if(m_RowsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rows")), m_Rows)); - } -} - -bool SendListRequest_allOf_sections::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("title")))) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("title"))), refVal_setTitle ); - setTitle(refVal_setTitle); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("rows")))) - { - std::vector> refVal_setRows; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rows"))), refVal_setRows ); - setRows(refVal_setRows); - } - return ok; -} - -utility::string_t SendListRequest_allOf_sections::getTitle() const -{ - return m_Title; -} - -void SendListRequest_allOf_sections::setTitle(const utility::string_t& value) -{ - m_Title = value; - m_TitleIsSet = true; -} - -bool SendListRequest_allOf_sections::titleIsSet() const -{ - return m_TitleIsSet; -} - -void SendListRequest_allOf_sections::unsetTitle() -{ - m_TitleIsSet = false; -} -std::vector>& SendListRequest_allOf_sections::getRows() -{ - return m_Rows; -} - -void SendListRequest_allOf_sections::setRows(const std::vector>& value) -{ - m_Rows = value; - m_RowsIsSet = true; -} - -bool SendListRequest_allOf_sections::rowsIsSet() const -{ - return m_RowsIsSet; -} - -void SendListRequest_allOf_sections::unsetRows() -{ - m_RowsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendLocationRequest.cpp b/cpp-restsdk/src/model/SendLocationRequest.cpp deleted file mode 100644 index 00156d6..0000000 --- a/cpp-restsdk/src/model/SendLocationRequest.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendLocationRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendLocationRequest::SendLocationRequest() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_Lat = utility::conversions::to_string_t(""); - m_LatIsSet = false; - m_Lng = utility::conversions::to_string_t(""); - m_LngIsSet = false; - m_Address = utility::conversions::to_string_t(""); - m_AddressIsSet = false; - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; -} - -SendLocationRequest::~SendLocationRequest() -{ -} - -void SendLocationRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendLocationRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_LatIsSet) - { - val[utility::conversions::to_string_t(U("lat"))] = ModelBase::toJson(m_Lat); - } - if(m_LngIsSet) - { - val[utility::conversions::to_string_t(U("lng"))] = ModelBase::toJson(m_Lng); - } - if(m_AddressIsSet) - { - val[utility::conversions::to_string_t(U("address"))] = ModelBase::toJson(m_Address); - } - if(m_NameIsSet) - { - val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name); - } - - return val; -} - -bool SendLocationRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("lat")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("lat"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setLat; - ok &= ModelBase::fromJson(fieldValue, refVal_setLat); - setLat(refVal_setLat); - } - } - if(val.has_field(utility::conversions::to_string_t(U("lng")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("lng"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setLng; - ok &= ModelBase::fromJson(fieldValue, refVal_setLng); - setLng(refVal_setLng); - } - } - if(val.has_field(utility::conversions::to_string_t(U("address")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("address"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromJson(fieldValue, refVal_setAddress); - setAddress(refVal_setAddress); - } - } - if(val.has_field(utility::conversions::to_string_t(U("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - } - } - return ok; -} - -void SendLocationRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_LatIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("lat")), m_Lat)); - } - if(m_LngIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("lng")), m_Lng)); - } - if(m_AddressIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address)); - } - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name)); - } -} - -bool SendLocationRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("lat")))) - { - utility::string_t refVal_setLat; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lat"))), refVal_setLat ); - setLat(refVal_setLat); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("lng")))) - { - utility::string_t refVal_setLng; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lng"))), refVal_setLng ); - setLng(refVal_setLng); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("address")))) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))), refVal_setAddress ); - setAddress(refVal_setAddress); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName ); - setName(refVal_setName); - } - return ok; -} - -utility::string_t SendLocationRequest::getChatId() const -{ - return m_ChatId; -} - -void SendLocationRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendLocationRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendLocationRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendLocationRequest::getPhone() const -{ - return m_Phone; -} - -void SendLocationRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendLocationRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendLocationRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t SendLocationRequest::getLat() const -{ - return m_Lat; -} - -void SendLocationRequest::setLat(const utility::string_t& value) -{ - m_Lat = value; - m_LatIsSet = true; -} - -bool SendLocationRequest::latIsSet() const -{ - return m_LatIsSet; -} - -void SendLocationRequest::unsetLat() -{ - m_LatIsSet = false; -} -utility::string_t SendLocationRequest::getLng() const -{ - return m_Lng; -} - -void SendLocationRequest::setLng(const utility::string_t& value) -{ - m_Lng = value; - m_LngIsSet = true; -} - -bool SendLocationRequest::lngIsSet() const -{ - return m_LngIsSet; -} - -void SendLocationRequest::unsetLng() -{ - m_LngIsSet = false; -} -utility::string_t SendLocationRequest::getAddress() const -{ - return m_Address; -} - -void SendLocationRequest::setAddress(const utility::string_t& value) -{ - m_Address = value; - m_AddressIsSet = true; -} - -bool SendLocationRequest::addressIsSet() const -{ - return m_AddressIsSet; -} - -void SendLocationRequest::unsetAddress() -{ - m_AddressIsSet = false; -} -utility::string_t SendLocationRequest::getName() const -{ - return m_Name; -} - -void SendLocationRequest::setName(const utility::string_t& value) -{ - m_Name = value; - m_NameIsSet = true; -} - -bool SendLocationRequest::nameIsSet() const -{ - return m_NameIsSet; -} - -void SendLocationRequest::unsetName() -{ - m_NameIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendMessageRequest.cpp b/cpp-restsdk/src/model/SendMessageRequest.cpp deleted file mode 100644 index 58588ea..0000000 --- a/cpp-restsdk/src/model/SendMessageRequest.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendMessageRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendMessageRequest::SendMessageRequest() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; -} - -SendMessageRequest::~SendMessageRequest() -{ -} - -void SendMessageRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendMessageRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - - return val; -} - -bool SendMessageRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - return ok; -} - -void SendMessageRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } -} - -bool SendMessageRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - return ok; -} - -utility::string_t SendMessageRequest::getChatId() const -{ - return m_ChatId; -} - -void SendMessageRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendMessageRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendMessageRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendMessageRequest::getPhone() const -{ - return m_Phone; -} - -void SendMessageRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendMessageRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendMessageRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t SendMessageRequest::getBody() const -{ - return m_Body; -} - -void SendMessageRequest::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool SendMessageRequest::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void SendMessageRequest::unsetBody() -{ - m_BodyIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendMessageStatus.cpp b/cpp-restsdk/src/model/SendMessageStatus.cpp deleted file mode 100644 index 658aad7..0000000 --- a/cpp-restsdk/src/model/SendMessageStatus.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendMessageStatus.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendMessageStatus::SendMessageStatus() -{ - m_Sent = false; - m_SentIsSet = false; - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Message = utility::conversions::to_string_t(""); - m_MessageIsSet = false; - m_Description = utility::conversions::to_string_t(""); - m_DescriptionIsSet = false; -} - -SendMessageStatus::~SendMessageStatus() -{ -} - -void SendMessageStatus::validate() -{ - // TODO: implement validation -} - -web::json::value SendMessageStatus::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SentIsSet) - { - val[utility::conversions::to_string_t(U("sent"))] = ModelBase::toJson(m_Sent); - } - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_MessageIsSet) - { - val[utility::conversions::to_string_t(U("message"))] = ModelBase::toJson(m_Message); - } - if(m_DescriptionIsSet) - { - val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description); - } - - return val; -} - -bool SendMessageStatus::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("sent")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("sent"))); - if(!fieldValue.is_null()) - { - bool refVal_setSent; - ok &= ModelBase::fromJson(fieldValue, refVal_setSent); - setSent(refVal_setSent); - } - } - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("message")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("message"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessage); - setMessage(refVal_setMessage); - } - } - if(val.has_field(utility::conversions::to_string_t(U("description")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); - setDescription(refVal_setDescription); - } - } - return ok; -} - -void SendMessageStatus::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SentIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("sent")), m_Sent)); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_MessageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("message")), m_Message)); - } - if(m_DescriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description)); - } -} - -bool SendMessageStatus::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("sent")))) - { - bool refVal_setSent; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("sent"))), refVal_setSent ); - setSent(refVal_setSent); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("message")))) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("message"))), refVal_setMessage ); - setMessage(refVal_setMessage); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("description")))) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription ); - setDescription(refVal_setDescription); - } - return ok; -} - -bool SendMessageStatus::isSent() const -{ - return m_Sent; -} - -void SendMessageStatus::setSent(bool value) -{ - m_Sent = value; - m_SentIsSet = true; -} - -bool SendMessageStatus::sentIsSet() const -{ - return m_SentIsSet; -} - -void SendMessageStatus::unsetSent() -{ - m_SentIsSet = false; -} -utility::string_t SendMessageStatus::getId() const -{ - return m_Id; -} - -void SendMessageStatus::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool SendMessageStatus::idIsSet() const -{ - return m_IdIsSet; -} - -void SendMessageStatus::unsetId() -{ - m_IdIsSet = false; -} -utility::string_t SendMessageStatus::getMessage() const -{ - return m_Message; -} - -void SendMessageStatus::setMessage(const utility::string_t& value) -{ - m_Message = value; - m_MessageIsSet = true; -} - -bool SendMessageStatus::messageIsSet() const -{ - return m_MessageIsSet; -} - -void SendMessageStatus::unsetMessage() -{ - m_MessageIsSet = false; -} -utility::string_t SendMessageStatus::getDescription() const -{ - return m_Description; -} - -void SendMessageStatus::setDescription(const utility::string_t& value) -{ - m_Description = value; - m_DescriptionIsSet = true; -} - -bool SendMessageStatus::descriptionIsSet() const -{ - return m_DescriptionIsSet; -} - -void SendMessageStatus::unsetDescription() -{ - m_DescriptionIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendProductRequest.cpp b/cpp-restsdk/src/model/SendProductRequest.cpp deleted file mode 100644 index 5ed27d2..0000000 --- a/cpp-restsdk/src/model/SendProductRequest.cpp +++ /dev/null @@ -1,354 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendProductRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendProductRequest::SendProductRequest() -{ - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_ActionIsSet = false; - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; - m_Footer = utility::conversions::to_string_t(""); - m_FooterIsSet = false; - m_Header = utility::conversions::to_string_t(""); - m_HeaderIsSet = false; -} - -SendProductRequest::~SendProductRequest() -{ -} - -void SendProductRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendProductRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_ActionIsSet) - { - val[utility::conversions::to_string_t(U("action"))] = ModelBase::toJson(m_Action); - } - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - if(m_FooterIsSet) - { - val[utility::conversions::to_string_t(U("footer"))] = ModelBase::toJson(m_Footer); - } - if(m_HeaderIsSet) - { - val[utility::conversions::to_string_t(U("header"))] = ModelBase::toJson(m_Header); - } - - return val; -} - -bool SendProductRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("action")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("action"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setAction; - ok &= ModelBase::fromJson(fieldValue, refVal_setAction); - setAction(refVal_setAction); - } - } - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - if(val.has_field(utility::conversions::to_string_t(U("footer")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("footer"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setFooter; - ok &= ModelBase::fromJson(fieldValue, refVal_setFooter); - setFooter(refVal_setFooter); - } - } - if(val.has_field(utility::conversions::to_string_t(U("header")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("header"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setHeader; - ok &= ModelBase::fromJson(fieldValue, refVal_setHeader); - setHeader(refVal_setHeader); - } - } - return ok; -} - -void SendProductRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_ActionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("action")), m_Action)); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } - if(m_FooterIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("footer")), m_Footer)); - } - if(m_HeaderIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("header")), m_Header)); - } -} - -bool SendProductRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("action")))) - { - std::shared_ptr refVal_setAction; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("action"))), refVal_setAction ); - setAction(refVal_setAction); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("footer")))) - { - utility::string_t refVal_setFooter; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("footer"))), refVal_setFooter ); - setFooter(refVal_setFooter); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("header")))) - { - utility::string_t refVal_setHeader; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("header"))), refVal_setHeader ); - setHeader(refVal_setHeader); - } - return ok; -} - -utility::string_t SendProductRequest::getChatId() const -{ - return m_ChatId; -} - -void SendProductRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendProductRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendProductRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendProductRequest::getPhone() const -{ - return m_Phone; -} - -void SendProductRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendProductRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendProductRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -std::shared_ptr SendProductRequest::getAction() const -{ - return m_Action; -} - -void SendProductRequest::setAction(const std::shared_ptr& value) -{ - m_Action = value; - m_ActionIsSet = true; -} - -bool SendProductRequest::actionIsSet() const -{ - return m_ActionIsSet; -} - -void SendProductRequest::unsetAction() -{ - m_ActionIsSet = false; -} -utility::string_t SendProductRequest::getBody() const -{ - return m_Body; -} - -void SendProductRequest::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool SendProductRequest::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void SendProductRequest::unsetBody() -{ - m_BodyIsSet = false; -} -utility::string_t SendProductRequest::getFooter() const -{ - return m_Footer; -} - -void SendProductRequest::setFooter(const utility::string_t& value) -{ - m_Footer = value; - m_FooterIsSet = true; -} - -bool SendProductRequest::footerIsSet() const -{ - return m_FooterIsSet; -} - -void SendProductRequest::unsetFooter() -{ - m_FooterIsSet = false; -} -utility::string_t SendProductRequest::getHeader() const -{ - return m_Header; -} - -void SendProductRequest::setHeader(const utility::string_t& value) -{ - m_Header = value; - m_HeaderIsSet = true; -} - -bool SendProductRequest::headerIsSet() const -{ - return m_HeaderIsSet; -} - -void SendProductRequest::unsetHeader() -{ - m_HeaderIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendProductRequest_allOf_action.cpp b/cpp-restsdk/src/model/SendProductRequest_allOf_action.cpp deleted file mode 100644 index 27cbc7c..0000000 --- a/cpp-restsdk/src/model/SendProductRequest_allOf_action.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendProductRequest_allOf_action.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendProductRequest_allOf_action::SendProductRequest_allOf_action() -{ - m_Catalog_id = utility::conversions::to_string_t(""); - m_Catalog_idIsSet = false; - m_Product_retailer_id = utility::conversions::to_string_t(""); - m_Product_retailer_idIsSet = false; - m_SectionsIsSet = false; -} - -SendProductRequest_allOf_action::~SendProductRequest_allOf_action() -{ -} - -void SendProductRequest_allOf_action::validate() -{ - // TODO: implement validation -} - -web::json::value SendProductRequest_allOf_action::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Catalog_idIsSet) - { - val[utility::conversions::to_string_t(U("catalog_id"))] = ModelBase::toJson(m_Catalog_id); - } - if(m_Product_retailer_idIsSet) - { - val[utility::conversions::to_string_t(U("product_retailer_id"))] = ModelBase::toJson(m_Product_retailer_id); - } - if(m_SectionsIsSet) - { - val[utility::conversions::to_string_t(U("sections"))] = ModelBase::toJson(m_Sections); - } - - return val; -} - -bool SendProductRequest_allOf_action::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("catalog_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("catalog_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCatalogId; - ok &= ModelBase::fromJson(fieldValue, refVal_setCatalogId); - setCatalogId(refVal_setCatalogId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("product_retailer_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("product_retailer_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setProductRetailerId; - ok &= ModelBase::fromJson(fieldValue, refVal_setProductRetailerId); - setProductRetailerId(refVal_setProductRetailerId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("sections")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("sections"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setSections; - ok &= ModelBase::fromJson(fieldValue, refVal_setSections); - setSections(refVal_setSections); - } - } - return ok; -} - -void SendProductRequest_allOf_action::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Catalog_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("catalog_id")), m_Catalog_id)); - } - if(m_Product_retailer_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("product_retailer_id")), m_Product_retailer_id)); - } - if(m_SectionsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("sections")), m_Sections)); - } -} - -bool SendProductRequest_allOf_action::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("catalog_id")))) - { - utility::string_t refVal_setCatalogId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("catalog_id"))), refVal_setCatalogId ); - setCatalogId(refVal_setCatalogId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("product_retailer_id")))) - { - utility::string_t refVal_setProductRetailerId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("product_retailer_id"))), refVal_setProductRetailerId ); - setProductRetailerId(refVal_setProductRetailerId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("sections")))) - { - std::vector> refVal_setSections; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("sections"))), refVal_setSections ); - setSections(refVal_setSections); - } - return ok; -} - -utility::string_t SendProductRequest_allOf_action::getCatalogId() const -{ - return m_Catalog_id; -} - -void SendProductRequest_allOf_action::setCatalogId(const utility::string_t& value) -{ - m_Catalog_id = value; - m_Catalog_idIsSet = true; -} - -bool SendProductRequest_allOf_action::catalogIdIsSet() const -{ - return m_Catalog_idIsSet; -} - -void SendProductRequest_allOf_action::unsetCatalog_id() -{ - m_Catalog_idIsSet = false; -} -utility::string_t SendProductRequest_allOf_action::getProductRetailerId() const -{ - return m_Product_retailer_id; -} - -void SendProductRequest_allOf_action::setProductRetailerId(const utility::string_t& value) -{ - m_Product_retailer_id = value; - m_Product_retailer_idIsSet = true; -} - -bool SendProductRequest_allOf_action::productRetailerIdIsSet() const -{ - return m_Product_retailer_idIsSet; -} - -void SendProductRequest_allOf_action::unsetProduct_retailer_id() -{ - m_Product_retailer_idIsSet = false; -} -std::vector>& SendProductRequest_allOf_action::getSections() -{ - return m_Sections; -} - -void SendProductRequest_allOf_action::setSections(const std::vector>& value) -{ - m_Sections = value; - m_SectionsIsSet = true; -} - -bool SendProductRequest_allOf_action::sectionsIsSet() const -{ - return m_SectionsIsSet; -} - -void SendProductRequest_allOf_action::unsetSections() -{ - m_SectionsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendProductRequest_allOf_action_product_items.cpp b/cpp-restsdk/src/model/SendProductRequest_allOf_action_product_items.cpp deleted file mode 100644 index 057a6a4..0000000 --- a/cpp-restsdk/src/model/SendProductRequest_allOf_action_product_items.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendProductRequest_allOf_action_product_items.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendProductRequest_allOf_action_product_items::SendProductRequest_allOf_action_product_items() -{ - m_Product_retailer_id = utility::conversions::to_string_t(""); - m_Product_retailer_idIsSet = false; -} - -SendProductRequest_allOf_action_product_items::~SendProductRequest_allOf_action_product_items() -{ -} - -void SendProductRequest_allOf_action_product_items::validate() -{ - // TODO: implement validation -} - -web::json::value SendProductRequest_allOf_action_product_items::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Product_retailer_idIsSet) - { - val[utility::conversions::to_string_t(U("product_retailer_id"))] = ModelBase::toJson(m_Product_retailer_id); - } - - return val; -} - -bool SendProductRequest_allOf_action_product_items::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("product_retailer_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("product_retailer_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setProductRetailerId; - ok &= ModelBase::fromJson(fieldValue, refVal_setProductRetailerId); - setProductRetailerId(refVal_setProductRetailerId); - } - } - return ok; -} - -void SendProductRequest_allOf_action_product_items::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Product_retailer_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("product_retailer_id")), m_Product_retailer_id)); - } -} - -bool SendProductRequest_allOf_action_product_items::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("product_retailer_id")))) - { - utility::string_t refVal_setProductRetailerId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("product_retailer_id"))), refVal_setProductRetailerId ); - setProductRetailerId(refVal_setProductRetailerId); - } - return ok; -} - -utility::string_t SendProductRequest_allOf_action_product_items::getProductRetailerId() const -{ - return m_Product_retailer_id; -} - -void SendProductRequest_allOf_action_product_items::setProductRetailerId(const utility::string_t& value) -{ - m_Product_retailer_id = value; - m_Product_retailer_idIsSet = true; -} - -bool SendProductRequest_allOf_action_product_items::productRetailerIdIsSet() const -{ - return m_Product_retailer_idIsSet; -} - -void SendProductRequest_allOf_action_product_items::unsetProduct_retailer_id() -{ - m_Product_retailer_idIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendProductRequest_allOf_action_sections.cpp b/cpp-restsdk/src/model/SendProductRequest_allOf_action_sections.cpp deleted file mode 100644 index 92812ab..0000000 --- a/cpp-restsdk/src/model/SendProductRequest_allOf_action_sections.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendProductRequest_allOf_action_sections.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendProductRequest_allOf_action_sections::SendProductRequest_allOf_action_sections() -{ - m_Title = utility::conversions::to_string_t(""); - m_TitleIsSet = false; - m_Product_itemsIsSet = false; -} - -SendProductRequest_allOf_action_sections::~SendProductRequest_allOf_action_sections() -{ -} - -void SendProductRequest_allOf_action_sections::validate() -{ - // TODO: implement validation -} - -web::json::value SendProductRequest_allOf_action_sections::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TitleIsSet) - { - val[utility::conversions::to_string_t(U("title"))] = ModelBase::toJson(m_Title); - } - if(m_Product_itemsIsSet) - { - val[utility::conversions::to_string_t(U("product_items"))] = ModelBase::toJson(m_Product_items); - } - - return val; -} - -bool SendProductRequest_allOf_action_sections::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("title")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("title"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromJson(fieldValue, refVal_setTitle); - setTitle(refVal_setTitle); - } - } - if(val.has_field(utility::conversions::to_string_t(U("product_items")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("product_items"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setProductItems; - ok &= ModelBase::fromJson(fieldValue, refVal_setProductItems); - setProductItems(refVal_setProductItems); - } - } - return ok; -} - -void SendProductRequest_allOf_action_sections::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TitleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("title")), m_Title)); - } - if(m_Product_itemsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("product_items")), m_Product_items)); - } -} - -bool SendProductRequest_allOf_action_sections::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("title")))) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("title"))), refVal_setTitle ); - setTitle(refVal_setTitle); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("product_items")))) - { - std::vector> refVal_setProductItems; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("product_items"))), refVal_setProductItems ); - setProductItems(refVal_setProductItems); - } - return ok; -} - -utility::string_t SendProductRequest_allOf_action_sections::getTitle() const -{ - return m_Title; -} - -void SendProductRequest_allOf_action_sections::setTitle(const utility::string_t& value) -{ - m_Title = value; - m_TitleIsSet = true; -} - -bool SendProductRequest_allOf_action_sections::titleIsSet() const -{ - return m_TitleIsSet; -} - -void SendProductRequest_allOf_action_sections::unsetTitle() -{ - m_TitleIsSet = false; -} -std::vector>& SendProductRequest_allOf_action_sections::getProductItems() -{ - return m_Product_items; -} - -void SendProductRequest_allOf_action_sections::setProductItems(const std::vector>& value) -{ - m_Product_items = value; - m_Product_itemsIsSet = true; -} - -bool SendProductRequest_allOf_action_sections::productItemsIsSet() const -{ - return m_Product_itemsIsSet; -} - -void SendProductRequest_allOf_action_sections::unsetProduct_items() -{ - m_Product_itemsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest.cpp b/cpp-restsdk/src/model/SendTemplateRequest.cpp deleted file mode 100644 index ae0b8c2..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest::SendTemplateRequest() -{ - m_r_namespace = utility::conversions::to_string_t(""); - m_r_namespaceIsSet = false; - m_ChatId = utility::conversions::to_string_t(""); - m_ChatIdIsSet = false; - m_Phone = 0; - m_PhoneIsSet = false; - m_r_template = utility::conversions::to_string_t(""); - m_r_templateIsSet = false; - m_LanguageIsSet = false; - m_ParamsIsSet = false; -} - -SendTemplateRequest::~SendTemplateRequest() -{ -} - -void SendTemplateRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_r_namespaceIsSet) - { - val[utility::conversions::to_string_t(U("namespace"))] = ModelBase::toJson(m_r_namespace); - } - if(m_ChatIdIsSet) - { - val[utility::conversions::to_string_t(U("chatId"))] = ModelBase::toJson(m_ChatId); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_r_templateIsSet) - { - val[utility::conversions::to_string_t(U("template"))] = ModelBase::toJson(m_r_template); - } - if(m_LanguageIsSet) - { - val[utility::conversions::to_string_t(U("language"))] = ModelBase::toJson(m_Language); - } - if(m_ParamsIsSet) - { - val[utility::conversions::to_string_t(U("params"))] = ModelBase::toJson(m_Params); - } - - return val; -} - -bool SendTemplateRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("namespace")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("namespace"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRNamespace; - ok &= ModelBase::fromJson(fieldValue, refVal_setRNamespace); - setRNamespace(refVal_setRNamespace); - } - } - if(val.has_field(utility::conversions::to_string_t(U("chatId")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("chatId"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromJson(fieldValue, refVal_setChatId); - setChatId(refVal_setChatId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("template")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("template"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRTemplate; - ok &= ModelBase::fromJson(fieldValue, refVal_setRTemplate); - setRTemplate(refVal_setRTemplate); - } - } - if(val.has_field(utility::conversions::to_string_t(U("language")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("language"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setLanguage; - ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage); - setLanguage(refVal_setLanguage); - } - } - if(val.has_field(utility::conversions::to_string_t(U("params")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("params"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setParams; - ok &= ModelBase::fromJson(fieldValue, refVal_setParams); - setParams(refVal_setParams); - } - } - return ok; -} - -void SendTemplateRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_r_namespaceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("namespace")), m_r_namespace)); - } - if(m_ChatIdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("chatId")), m_ChatId)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_r_templateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("template")), m_r_template)); - } - if(m_LanguageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("language")), m_Language)); - } - if(m_ParamsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("params")), m_Params)); - } -} - -bool SendTemplateRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("namespace")))) - { - utility::string_t refVal_setRNamespace; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("namespace"))), refVal_setRNamespace ); - setRNamespace(refVal_setRNamespace); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("chatId")))) - { - utility::string_t refVal_setChatId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("chatId"))), refVal_setChatId ); - setChatId(refVal_setChatId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - int32_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("template")))) - { - utility::string_t refVal_setRTemplate; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("template"))), refVal_setRTemplate ); - setRTemplate(refVal_setRTemplate); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("language")))) - { - std::shared_ptr refVal_setLanguage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("language"))), refVal_setLanguage ); - setLanguage(refVal_setLanguage); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("params")))) - { - std::vector> refVal_setParams; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("params"))), refVal_setParams ); - setParams(refVal_setParams); - } - return ok; -} - -utility::string_t SendTemplateRequest::getRNamespace() const -{ - return m_r_namespace; -} - -void SendTemplateRequest::setRNamespace(const utility::string_t& value) -{ - m_r_namespace = value; - m_r_namespaceIsSet = true; -} - -bool SendTemplateRequest::rNamespaceIsSet() const -{ - return m_r_namespaceIsSet; -} - -void SendTemplateRequest::unsetr_namespace() -{ - m_r_namespaceIsSet = false; -} -utility::string_t SendTemplateRequest::getChatId() const -{ - return m_ChatId; -} - -void SendTemplateRequest::setChatId(const utility::string_t& value) -{ - m_ChatId = value; - m_ChatIdIsSet = true; -} - -bool SendTemplateRequest::chatIdIsSet() const -{ - return m_ChatIdIsSet; -} - -void SendTemplateRequest::unsetChatId() -{ - m_ChatIdIsSet = false; -} -int32_t SendTemplateRequest::getPhone() const -{ - return m_Phone; -} - -void SendTemplateRequest::setPhone(int32_t value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SendTemplateRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SendTemplateRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t SendTemplateRequest::getRTemplate() const -{ - return m_r_template; -} - -void SendTemplateRequest::setRTemplate(const utility::string_t& value) -{ - m_r_template = value; - m_r_templateIsSet = true; -} - -bool SendTemplateRequest::rTemplateIsSet() const -{ - return m_r_templateIsSet; -} - -void SendTemplateRequest::unsetr_template() -{ - m_r_templateIsSet = false; -} -std::shared_ptr SendTemplateRequest::getLanguage() const -{ - return m_Language; -} - -void SendTemplateRequest::setLanguage(const std::shared_ptr& value) -{ - m_Language = value; - m_LanguageIsSet = true; -} - -bool SendTemplateRequest::languageIsSet() const -{ - return m_LanguageIsSet; -} - -void SendTemplateRequest::unsetLanguage() -{ - m_LanguageIsSet = false; -} -std::vector>& SendTemplateRequest::getParams() -{ - return m_Params; -} - -void SendTemplateRequest::setParams(const std::vector>& value) -{ - m_Params = value; - m_ParamsIsSet = true; -} - -bool SendTemplateRequest::paramsIsSet() const -{ - return m_ParamsIsSet; -} - -void SendTemplateRequest::unsetParams() -{ - m_ParamsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest_allOf_currency.cpp b/cpp-restsdk/src/model/SendTemplateRequest_allOf_currency.cpp deleted file mode 100644 index 86f36f7..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest_allOf_currency.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_currency.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest_allOf_currency::SendTemplateRequest_allOf_currency() -{ - m_Currency_code = utility::conversions::to_string_t(""); - m_Currency_codeIsSet = false; - m_Amount_1000 = 0; - m_Amount_1000IsSet = false; -} - -SendTemplateRequest_allOf_currency::~SendTemplateRequest_allOf_currency() -{ -} - -void SendTemplateRequest_allOf_currency::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest_allOf_currency::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Currency_codeIsSet) - { - val[utility::conversions::to_string_t(U("currency_code"))] = ModelBase::toJson(m_Currency_code); - } - if(m_Amount_1000IsSet) - { - val[utility::conversions::to_string_t(U("amount_1000"))] = ModelBase::toJson(m_Amount_1000); - } - - return val; -} - -bool SendTemplateRequest_allOf_currency::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("currency_code")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("currency_code"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCurrencyCode; - ok &= ModelBase::fromJson(fieldValue, refVal_setCurrencyCode); - setCurrencyCode(refVal_setCurrencyCode); - } - } - if(val.has_field(utility::conversions::to_string_t(U("amount_1000")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("amount_1000"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setAmount1000; - ok &= ModelBase::fromJson(fieldValue, refVal_setAmount1000); - setAmount1000(refVal_setAmount1000); - } - } - return ok; -} - -void SendTemplateRequest_allOf_currency::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Currency_codeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("currency_code")), m_Currency_code)); - } - if(m_Amount_1000IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("amount_1000")), m_Amount_1000)); - } -} - -bool SendTemplateRequest_allOf_currency::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("currency_code")))) - { - utility::string_t refVal_setCurrencyCode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("currency_code"))), refVal_setCurrencyCode ); - setCurrencyCode(refVal_setCurrencyCode); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("amount_1000")))) - { - int32_t refVal_setAmount1000; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("amount_1000"))), refVal_setAmount1000 ); - setAmount1000(refVal_setAmount1000); - } - return ok; -} - -utility::string_t SendTemplateRequest_allOf_currency::getCurrencyCode() const -{ - return m_Currency_code; -} - -void SendTemplateRequest_allOf_currency::setCurrencyCode(const utility::string_t& value) -{ - m_Currency_code = value; - m_Currency_codeIsSet = true; -} - -bool SendTemplateRequest_allOf_currency::currencyCodeIsSet() const -{ - return m_Currency_codeIsSet; -} - -void SendTemplateRequest_allOf_currency::unsetCurrency_code() -{ - m_Currency_codeIsSet = false; -} -int32_t SendTemplateRequest_allOf_currency::getAmount1000() const -{ - return m_Amount_1000; -} - -void SendTemplateRequest_allOf_currency::setAmount1000(int32_t value) -{ - m_Amount_1000 = value; - m_Amount_1000IsSet = true; -} - -bool SendTemplateRequest_allOf_currency::amount1000IsSet() const -{ - return m_Amount_1000IsSet; -} - -void SendTemplateRequest_allOf_currency::unsetAmount_1000() -{ - m_Amount_1000IsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time.cpp b/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time.cpp deleted file mode 100644 index 3503c3b..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest_allOf_date_time::SendTemplateRequest_allOf_date_time() -{ - m_ComponentIsSet = false; - m_Unix_epochIsSet = false; -} - -SendTemplateRequest_allOf_date_time::~SendTemplateRequest_allOf_date_time() -{ -} - -void SendTemplateRequest_allOf_date_time::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest_allOf_date_time::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ComponentIsSet) - { - val[utility::conversions::to_string_t(U("component"))] = ModelBase::toJson(m_Component); - } - if(m_Unix_epochIsSet) - { - val[utility::conversions::to_string_t(U("unix_epoch"))] = ModelBase::toJson(m_Unix_epoch); - } - - return val; -} - -bool SendTemplateRequest_allOf_date_time::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("component")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("component"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setComponent; - ok &= ModelBase::fromJson(fieldValue, refVal_setComponent); - setComponent(refVal_setComponent); - } - } - if(val.has_field(utility::conversions::to_string_t(U("unix_epoch")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("unix_epoch"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setUnixEpoch; - ok &= ModelBase::fromJson(fieldValue, refVal_setUnixEpoch); - setUnixEpoch(refVal_setUnixEpoch); - } - } - return ok; -} - -void SendTemplateRequest_allOf_date_time::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ComponentIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("component")), m_Component)); - } - if(m_Unix_epochIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("unix_epoch")), m_Unix_epoch)); - } -} - -bool SendTemplateRequest_allOf_date_time::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("component")))) - { - std::shared_ptr refVal_setComponent; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("component"))), refVal_setComponent ); - setComponent(refVal_setComponent); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("unix_epoch")))) - { - std::shared_ptr refVal_setUnixEpoch; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("unix_epoch"))), refVal_setUnixEpoch ); - setUnixEpoch(refVal_setUnixEpoch); - } - return ok; -} - -std::shared_ptr SendTemplateRequest_allOf_date_time::getComponent() const -{ - return m_Component; -} - -void SendTemplateRequest_allOf_date_time::setComponent(const std::shared_ptr& value) -{ - m_Component = value; - m_ComponentIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time::componentIsSet() const -{ - return m_ComponentIsSet; -} - -void SendTemplateRequest_allOf_date_time::unsetComponent() -{ - m_ComponentIsSet = false; -} -std::shared_ptr SendTemplateRequest_allOf_date_time::getUnixEpoch() const -{ - return m_Unix_epoch; -} - -void SendTemplateRequest_allOf_date_time::setUnixEpoch(const std::shared_ptr& value) -{ - m_Unix_epoch = value; - m_Unix_epochIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time::unixEpochIsSet() const -{ - return m_Unix_epochIsSet; -} - -void SendTemplateRequest_allOf_date_time::unsetUnix_epoch() -{ - m_Unix_epochIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_component.cpp b/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_component.cpp deleted file mode 100644 index 299a000..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_component.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_component.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest_allOf_date_time_component::SendTemplateRequest_allOf_date_time_component() -{ - m_Day_of_week = utility::conversions::to_string_t(""); - m_Day_of_weekIsSet = false; - m_Year = 0; - m_YearIsSet = false; - m_Month = 0; - m_MonthIsSet = false; - m_Day_of_month = 0; - m_Day_of_monthIsSet = false; - m_Hour = 0; - m_HourIsSet = false; - m_Minute = 0; - m_MinuteIsSet = false; - m_Calendar = utility::conversions::to_string_t(""); - m_CalendarIsSet = false; -} - -SendTemplateRequest_allOf_date_time_component::~SendTemplateRequest_allOf_date_time_component() -{ -} - -void SendTemplateRequest_allOf_date_time_component::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest_allOf_date_time_component::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Day_of_weekIsSet) - { - val[utility::conversions::to_string_t(U("day_of_week"))] = ModelBase::toJson(m_Day_of_week); - } - if(m_YearIsSet) - { - val[utility::conversions::to_string_t(U("year"))] = ModelBase::toJson(m_Year); - } - if(m_MonthIsSet) - { - val[utility::conversions::to_string_t(U("month"))] = ModelBase::toJson(m_Month); - } - if(m_Day_of_monthIsSet) - { - val[utility::conversions::to_string_t(U("day_of_month"))] = ModelBase::toJson(m_Day_of_month); - } - if(m_HourIsSet) - { - val[utility::conversions::to_string_t(U("hour"))] = ModelBase::toJson(m_Hour); - } - if(m_MinuteIsSet) - { - val[utility::conversions::to_string_t(U("minute"))] = ModelBase::toJson(m_Minute); - } - if(m_CalendarIsSet) - { - val[utility::conversions::to_string_t(U("calendar"))] = ModelBase::toJson(m_Calendar); - } - - return val; -} - -bool SendTemplateRequest_allOf_date_time_component::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("day_of_week")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("day_of_week"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDayOfWeek; - ok &= ModelBase::fromJson(fieldValue, refVal_setDayOfWeek); - setDayOfWeek(refVal_setDayOfWeek); - } - } - if(val.has_field(utility::conversions::to_string_t(U("year")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("year"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setYear; - ok &= ModelBase::fromJson(fieldValue, refVal_setYear); - setYear(refVal_setYear); - } - } - if(val.has_field(utility::conversions::to_string_t(U("month")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("month"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setMonth; - ok &= ModelBase::fromJson(fieldValue, refVal_setMonth); - setMonth(refVal_setMonth); - } - } - if(val.has_field(utility::conversions::to_string_t(U("day_of_month")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("day_of_month"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setDayOfMonth; - ok &= ModelBase::fromJson(fieldValue, refVal_setDayOfMonth); - setDayOfMonth(refVal_setDayOfMonth); - } - } - if(val.has_field(utility::conversions::to_string_t(U("hour")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("hour"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setHour; - ok &= ModelBase::fromJson(fieldValue, refVal_setHour); - setHour(refVal_setHour); - } - } - if(val.has_field(utility::conversions::to_string_t(U("minute")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("minute"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setMinute; - ok &= ModelBase::fromJson(fieldValue, refVal_setMinute); - setMinute(refVal_setMinute); - } - } - if(val.has_field(utility::conversions::to_string_t(U("calendar")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("calendar"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCalendar; - ok &= ModelBase::fromJson(fieldValue, refVal_setCalendar); - setCalendar(refVal_setCalendar); - } - } - return ok; -} - -void SendTemplateRequest_allOf_date_time_component::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Day_of_weekIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("day_of_week")), m_Day_of_week)); - } - if(m_YearIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("year")), m_Year)); - } - if(m_MonthIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("month")), m_Month)); - } - if(m_Day_of_monthIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("day_of_month")), m_Day_of_month)); - } - if(m_HourIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("hour")), m_Hour)); - } - if(m_MinuteIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("minute")), m_Minute)); - } - if(m_CalendarIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("calendar")), m_Calendar)); - } -} - -bool SendTemplateRequest_allOf_date_time_component::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("day_of_week")))) - { - utility::string_t refVal_setDayOfWeek; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("day_of_week"))), refVal_setDayOfWeek ); - setDayOfWeek(refVal_setDayOfWeek); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("year")))) - { - int32_t refVal_setYear; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("year"))), refVal_setYear ); - setYear(refVal_setYear); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("month")))) - { - int32_t refVal_setMonth; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("month"))), refVal_setMonth ); - setMonth(refVal_setMonth); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("day_of_month")))) - { - int32_t refVal_setDayOfMonth; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("day_of_month"))), refVal_setDayOfMonth ); - setDayOfMonth(refVal_setDayOfMonth); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("hour")))) - { - int32_t refVal_setHour; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("hour"))), refVal_setHour ); - setHour(refVal_setHour); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("minute")))) - { - int32_t refVal_setMinute; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("minute"))), refVal_setMinute ); - setMinute(refVal_setMinute); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("calendar")))) - { - utility::string_t refVal_setCalendar; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("calendar"))), refVal_setCalendar ); - setCalendar(refVal_setCalendar); - } - return ok; -} - -utility::string_t SendTemplateRequest_allOf_date_time_component::getDayOfWeek() const -{ - return m_Day_of_week; -} - -void SendTemplateRequest_allOf_date_time_component::setDayOfWeek(const utility::string_t& value) -{ - m_Day_of_week = value; - m_Day_of_weekIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::dayOfWeekIsSet() const -{ - return m_Day_of_weekIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetDay_of_week() -{ - m_Day_of_weekIsSet = false; -} -int32_t SendTemplateRequest_allOf_date_time_component::getYear() const -{ - return m_Year; -} - -void SendTemplateRequest_allOf_date_time_component::setYear(int32_t value) -{ - m_Year = value; - m_YearIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::yearIsSet() const -{ - return m_YearIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetYear() -{ - m_YearIsSet = false; -} -int32_t SendTemplateRequest_allOf_date_time_component::getMonth() const -{ - return m_Month; -} - -void SendTemplateRequest_allOf_date_time_component::setMonth(int32_t value) -{ - m_Month = value; - m_MonthIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::monthIsSet() const -{ - return m_MonthIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetMonth() -{ - m_MonthIsSet = false; -} -int32_t SendTemplateRequest_allOf_date_time_component::getDayOfMonth() const -{ - return m_Day_of_month; -} - -void SendTemplateRequest_allOf_date_time_component::setDayOfMonth(int32_t value) -{ - m_Day_of_month = value; - m_Day_of_monthIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::dayOfMonthIsSet() const -{ - return m_Day_of_monthIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetDay_of_month() -{ - m_Day_of_monthIsSet = false; -} -int32_t SendTemplateRequest_allOf_date_time_component::getHour() const -{ - return m_Hour; -} - -void SendTemplateRequest_allOf_date_time_component::setHour(int32_t value) -{ - m_Hour = value; - m_HourIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::hourIsSet() const -{ - return m_HourIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetHour() -{ - m_HourIsSet = false; -} -int32_t SendTemplateRequest_allOf_date_time_component::getMinute() const -{ - return m_Minute; -} - -void SendTemplateRequest_allOf_date_time_component::setMinute(int32_t value) -{ - m_Minute = value; - m_MinuteIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::minuteIsSet() const -{ - return m_MinuteIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetMinute() -{ - m_MinuteIsSet = false; -} -utility::string_t SendTemplateRequest_allOf_date_time_component::getCalendar() const -{ - return m_Calendar; -} - -void SendTemplateRequest_allOf_date_time_component::setCalendar(const utility::string_t& value) -{ - m_Calendar = value; - m_CalendarIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_component::calendarIsSet() const -{ - return m_CalendarIsSet; -} - -void SendTemplateRequest_allOf_date_time_component::unsetCalendar() -{ - m_CalendarIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_unix_epoch.cpp b/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_unix_epoch.cpp deleted file mode 100644 index 8dfb9a0..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest_allOf_date_time_unix_epoch.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_date_time_unix_epoch.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest_allOf_date_time_unix_epoch::SendTemplateRequest_allOf_date_time_unix_epoch() -{ - m_Timestamp = 0; - m_TimestampIsSet = false; -} - -SendTemplateRequest_allOf_date_time_unix_epoch::~SendTemplateRequest_allOf_date_time_unix_epoch() -{ -} - -void SendTemplateRequest_allOf_date_time_unix_epoch::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest_allOf_date_time_unix_epoch::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TimestampIsSet) - { - val[utility::conversions::to_string_t(U("timestamp"))] = ModelBase::toJson(m_Timestamp); - } - - return val; -} - -bool SendTemplateRequest_allOf_date_time_unix_epoch::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("timestamp")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("timestamp"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setTimestamp; - ok &= ModelBase::fromJson(fieldValue, refVal_setTimestamp); - setTimestamp(refVal_setTimestamp); - } - } - return ok; -} - -void SendTemplateRequest_allOf_date_time_unix_epoch::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TimestampIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("timestamp")), m_Timestamp)); - } -} - -bool SendTemplateRequest_allOf_date_time_unix_epoch::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("timestamp")))) - { - int32_t refVal_setTimestamp; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("timestamp"))), refVal_setTimestamp ); - setTimestamp(refVal_setTimestamp); - } - return ok; -} - -int32_t SendTemplateRequest_allOf_date_time_unix_epoch::getTimestamp() const -{ - return m_Timestamp; -} - -void SendTemplateRequest_allOf_date_time_unix_epoch::setTimestamp(int32_t value) -{ - m_Timestamp = value; - m_TimestampIsSet = true; -} - -bool SendTemplateRequest_allOf_date_time_unix_epoch::timestampIsSet() const -{ - return m_TimestampIsSet; -} - -void SendTemplateRequest_allOf_date_time_unix_epoch::unsetTimestamp() -{ - m_TimestampIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest_allOf_language.cpp b/cpp-restsdk/src/model/SendTemplateRequest_allOf_language.cpp deleted file mode 100644 index 338239a..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest_allOf_language.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_language.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest_allOf_language::SendTemplateRequest_allOf_language() -{ - m_Policy = utility::conversions::to_string_t(""); - m_PolicyIsSet = false; - m_CodeIsSet = false; -} - -SendTemplateRequest_allOf_language::~SendTemplateRequest_allOf_language() -{ -} - -void SendTemplateRequest_allOf_language::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest_allOf_language::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_PolicyIsSet) - { - val[utility::conversions::to_string_t(U("policy"))] = ModelBase::toJson(m_Policy); - } - if(m_CodeIsSet) - { - val[utility::conversions::to_string_t(U("code"))] = ModelBase::toJson(m_Code); - } - - return val; -} - -bool SendTemplateRequest_allOf_language::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("policy")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("policy"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPolicy; - ok &= ModelBase::fromJson(fieldValue, refVal_setPolicy); - setPolicy(refVal_setPolicy); - } - } - if(val.has_field(utility::conversions::to_string_t(U("code")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("code"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setCode; - ok &= ModelBase::fromJson(fieldValue, refVal_setCode); - setCode(refVal_setCode); - } - } - return ok; -} - -void SendTemplateRequest_allOf_language::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_PolicyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("policy")), m_Policy)); - } - if(m_CodeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("code")), m_Code)); - } -} - -bool SendTemplateRequest_allOf_language::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("policy")))) - { - utility::string_t refVal_setPolicy; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("policy"))), refVal_setPolicy ); - setPolicy(refVal_setPolicy); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("code")))) - { - std::shared_ptr refVal_setCode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code"))), refVal_setCode ); - setCode(refVal_setCode); - } - return ok; -} - -utility::string_t SendTemplateRequest_allOf_language::getPolicy() const -{ - return m_Policy; -} - -void SendTemplateRequest_allOf_language::setPolicy(const utility::string_t& value) -{ - m_Policy = value; - m_PolicyIsSet = true; -} - -bool SendTemplateRequest_allOf_language::policyIsSet() const -{ - return m_PolicyIsSet; -} - -void SendTemplateRequest_allOf_language::unsetPolicy() -{ - m_PolicyIsSet = false; -} -std::shared_ptr SendTemplateRequest_allOf_language::getCode() const -{ - return m_Code; -} - -void SendTemplateRequest_allOf_language::setCode(const std::shared_ptr& value) -{ - m_Code = value; - m_CodeIsSet = true; -} - -bool SendTemplateRequest_allOf_language::codeIsSet() const -{ - return m_CodeIsSet; -} - -void SendTemplateRequest_allOf_language::unsetCode() -{ - m_CodeIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SendTemplateRequest_allOf_params.cpp b/cpp-restsdk/src/model/SendTemplateRequest_allOf_params.cpp deleted file mode 100644 index c8da5d8..0000000 --- a/cpp-restsdk/src/model/SendTemplateRequest_allOf_params.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SendTemplateRequest_allOf_params.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SendTemplateRequest_allOf_params::SendTemplateRequest_allOf_params() -{ - m_r_default = utility::conversions::to_string_t(""); - m_r_defaultIsSet = false; - m_CurrencyIsSet = false; - m_Date_timeIsSet = false; -} - -SendTemplateRequest_allOf_params::~SendTemplateRequest_allOf_params() -{ -} - -void SendTemplateRequest_allOf_params::validate() -{ - // TODO: implement validation -} - -web::json::value SendTemplateRequest_allOf_params::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_r_defaultIsSet) - { - val[utility::conversions::to_string_t(U("default"))] = ModelBase::toJson(m_r_default); - } - if(m_CurrencyIsSet) - { - val[utility::conversions::to_string_t(U("currency"))] = ModelBase::toJson(m_Currency); - } - if(m_Date_timeIsSet) - { - val[utility::conversions::to_string_t(U("date_time"))] = ModelBase::toJson(m_Date_time); - } - - return val; -} - -bool SendTemplateRequest_allOf_params::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("default")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("default"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRDefault; - ok &= ModelBase::fromJson(fieldValue, refVal_setRDefault); - setRDefault(refVal_setRDefault); - } - } - if(val.has_field(utility::conversions::to_string_t(U("currency")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("currency"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setCurrency; - ok &= ModelBase::fromJson(fieldValue, refVal_setCurrency); - setCurrency(refVal_setCurrency); - } - } - if(val.has_field(utility::conversions::to_string_t(U("date_time")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("date_time"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setDateTime; - ok &= ModelBase::fromJson(fieldValue, refVal_setDateTime); - setDateTime(refVal_setDateTime); - } - } - return ok; -} - -void SendTemplateRequest_allOf_params::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_r_defaultIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("default")), m_r_default)); - } - if(m_CurrencyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("currency")), m_Currency)); - } - if(m_Date_timeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("date_time")), m_Date_time)); - } -} - -bool SendTemplateRequest_allOf_params::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("default")))) - { - utility::string_t refVal_setRDefault; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("default"))), refVal_setRDefault ); - setRDefault(refVal_setRDefault); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("currency")))) - { - std::shared_ptr refVal_setCurrency; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("currency"))), refVal_setCurrency ); - setCurrency(refVal_setCurrency); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("date_time")))) - { - std::shared_ptr refVal_setDateTime; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("date_time"))), refVal_setDateTime ); - setDateTime(refVal_setDateTime); - } - return ok; -} - -utility::string_t SendTemplateRequest_allOf_params::getRDefault() const -{ - return m_r_default; -} - -void SendTemplateRequest_allOf_params::setRDefault(const utility::string_t& value) -{ - m_r_default = value; - m_r_defaultIsSet = true; -} - -bool SendTemplateRequest_allOf_params::rDefaultIsSet() const -{ - return m_r_defaultIsSet; -} - -void SendTemplateRequest_allOf_params::unsetr_default() -{ - m_r_defaultIsSet = false; -} -std::shared_ptr SendTemplateRequest_allOf_params::getCurrency() const -{ - return m_Currency; -} - -void SendTemplateRequest_allOf_params::setCurrency(const std::shared_ptr& value) -{ - m_Currency = value; - m_CurrencyIsSet = true; -} - -bool SendTemplateRequest_allOf_params::currencyIsSet() const -{ - return m_CurrencyIsSet; -} - -void SendTemplateRequest_allOf_params::unsetCurrency() -{ - m_CurrencyIsSet = false; -} -std::shared_ptr SendTemplateRequest_allOf_params::getDateTime() const -{ - return m_Date_time; -} - -void SendTemplateRequest_allOf_params::setDateTime(const std::shared_ptr& value) -{ - m_Date_time = value; - m_Date_timeIsSet = true; -} - -bool SendTemplateRequest_allOf_params::dateTimeIsSet() const -{ - return m_Date_timeIsSet; -} - -void SendTemplateRequest_allOf_params::unsetDate_time() -{ - m_Date_timeIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SetCommerce.cpp b/cpp-restsdk/src/model/SetCommerce.cpp deleted file mode 100644 index 7340d47..0000000 --- a/cpp-restsdk/src/model/SetCommerce.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SetCommerce.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SetCommerce::SetCommerce() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -SetCommerce::~SetCommerce() -{ -} - -void SetCommerce::validate() -{ - // TODO: implement validation -} - -web::json::value SetCommerce::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool SetCommerce::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void SetCommerce::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool SetCommerce::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool SetCommerce::isSuccess() const -{ - return m_Success; -} - -void SetCommerce::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool SetCommerce::successIsSet() const -{ - return m_SuccessIsSet; -} - -void SetCommerce::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SetMe.cpp b/cpp-restsdk/src/model/SetMe.cpp deleted file mode 100644 index dc694a4..0000000 --- a/cpp-restsdk/src/model/SetMe.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SetMe.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SetMe::SetMe() -{ - m_Result = utility::conversions::to_string_t(""); - m_ResultIsSet = false; -} - -SetMe::~SetMe() -{ -} - -void SetMe::validate() -{ - // TODO: implement validation -} - -web::json::value SetMe::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ResultIsSet) - { - val[utility::conversions::to_string_t(U("result"))] = ModelBase::toJson(m_Result); - } - - return val; -} - -bool SetMe::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("result")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("result"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setResult; - ok &= ModelBase::fromJson(fieldValue, refVal_setResult); - setResult(refVal_setResult); - } - } - return ok; -} - -void SetMe::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ResultIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("result")), m_Result)); - } -} - -bool SetMe::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("result")))) - { - utility::string_t refVal_setResult; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("result"))), refVal_setResult ); - setResult(refVal_setResult); - } - return ok; -} - -utility::string_t SetMe::getResult() const -{ - return m_Result; -} - -void SetMe::setResult(const utility::string_t& value) -{ - m_Result = value; - m_ResultIsSet = true; -} - -bool SetMe::resultIsSet() const -{ - return m_ResultIsSet; -} - -void SetMe::unsetResult() -{ - m_ResultIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SetMeRequest.cpp b/cpp-restsdk/src/model/SetMeRequest.cpp deleted file mode 100644 index 7b6a4ae..0000000 --- a/cpp-restsdk/src/model/SetMeRequest.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SetMeRequest.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SetMeRequest::SetMeRequest() -{ - m_About = utility::conversions::to_string_t(""); - m_AboutIsSet = false; - m_Address = utility::conversions::to_string_t(""); - m_AddressIsSet = false; - m_Description = utility::conversions::to_string_t(""); - m_DescriptionIsSet = false; - m_Email = utility::conversions::to_string_t(""); - m_EmailIsSet = false; - m_Phone = utility::conversions::to_string_t(""); - m_PhoneIsSet = false; - m_Vertical = utility::conversions::to_string_t(""); - m_VerticalIsSet = false; - m_Photo = utility::conversions::to_string_t(""); - m_PhotoIsSet = false; -} - -SetMeRequest::~SetMeRequest() -{ -} - -void SetMeRequest::validate() -{ - // TODO: implement validation -} - -web::json::value SetMeRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_AboutIsSet) - { - val[utility::conversions::to_string_t(U("about"))] = ModelBase::toJson(m_About); - } - if(m_AddressIsSet) - { - val[utility::conversions::to_string_t(U("address"))] = ModelBase::toJson(m_Address); - } - if(m_DescriptionIsSet) - { - val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description); - } - if(m_EmailIsSet) - { - val[utility::conversions::to_string_t(U("email"))] = ModelBase::toJson(m_Email); - } - if(m_PhoneIsSet) - { - val[utility::conversions::to_string_t(U("phone"))] = ModelBase::toJson(m_Phone); - } - if(m_VerticalIsSet) - { - val[utility::conversions::to_string_t(U("vertical"))] = ModelBase::toJson(m_Vertical); - } - if(m_PhotoIsSet) - { - val[utility::conversions::to_string_t(U("photo"))] = ModelBase::toJson(m_Photo); - } - - return val; -} - -bool SetMeRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("about")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("about"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAbout; - ok &= ModelBase::fromJson(fieldValue, refVal_setAbout); - setAbout(refVal_setAbout); - } - } - if(val.has_field(utility::conversions::to_string_t(U("address")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("address"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromJson(fieldValue, refVal_setAddress); - setAddress(refVal_setAddress); - } - } - if(val.has_field(utility::conversions::to_string_t(U("description")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); - setDescription(refVal_setDescription); - } - } - if(val.has_field(utility::conversions::to_string_t(U("email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setEmail); - setEmail(refVal_setEmail); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhone); - setPhone(refVal_setPhone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("vertical")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("vertical"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setVertical; - ok &= ModelBase::fromJson(fieldValue, refVal_setVertical); - setVertical(refVal_setVertical); - } - } - if(val.has_field(utility::conversions::to_string_t(U("photo")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photo"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhoto; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhoto); - setPhoto(refVal_setPhoto); - } - } - return ok; -} - -void SetMeRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_AboutIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("about")), m_About)); - } - if(m_AddressIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address)); - } - if(m_DescriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description)); - } - if(m_EmailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email")), m_Email)); - } - if(m_PhoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone")), m_Phone)); - } - if(m_VerticalIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("vertical")), m_Vertical)); - } - if(m_PhotoIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo")), m_Photo)); - } -} - -bool SetMeRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("about")))) - { - utility::string_t refVal_setAbout; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("about"))), refVal_setAbout ); - setAbout(refVal_setAbout); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("address")))) - { - utility::string_t refVal_setAddress; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))), refVal_setAddress ); - setAddress(refVal_setAddress); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("description")))) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription ); - setDescription(refVal_setDescription); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("email")))) - { - utility::string_t refVal_setEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_setEmail ); - setEmail(refVal_setEmail); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone")))) - { - utility::string_t refVal_setPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone ); - setPhone(refVal_setPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("vertical")))) - { - utility::string_t refVal_setVertical; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("vertical"))), refVal_setVertical ); - setVertical(refVal_setVertical); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("photo")))) - { - utility::string_t refVal_setPhoto; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo"))), refVal_setPhoto ); - setPhoto(refVal_setPhoto); - } - return ok; -} - -utility::string_t SetMeRequest::getAbout() const -{ - return m_About; -} - -void SetMeRequest::setAbout(const utility::string_t& value) -{ - m_About = value; - m_AboutIsSet = true; -} - -bool SetMeRequest::aboutIsSet() const -{ - return m_AboutIsSet; -} - -void SetMeRequest::unsetAbout() -{ - m_AboutIsSet = false; -} -utility::string_t SetMeRequest::getAddress() const -{ - return m_Address; -} - -void SetMeRequest::setAddress(const utility::string_t& value) -{ - m_Address = value; - m_AddressIsSet = true; -} - -bool SetMeRequest::addressIsSet() const -{ - return m_AddressIsSet; -} - -void SetMeRequest::unsetAddress() -{ - m_AddressIsSet = false; -} -utility::string_t SetMeRequest::getDescription() const -{ - return m_Description; -} - -void SetMeRequest::setDescription(const utility::string_t& value) -{ - m_Description = value; - m_DescriptionIsSet = true; -} - -bool SetMeRequest::descriptionIsSet() const -{ - return m_DescriptionIsSet; -} - -void SetMeRequest::unsetDescription() -{ - m_DescriptionIsSet = false; -} -utility::string_t SetMeRequest::getEmail() const -{ - return m_Email; -} - -void SetMeRequest::setEmail(const utility::string_t& value) -{ - m_Email = value; - m_EmailIsSet = true; -} - -bool SetMeRequest::emailIsSet() const -{ - return m_EmailIsSet; -} - -void SetMeRequest::unsetEmail() -{ - m_EmailIsSet = false; -} -utility::string_t SetMeRequest::getPhone() const -{ - return m_Phone; -} - -void SetMeRequest::setPhone(const utility::string_t& value) -{ - m_Phone = value; - m_PhoneIsSet = true; -} - -bool SetMeRequest::phoneIsSet() const -{ - return m_PhoneIsSet; -} - -void SetMeRequest::unsetPhone() -{ - m_PhoneIsSet = false; -} -utility::string_t SetMeRequest::getVertical() const -{ - return m_Vertical; -} - -void SetMeRequest::setVertical(const utility::string_t& value) -{ - m_Vertical = value; - m_VerticalIsSet = true; -} - -bool SetMeRequest::verticalIsSet() const -{ - return m_VerticalIsSet; -} - -void SetMeRequest::unsetVertical() -{ - m_VerticalIsSet = false; -} -utility::string_t SetMeRequest::getPhoto() const -{ - return m_Photo; -} - -void SetMeRequest::setPhoto(const utility::string_t& value) -{ - m_Photo = value; - m_PhotoIsSet = true; -} - -bool SetMeRequest::photoIsSet() const -{ - return m_PhotoIsSet; -} - -void SetMeRequest::unsetPhoto() -{ - m_PhotoIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SetSettings_200_response.cpp b/cpp-restsdk/src/model/SetSettings_200_response.cpp deleted file mode 100644 index 050fcd8..0000000 --- a/cpp-restsdk/src/model/SetSettings_200_response.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SetSettings_200_response.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SetSettings_200_response::SetSettings_200_response() -{ - m_WebhookUrl = utility::conversions::to_string_t(""); - m_WebhookUrlIsSet = false; - m_UpdateIsSet = false; -} - -SetSettings_200_response::~SetSettings_200_response() -{ -} - -void SetSettings_200_response::validate() -{ - // TODO: implement validation -} - -web::json::value SetSettings_200_response::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_WebhookUrlIsSet) - { - val[utility::conversions::to_string_t(U("webhookUrl"))] = ModelBase::toJson(m_WebhookUrl); - } - if(m_UpdateIsSet) - { - val[utility::conversions::to_string_t(U("update"))] = ModelBase::toJson(m_Update); - } - - return val; -} - -bool SetSettings_200_response::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("webhookUrl")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("webhookUrl"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromJson(fieldValue, refVal_setWebhookUrl); - setWebhookUrl(refVal_setWebhookUrl); - } - } - if(val.has_field(utility::conversions::to_string_t(U("update")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("update"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setUpdate; - ok &= ModelBase::fromJson(fieldValue, refVal_setUpdate); - setUpdate(refVal_setUpdate); - } - } - return ok; -} - -void SetSettings_200_response::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_WebhookUrlIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("webhookUrl")), m_WebhookUrl)); - } - if(m_UpdateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("update")), m_Update)); - } -} - -bool SetSettings_200_response::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("webhookUrl")))) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("webhookUrl"))), refVal_setWebhookUrl ); - setWebhookUrl(refVal_setWebhookUrl); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("update")))) - { - std::shared_ptr refVal_setUpdate; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("update"))), refVal_setUpdate ); - setUpdate(refVal_setUpdate); - } - return ok; -} - -utility::string_t SetSettings_200_response::getWebhookUrl() const -{ - return m_WebhookUrl; -} - -void SetSettings_200_response::setWebhookUrl(const utility::string_t& value) -{ - m_WebhookUrl = value; - m_WebhookUrlIsSet = true; -} - -bool SetSettings_200_response::webhookUrlIsSet() const -{ - return m_WebhookUrlIsSet; -} - -void SetSettings_200_response::unsetWebhookUrl() -{ - m_WebhookUrlIsSet = false; -} -std::shared_ptr SetSettings_200_response::getUpdate() const -{ - return m_Update; -} - -void SetSettings_200_response::setUpdate(const std::shared_ptr& value) -{ - m_Update = value; - m_UpdateIsSet = true; -} - -bool SetSettings_200_response::updateIsSet() const -{ - return m_UpdateIsSet; -} - -void SetSettings_200_response::unsetUpdate() -{ - m_UpdateIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SetSettings_200_response_allOf_update.cpp b/cpp-restsdk/src/model/SetSettings_200_response_allOf_update.cpp deleted file mode 100644 index 2b2f962..0000000 --- a/cpp-restsdk/src/model/SetSettings_200_response_allOf_update.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SetSettings_200_response_allOf_update.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SetSettings_200_response_allOf_update::SetSettings_200_response_allOf_update() -{ - m_WebhookUrl = utility::conversions::to_string_t(""); - m_WebhookUrlIsSet = false; -} - -SetSettings_200_response_allOf_update::~SetSettings_200_response_allOf_update() -{ -} - -void SetSettings_200_response_allOf_update::validate() -{ - // TODO: implement validation -} - -web::json::value SetSettings_200_response_allOf_update::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_WebhookUrlIsSet) - { - val[utility::conversions::to_string_t(U("webhookUrl"))] = ModelBase::toJson(m_WebhookUrl); - } - - return val; -} - -bool SetSettings_200_response_allOf_update::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("webhookUrl")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("webhookUrl"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromJson(fieldValue, refVal_setWebhookUrl); - setWebhookUrl(refVal_setWebhookUrl); - } - } - return ok; -} - -void SetSettings_200_response_allOf_update::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_WebhookUrlIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("webhookUrl")), m_WebhookUrl)); - } -} - -bool SetSettings_200_response_allOf_update::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("webhookUrl")))) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("webhookUrl"))), refVal_setWebhookUrl ); - setWebhookUrl(refVal_setWebhookUrl); - } - return ok; -} - -utility::string_t SetSettings_200_response_allOf_update::getWebhookUrl() const -{ - return m_WebhookUrl; -} - -void SetSettings_200_response_allOf_update::setWebhookUrl(const utility::string_t& value) -{ - m_WebhookUrl = value; - m_WebhookUrlIsSet = true; -} - -bool SetSettings_200_response_allOf_update::webhookUrlIsSet() const -{ - return m_WebhookUrlIsSet; -} - -void SetSettings_200_response_allOf_update::unsetWebhookUrl() -{ - m_WebhookUrlIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/SetWebhookStatus.cpp b/cpp-restsdk/src/model/SetWebhookStatus.cpp deleted file mode 100644 index 6247be7..0000000 --- a/cpp-restsdk/src/model/SetWebhookStatus.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SetWebhookStatus.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -SetWebhookStatus::SetWebhookStatus() -{ - m_Set = false; - m_SetIsSet = false; - m_Message = utility::conversions::to_string_t(""); - m_MessageIsSet = false; -} - -SetWebhookStatus::~SetWebhookStatus() -{ -} - -void SetWebhookStatus::validate() -{ - // TODO: implement validation -} - -web::json::value SetWebhookStatus::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SetIsSet) - { - val[utility::conversions::to_string_t(U("set"))] = ModelBase::toJson(m_Set); - } - if(m_MessageIsSet) - { - val[utility::conversions::to_string_t(U("message"))] = ModelBase::toJson(m_Message); - } - - return val; -} - -bool SetWebhookStatus::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("set")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("set"))); - if(!fieldValue.is_null()) - { - bool refVal_setSet; - ok &= ModelBase::fromJson(fieldValue, refVal_setSet); - setSet(refVal_setSet); - } - } - if(val.has_field(utility::conversions::to_string_t(U("message")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("message"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessage); - setMessage(refVal_setMessage); - } - } - return ok; -} - -void SetWebhookStatus::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SetIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("set")), m_Set)); - } - if(m_MessageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("message")), m_Message)); - } -} - -bool SetWebhookStatus::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("set")))) - { - bool refVal_setSet; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("set"))), refVal_setSet ); - setSet(refVal_setSet); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("message")))) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("message"))), refVal_setMessage ); - setMessage(refVal_setMessage); - } - return ok; -} - -bool SetWebhookStatus::isSet() const -{ - return m_Set; -} - -void SetWebhookStatus::setSet(bool value) -{ - m_Set = value; - m_SetIsSet = true; -} - -bool SetWebhookStatus::setIsSet() const -{ - return m_SetIsSet; -} - -void SetWebhookStatus::unsetSet() -{ - m_SetIsSet = false; -} -utility::string_t SetWebhookStatus::getMessage() const -{ - return m_Message; -} - -void SetWebhookStatus::setMessage(const utility::string_t& value) -{ - m_Message = value; - m_MessageIsSet = true; -} - -bool SetWebhookStatus::messageIsSet() const -{ - return m_MessageIsSet; -} - -void SetWebhookStatus::unsetMessage() -{ - m_MessageIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/Settings.cpp b/cpp-restsdk/src/model/Settings.cpp deleted file mode 100644 index f0b0214..0000000 --- a/cpp-restsdk/src/model/Settings.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/Settings.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -Settings::Settings() -{ - m_WebhookUrl = utility::conversions::to_string_t(""); - m_WebhookUrlIsSet = false; -} - -Settings::~Settings() -{ -} - -void Settings::validate() -{ - // TODO: implement validation -} - -web::json::value Settings::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_WebhookUrlIsSet) - { - val[utility::conversions::to_string_t(U("webhookUrl"))] = ModelBase::toJson(m_WebhookUrl); - } - - return val; -} - -bool Settings::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("webhookUrl")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("webhookUrl"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromJson(fieldValue, refVal_setWebhookUrl); - setWebhookUrl(refVal_setWebhookUrl); - } - } - return ok; -} - -void Settings::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_WebhookUrlIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("webhookUrl")), m_WebhookUrl)); - } -} - -bool Settings::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("webhookUrl")))) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("webhookUrl"))), refVal_setWebhookUrl ); - setWebhookUrl(refVal_setWebhookUrl); - } - return ok; -} - -utility::string_t Settings::getWebhookUrl() const -{ - return m_WebhookUrl; -} - -void Settings::setWebhookUrl(const utility::string_t& value) -{ - m_WebhookUrl = value; - m_WebhookUrlIsSet = true; -} - -bool Settings::webhookUrlIsSet() const -{ - return m_WebhookUrlIsSet; -} - -void Settings::unsetWebhookUrl() -{ - m_WebhookUrlIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/TemplateCategoryProp.cpp b/cpp-restsdk/src/model/TemplateCategoryProp.cpp deleted file mode 100644 index b01b5c2..0000000 --- a/cpp-restsdk/src/model/TemplateCategoryProp.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TemplateCategoryProp.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -namespace -{ -using EnumUnderlyingType = utility::string_t; - -TemplateCategoryProp::eTemplateCategoryProp toEnum(const EnumUnderlyingType& val) -{ - if (val == utility::conversions::to_string_t(U("MARKETING"))) - return TemplateCategoryProp::eTemplateCategoryProp::TemplateCategoryProp_MARKETING; - if (val == utility::conversions::to_string_t(U("TRANSACTIONAL"))) - return TemplateCategoryProp::eTemplateCategoryProp::TemplateCategoryProp_TRANSACTIONAL; - if (val == utility::conversions::to_string_t(U("OTP"))) - return TemplateCategoryProp::eTemplateCategoryProp::TemplateCategoryProp_OTP; - return {}; -} - -EnumUnderlyingType fromEnum(TemplateCategoryProp::eTemplateCategoryProp e) -{ - switch (e) - { - case TemplateCategoryProp::eTemplateCategoryProp::TemplateCategoryProp_MARKETING: - return U("MARKETING"); - case TemplateCategoryProp::eTemplateCategoryProp::TemplateCategoryProp_TRANSACTIONAL: - return U("TRANSACTIONAL"); - case TemplateCategoryProp::eTemplateCategoryProp::TemplateCategoryProp_OTP: - return U("OTP"); - default: - break; - } - return {}; -} -} - -TemplateCategoryProp::TemplateCategoryProp() -{ -} - -TemplateCategoryProp::~TemplateCategoryProp() -{ -} - -void TemplateCategoryProp::validate() -{ - // TODO: implement validation -} - -web::json::value TemplateCategoryProp::toJson() const -{ - auto val = fromEnum(m_value); - return web::json::value(val); -} - -bool TemplateCategoryProp::fromJson(const web::json::value& val) -{ - m_value = toEnum(val.as_string()); - return true; -} - -void TemplateCategoryProp::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if (!namePrefix.empty() && namePrefix.back() != U('.')) - { - namePrefix.push_back(U('.')); - } - - auto e = fromEnum(m_value); - multipart->add(ModelBase::toHttpContent(namePrefix, e)); -} - -bool TemplateCategoryProp::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if (!namePrefix.empty() && namePrefix.back() != U('.')) - { - namePrefix.push_back(U('.')); - } - { - EnumUnderlyingType e; - ok = ModelBase::fromHttpContent(multipart->getContent(namePrefix), e); - if (ok) - { - auto v = toEnum(e); - setValue(v); - } - } - return ok; -} - -TemplateCategoryProp::eTemplateCategoryProp TemplateCategoryProp::getValue() const -{ - return m_value; -} - -void TemplateCategoryProp::setValue(TemplateCategoryProp::eTemplateCategoryProp const value) -{ - m_value = value; -} - - -} -} -} -} - - diff --git a/cpp-restsdk/src/model/TemplateComponentsProp.cpp b/cpp-restsdk/src/model/TemplateComponentsProp.cpp deleted file mode 100644 index 8d47666..0000000 --- a/cpp-restsdk/src/model/TemplateComponentsProp.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TemplateComponentsProp.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -TemplateComponentsProp::TemplateComponentsProp() -{ -} - -TemplateComponentsProp::~TemplateComponentsProp() -{ -} - -void TemplateComponentsProp::validate() -{ - // TODO: implement validation -} - -web::json::value TemplateComponentsProp::toJson() const -{ - - web::json::value val = web::json::value::object(); - - - return val; -} - -bool TemplateComponentsProp::fromJson(const web::json::value& val) -{ - bool ok = true; - - return ok; -} - -void TemplateComponentsProp::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } -} - -bool TemplateComponentsProp::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - return ok; -} - -} -} -} -} - - diff --git a/cpp-restsdk/src/model/TemplateComponentsProp_inner.cpp b/cpp-restsdk/src/model/TemplateComponentsProp_inner.cpp deleted file mode 100644 index b636dbc..0000000 --- a/cpp-restsdk/src/model/TemplateComponentsProp_inner.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TemplateComponentsProp_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -TemplateComponentsProp_inner::TemplateComponentsProp_inner() -{ - m_Type = utility::conversions::to_string_t(""); - m_TypeIsSet = false; - m_Format = utility::conversions::to_string_t(""); - m_FormatIsSet = false; - m_Text = utility::conversions::to_string_t(""); - m_TextIsSet = false; - m_ExampleIsSet = false; - m_ButtonsIsSet = false; -} - -TemplateComponentsProp_inner::~TemplateComponentsProp_inner() -{ -} - -void TemplateComponentsProp_inner::validate() -{ - // TODO: implement validation -} - -web::json::value TemplateComponentsProp_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TypeIsSet) - { - val[utility::conversions::to_string_t(U("type"))] = ModelBase::toJson(m_Type); - } - if(m_FormatIsSet) - { - val[utility::conversions::to_string_t(U("format"))] = ModelBase::toJson(m_Format); - } - if(m_TextIsSet) - { - val[utility::conversions::to_string_t(U("text"))] = ModelBase::toJson(m_Text); - } - if(m_ExampleIsSet) - { - val[utility::conversions::to_string_t(U("example"))] = ModelBase::toJson(m_Example); - } - if(m_ButtonsIsSet) - { - val[utility::conversions::to_string_t(U("buttons"))] = ModelBase::toJson(m_Buttons); - } - - return val; -} - -bool TemplateComponentsProp_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromJson(fieldValue, refVal_setType); - setType(refVal_setType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("format")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("format"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setFormat; - ok &= ModelBase::fromJson(fieldValue, refVal_setFormat); - setFormat(refVal_setFormat); - } - } - if(val.has_field(utility::conversions::to_string_t(U("text")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("text"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setText; - ok &= ModelBase::fromJson(fieldValue, refVal_setText); - setText(refVal_setText); - } - } - if(val.has_field(utility::conversions::to_string_t(U("example")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("example"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setExample; - ok &= ModelBase::fromJson(fieldValue, refVal_setExample); - setExample(refVal_setExample); - } - } - if(val.has_field(utility::conversions::to_string_t(U("buttons")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("buttons"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setButtons; - ok &= ModelBase::fromJson(fieldValue, refVal_setButtons); - setButtons(refVal_setButtons); - } - } - return ok; -} - -void TemplateComponentsProp_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TypeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type)); - } - if(m_FormatIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("format")), m_Format)); - } - if(m_TextIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("text")), m_Text)); - } - if(m_ExampleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("example")), m_Example)); - } - if(m_ButtonsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("buttons")), m_Buttons)); - } -} - -bool TemplateComponentsProp_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("type")))) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType ); - setType(refVal_setType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("format")))) - { - utility::string_t refVal_setFormat; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("format"))), refVal_setFormat ); - setFormat(refVal_setFormat); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("text")))) - { - utility::string_t refVal_setText; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("text"))), refVal_setText ); - setText(refVal_setText); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("example")))) - { - std::shared_ptr refVal_setExample; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("example"))), refVal_setExample ); - setExample(refVal_setExample); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("buttons")))) - { - std::vector> refVal_setButtons; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("buttons"))), refVal_setButtons ); - setButtons(refVal_setButtons); - } - return ok; -} - -utility::string_t TemplateComponentsProp_inner::getType() const -{ - return m_Type; -} - -void TemplateComponentsProp_inner::setType(const utility::string_t& value) -{ - m_Type = value; - m_TypeIsSet = true; -} - -bool TemplateComponentsProp_inner::typeIsSet() const -{ - return m_TypeIsSet; -} - -void TemplateComponentsProp_inner::unsetType() -{ - m_TypeIsSet = false; -} -utility::string_t TemplateComponentsProp_inner::getFormat() const -{ - return m_Format; -} - -void TemplateComponentsProp_inner::setFormat(const utility::string_t& value) -{ - m_Format = value; - m_FormatIsSet = true; -} - -bool TemplateComponentsProp_inner::formatIsSet() const -{ - return m_FormatIsSet; -} - -void TemplateComponentsProp_inner::unsetFormat() -{ - m_FormatIsSet = false; -} -utility::string_t TemplateComponentsProp_inner::getText() const -{ - return m_Text; -} - -void TemplateComponentsProp_inner::setText(const utility::string_t& value) -{ - m_Text = value; - m_TextIsSet = true; -} - -bool TemplateComponentsProp_inner::textIsSet() const -{ - return m_TextIsSet; -} - -void TemplateComponentsProp_inner::unsetText() -{ - m_TextIsSet = false; -} -std::shared_ptr TemplateComponentsProp_inner::getExample() const -{ - return m_Example; -} - -void TemplateComponentsProp_inner::setExample(const std::shared_ptr& value) -{ - m_Example = value; - m_ExampleIsSet = true; -} - -bool TemplateComponentsProp_inner::exampleIsSet() const -{ - return m_ExampleIsSet; -} - -void TemplateComponentsProp_inner::unsetExample() -{ - m_ExampleIsSet = false; -} -std::vector>& TemplateComponentsProp_inner::getButtons() -{ - return m_Buttons; -} - -void TemplateComponentsProp_inner::setButtons(const std::vector>& value) -{ - m_Buttons = value; - m_ButtonsIsSet = true; -} - -bool TemplateComponentsProp_inner::buttonsIsSet() const -{ - return m_ButtonsIsSet; -} - -void TemplateComponentsProp_inner::unsetButtons() -{ - m_ButtonsIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/TemplateComponentsProp_inner_buttons_inner.cpp b/cpp-restsdk/src/model/TemplateComponentsProp_inner_buttons_inner.cpp deleted file mode 100644 index dae7870..0000000 --- a/cpp-restsdk/src/model/TemplateComponentsProp_inner_buttons_inner.cpp +++ /dev/null @@ -1,308 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TemplateComponentsProp_inner_buttons_inner.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -TemplateComponentsProp_inner_buttons_inner::TemplateComponentsProp_inner_buttons_inner() -{ - m_Type = utility::conversions::to_string_t(""); - m_TypeIsSet = false; - m_Text = utility::conversions::to_string_t(""); - m_TextIsSet = false; - m_Url = utility::conversions::to_string_t(""); - m_UrlIsSet = false; - m_Phone_number = utility::conversions::to_string_t(""); - m_Phone_numberIsSet = false; - m_ExampleIsSet = false; -} - -TemplateComponentsProp_inner_buttons_inner::~TemplateComponentsProp_inner_buttons_inner() -{ -} - -void TemplateComponentsProp_inner_buttons_inner::validate() -{ - // TODO: implement validation -} - -web::json::value TemplateComponentsProp_inner_buttons_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TypeIsSet) - { - val[utility::conversions::to_string_t(U("type"))] = ModelBase::toJson(m_Type); - } - if(m_TextIsSet) - { - val[utility::conversions::to_string_t(U("text"))] = ModelBase::toJson(m_Text); - } - if(m_UrlIsSet) - { - val[utility::conversions::to_string_t(U("url"))] = ModelBase::toJson(m_Url); - } - if(m_Phone_numberIsSet) - { - val[utility::conversions::to_string_t(U("phone_number"))] = ModelBase::toJson(m_Phone_number); - } - if(m_ExampleIsSet) - { - val[utility::conversions::to_string_t(U("example"))] = ModelBase::toJson(m_Example); - } - - return val; -} - -bool TemplateComponentsProp_inner_buttons_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromJson(fieldValue, refVal_setType); - setType(refVal_setType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("text")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("text"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setText; - ok &= ModelBase::fromJson(fieldValue, refVal_setText); - setText(refVal_setText); - } - } - if(val.has_field(utility::conversions::to_string_t(U("url")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("url"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUrl; - ok &= ModelBase::fromJson(fieldValue, refVal_setUrl); - setUrl(refVal_setUrl); - } - } - if(val.has_field(utility::conversions::to_string_t(U("phone_number")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone_number"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPhoneNumber; - ok &= ModelBase::fromJson(fieldValue, refVal_setPhoneNumber); - setPhoneNumber(refVal_setPhoneNumber); - } - } - if(val.has_field(utility::conversions::to_string_t(U("example")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("example"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setExample; - ok &= ModelBase::fromJson(fieldValue, refVal_setExample); - setExample(refVal_setExample); - } - } - return ok; -} - -void TemplateComponentsProp_inner_buttons_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TypeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type)); - } - if(m_TextIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("text")), m_Text)); - } - if(m_UrlIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("url")), m_Url)); - } - if(m_Phone_numberIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("phone_number")), m_Phone_number)); - } - if(m_ExampleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("example")), m_Example)); - } -} - -bool TemplateComponentsProp_inner_buttons_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("type")))) - { - utility::string_t refVal_setType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType ); - setType(refVal_setType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("text")))) - { - utility::string_t refVal_setText; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("text"))), refVal_setText ); - setText(refVal_setText); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("url")))) - { - utility::string_t refVal_setUrl; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("url"))), refVal_setUrl ); - setUrl(refVal_setUrl); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("phone_number")))) - { - utility::string_t refVal_setPhoneNumber; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone_number"))), refVal_setPhoneNumber ); - setPhoneNumber(refVal_setPhoneNumber); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("example")))) - { - std::vector> refVal_setExample; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("example"))), refVal_setExample ); - setExample(refVal_setExample); - } - return ok; -} - -utility::string_t TemplateComponentsProp_inner_buttons_inner::getType() const -{ - return m_Type; -} - -void TemplateComponentsProp_inner_buttons_inner::setType(const utility::string_t& value) -{ - m_Type = value; - m_TypeIsSet = true; -} - -bool TemplateComponentsProp_inner_buttons_inner::typeIsSet() const -{ - return m_TypeIsSet; -} - -void TemplateComponentsProp_inner_buttons_inner::unsetType() -{ - m_TypeIsSet = false; -} -utility::string_t TemplateComponentsProp_inner_buttons_inner::getText() const -{ - return m_Text; -} - -void TemplateComponentsProp_inner_buttons_inner::setText(const utility::string_t& value) -{ - m_Text = value; - m_TextIsSet = true; -} - -bool TemplateComponentsProp_inner_buttons_inner::textIsSet() const -{ - return m_TextIsSet; -} - -void TemplateComponentsProp_inner_buttons_inner::unsetText() -{ - m_TextIsSet = false; -} -utility::string_t TemplateComponentsProp_inner_buttons_inner::getUrl() const -{ - return m_Url; -} - -void TemplateComponentsProp_inner_buttons_inner::setUrl(const utility::string_t& value) -{ - m_Url = value; - m_UrlIsSet = true; -} - -bool TemplateComponentsProp_inner_buttons_inner::urlIsSet() const -{ - return m_UrlIsSet; -} - -void TemplateComponentsProp_inner_buttons_inner::unsetUrl() -{ - m_UrlIsSet = false; -} -utility::string_t TemplateComponentsProp_inner_buttons_inner::getPhoneNumber() const -{ - return m_Phone_number; -} - -void TemplateComponentsProp_inner_buttons_inner::setPhoneNumber(const utility::string_t& value) -{ - m_Phone_number = value; - m_Phone_numberIsSet = true; -} - -bool TemplateComponentsProp_inner_buttons_inner::phoneNumberIsSet() const -{ - return m_Phone_numberIsSet; -} - -void TemplateComponentsProp_inner_buttons_inner::unsetPhone_number() -{ - m_Phone_numberIsSet = false; -} -std::vector>& TemplateComponentsProp_inner_buttons_inner::getExample() -{ - return m_Example; -} - -void TemplateComponentsProp_inner_buttons_inner::setExample(const std::vector>& value) -{ - m_Example = value; - m_ExampleIsSet = true; -} - -bool TemplateComponentsProp_inner_buttons_inner::exampleIsSet() const -{ - return m_ExampleIsSet; -} - -void TemplateComponentsProp_inner_buttons_inner::unsetExample() -{ - m_ExampleIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/TemplateLanguageProp.cpp b/cpp-restsdk/src/model/TemplateLanguageProp.cpp deleted file mode 100644 index 17f6ddf..0000000 --- a/cpp-restsdk/src/model/TemplateLanguageProp.cpp +++ /dev/null @@ -1,376 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TemplateLanguageProp.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - -namespace -{ -using EnumUnderlyingType = utility::string_t; - -TemplateLanguageProp::eTemplateLanguageProp toEnum(const EnumUnderlyingType& val) -{ - if (val == utility::conversions::to_string_t(U("af"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_AF; - if (val == utility::conversions::to_string_t(U("sq"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SQ; - if (val == utility::conversions::to_string_t(U("ar"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_AR; - if (val == utility::conversions::to_string_t(U("az"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_AZ; - if (val == utility::conversions::to_string_t(U("bn"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_BN; - if (val == utility::conversions::to_string_t(U("bg"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_BG; - if (val == utility::conversions::to_string_t(U("ca"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_CA; - if (val == utility::conversions::to_string_t(U("zh_CN"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ZH_CN; - if (val == utility::conversions::to_string_t(U("zh_HK"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ZH_HK; - if (val == utility::conversions::to_string_t(U("zh_TW"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ZH_TW; - if (val == utility::conversions::to_string_t(U("hr"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HR; - if (val == utility::conversions::to_string_t(U("cs"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_CS; - if (val == utility::conversions::to_string_t(U("da"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_DA; - if (val == utility::conversions::to_string_t(U("nl"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_NL; - if (val == utility::conversions::to_string_t(U("en"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EN; - if (val == utility::conversions::to_string_t(U("en_GB"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EN_GB; - if (val == utility::conversions::to_string_t(U("en_US"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EN_US; - if (val == utility::conversions::to_string_t(U("et"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ET; - if (val == utility::conversions::to_string_t(U("fil"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FIL; - if (val == utility::conversions::to_string_t(U("fi"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FI; - if (val == utility::conversions::to_string_t(U("fr"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FR; - if (val == utility::conversions::to_string_t(U("de"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_DE; - if (val == utility::conversions::to_string_t(U("el"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EL; - if (val == utility::conversions::to_string_t(U("gu"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_GU; - if (val == utility::conversions::to_string_t(U("he"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HE; - if (val == utility::conversions::to_string_t(U("hi"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HI; - if (val == utility::conversions::to_string_t(U("hu"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HU; - if (val == utility::conversions::to_string_t(U("id"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ID; - if (val == utility::conversions::to_string_t(U("ga"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_GA; - if (val == utility::conversions::to_string_t(U("it"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_IT; - if (val == utility::conversions::to_string_t(U("ja"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_JA; - if (val == utility::conversions::to_string_t(U("kn"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_KN; - if (val == utility::conversions::to_string_t(U("kk"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_KK; - if (val == utility::conversions::to_string_t(U("ko"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_KO; - if (val == utility::conversions::to_string_t(U("lo"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_LO; - if (val == utility::conversions::to_string_t(U("lv"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_LV; - if (val == utility::conversions::to_string_t(U("lt"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_LT; - if (val == utility::conversions::to_string_t(U("mk"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_MK; - if (val == utility::conversions::to_string_t(U("ms"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_MS; - if (val == utility::conversions::to_string_t(U("mr"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_MR; - if (val == utility::conversions::to_string_t(U("nb"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_NB; - if (val == utility::conversions::to_string_t(U("fa"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FA; - if (val == utility::conversions::to_string_t(U("pl"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PL; - if (val == utility::conversions::to_string_t(U("pt_BR"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PT_BR; - if (val == utility::conversions::to_string_t(U("pt_PT"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PT_PT; - if (val == utility::conversions::to_string_t(U("pa"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PA; - if (val == utility::conversions::to_string_t(U("ro"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_RO; - if (val == utility::conversions::to_string_t(U("ru"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_RU; - if (val == utility::conversions::to_string_t(U("sr"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SR; - if (val == utility::conversions::to_string_t(U("sk"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SK; - if (val == utility::conversions::to_string_t(U("sl"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SL; - if (val == utility::conversions::to_string_t(U("es"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES; - if (val == utility::conversions::to_string_t(U("es_AR"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES_AR; - if (val == utility::conversions::to_string_t(U("es_ES"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES_ES; - if (val == utility::conversions::to_string_t(U("es_MX"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES_MX; - if (val == utility::conversions::to_string_t(U("sw"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SW; - if (val == utility::conversions::to_string_t(U("sv"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SV; - if (val == utility::conversions::to_string_t(U("ta"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TA; - if (val == utility::conversions::to_string_t(U("te"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TE; - if (val == utility::conversions::to_string_t(U("th"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TH; - if (val == utility::conversions::to_string_t(U("tr"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TR; - if (val == utility::conversions::to_string_t(U("uk"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_UK; - if (val == utility::conversions::to_string_t(U("ur"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_UR; - if (val == utility::conversions::to_string_t(U("uz"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_UZ; - if (val == utility::conversions::to_string_t(U("vi"))) - return TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_VI; - return {}; -} - -EnumUnderlyingType fromEnum(TemplateLanguageProp::eTemplateLanguageProp e) -{ - switch (e) - { - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_AF: - return U("af"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SQ: - return U("sq"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_AR: - return U("ar"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_AZ: - return U("az"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_BN: - return U("bn"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_BG: - return U("bg"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_CA: - return U("ca"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ZH_CN: - return U("zh_CN"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ZH_HK: - return U("zh_HK"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ZH_TW: - return U("zh_TW"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HR: - return U("hr"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_CS: - return U("cs"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_DA: - return U("da"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_NL: - return U("nl"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EN: - return U("en"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EN_GB: - return U("en_GB"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EN_US: - return U("en_US"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ET: - return U("et"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FIL: - return U("fil"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FI: - return U("fi"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FR: - return U("fr"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_DE: - return U("de"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_EL: - return U("el"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_GU: - return U("gu"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HE: - return U("he"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HI: - return U("hi"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_HU: - return U("hu"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ID: - return U("id"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_GA: - return U("ga"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_IT: - return U("it"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_JA: - return U("ja"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_KN: - return U("kn"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_KK: - return U("kk"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_KO: - return U("ko"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_LO: - return U("lo"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_LV: - return U("lv"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_LT: - return U("lt"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_MK: - return U("mk"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_MS: - return U("ms"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_MR: - return U("mr"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_NB: - return U("nb"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_FA: - return U("fa"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PL: - return U("pl"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PT_BR: - return U("pt_BR"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PT_PT: - return U("pt_PT"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_PA: - return U("pa"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_RO: - return U("ro"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_RU: - return U("ru"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SR: - return U("sr"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SK: - return U("sk"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SL: - return U("sl"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES: - return U("es"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES_AR: - return U("es_AR"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES_ES: - return U("es_ES"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_ES_MX: - return U("es_MX"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SW: - return U("sw"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_SV: - return U("sv"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TA: - return U("ta"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TE: - return U("te"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TH: - return U("th"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_TR: - return U("tr"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_UK: - return U("uk"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_UR: - return U("ur"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_UZ: - return U("uz"); - case TemplateLanguageProp::eTemplateLanguageProp::TemplateLanguageProp_VI: - return U("vi"); - default: - break; - } - return {}; -} -} - -TemplateLanguageProp::TemplateLanguageProp() -{ -} - -TemplateLanguageProp::~TemplateLanguageProp() -{ -} - -void TemplateLanguageProp::validate() -{ - // TODO: implement validation -} - -web::json::value TemplateLanguageProp::toJson() const -{ - auto val = fromEnum(m_value); - return web::json::value(val); -} - -bool TemplateLanguageProp::fromJson(const web::json::value& val) -{ - m_value = toEnum(val.as_string()); - return true; -} - -void TemplateLanguageProp::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if (!namePrefix.empty() && namePrefix.back() != U('.')) - { - namePrefix.push_back(U('.')); - } - - auto e = fromEnum(m_value); - multipart->add(ModelBase::toHttpContent(namePrefix, e)); -} - -bool TemplateLanguageProp::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if (!namePrefix.empty() && namePrefix.back() != U('.')) - { - namePrefix.push_back(U('.')); - } - { - EnumUnderlyingType e; - ok = ModelBase::fromHttpContent(multipart->getContent(namePrefix), e); - if (ok) - { - auto v = toEnum(e); - setValue(v); - } - } - return ok; -} - -TemplateLanguageProp::eTemplateLanguageProp TemplateLanguageProp::getValue() const -{ - return m_value; -} - -void TemplateLanguageProp::setValue(TemplateLanguageProp::eTemplateLanguageProp const value) -{ - m_value = value; -} - - -} -} -} -} - - diff --git a/cpp-restsdk/src/model/TemplateNamespaceField.cpp b/cpp-restsdk/src/model/TemplateNamespaceField.cpp deleted file mode 100644 index 1b26a72..0000000 --- a/cpp-restsdk/src/model/TemplateNamespaceField.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TemplateNamespaceField.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -TemplateNamespaceField::TemplateNamespaceField() -{ - m_r_namespace = utility::conversions::to_string_t(""); - m_r_namespaceIsSet = false; -} - -TemplateNamespaceField::~TemplateNamespaceField() -{ -} - -void TemplateNamespaceField::validate() -{ - // TODO: implement validation -} - -web::json::value TemplateNamespaceField::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_r_namespaceIsSet) - { - val[utility::conversions::to_string_t(U("namespace"))] = ModelBase::toJson(m_r_namespace); - } - - return val; -} - -bool TemplateNamespaceField::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("namespace")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("namespace"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRNamespace; - ok &= ModelBase::fromJson(fieldValue, refVal_setRNamespace); - setRNamespace(refVal_setRNamespace); - } - } - return ok; -} - -void TemplateNamespaceField::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_r_namespaceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("namespace")), m_r_namespace)); - } -} - -bool TemplateNamespaceField::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("namespace")))) - { - utility::string_t refVal_setRNamespace; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("namespace"))), refVal_setRNamespace ); - setRNamespace(refVal_setRNamespace); - } - return ok; -} - -utility::string_t TemplateNamespaceField::getRNamespace() const -{ - return m_r_namespace; -} - -void TemplateNamespaceField::setRNamespace(const utility::string_t& value) -{ - m_r_namespace = value; - m_r_namespaceIsSet = true; -} - -bool TemplateNamespaceField::rNamespaceIsSet() const -{ - return m_r_namespaceIsSet; -} - -void TemplateNamespaceField::unsetr_namespace() -{ - m_r_namespaceIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/UploadMedia.cpp b/cpp-restsdk/src/model/UploadMedia.cpp deleted file mode 100644 index 38921cf..0000000 --- a/cpp-restsdk/src/model/UploadMedia.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/UploadMedia.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -UploadMedia::UploadMedia() -{ - m_Body = utility::conversions::to_string_t(""); - m_BodyIsSet = false; -} - -UploadMedia::~UploadMedia() -{ -} - -void UploadMedia::validate() -{ - // TODO: implement validation -} - -web::json::value UploadMedia::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_BodyIsSet) - { - val[utility::conversions::to_string_t(U("body"))] = ModelBase::toJson(m_Body); - } - - return val; -} - -bool UploadMedia::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("body")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("body"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromJson(fieldValue, refVal_setBody); - setBody(refVal_setBody); - } - } - return ok; -} - -void UploadMedia::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_BodyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("body")), m_Body)); - } -} - -bool UploadMedia::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("body")))) - { - utility::string_t refVal_setBody; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("body"))), refVal_setBody ); - setBody(refVal_setBody); - } - return ok; -} - -utility::string_t UploadMedia::getBody() const -{ - return m_Body; -} - -void UploadMedia::setBody(const utility::string_t& value) -{ - m_Body = value; - m_BodyIsSet = true; -} - -bool UploadMedia::bodyIsSet() const -{ - return m_BodyIsSet; -} - -void UploadMedia::unsetBody() -{ - m_BodyIsSet = false; -} -} -} -} -} - - diff --git a/cpp-restsdk/src/model/WebhookUrl.cpp b/cpp-restsdk/src/model/WebhookUrl.cpp deleted file mode 100644 index cc8c1b0..0000000 --- a/cpp-restsdk/src/model/WebhookUrl.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/WebhookUrl.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -WebhookUrl::WebhookUrl() -{ - m_WebhookUrl = utility::conversions::to_string_t(""); - m_WebhookUrlIsSet = false; -} - -WebhookUrl::~WebhookUrl() -{ -} - -void WebhookUrl::validate() -{ - // TODO: implement validation -} - -web::json::value WebhookUrl::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_WebhookUrlIsSet) - { - val[utility::conversions::to_string_t(U("webhookUrl"))] = ModelBase::toJson(m_WebhookUrl); - } - - return val; -} - -bool WebhookUrl::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("webhookUrl")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("webhookUrl"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromJson(fieldValue, refVal_setWebhookUrl); - setWebhookUrl(refVal_setWebhookUrl); - } - } - return ok; -} - -void WebhookUrl::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_WebhookUrlIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("webhookUrl")), m_WebhookUrl)); - } -} - -bool WebhookUrl::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("webhookUrl")))) - { - utility::string_t refVal_setWebhookUrl; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("webhookUrl"))), refVal_setWebhookUrl ); - setWebhookUrl(refVal_setWebhookUrl); - } - return ok; -} - -utility::string_t WebhookUrl::getWebhookUrl() const -{ - return m_WebhookUrl; -} - -void WebhookUrl::setWebhookUrl(const utility::string_t& value) -{ - m_WebhookUrl = value; - m_WebhookUrlIsSet = true; -} - -bool WebhookUrl::webhookUrlIsSet() const -{ - return m_WebhookUrlIsSet; -} - -void WebhookUrl::unsetWebhookUrl() -{ - m_WebhookUrlIsSet = false; -} -} -} -} -} - - diff --git a/csharp/.gitignore b/csharp/.gitignore deleted file mode 100644 index 1ee5385..0000000 --- a/csharp/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/csharp/.openapi-generator-ignore b/csharp/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/csharp/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/csharp/.openapi-generator/FILES b/csharp/.openapi-generator/FILES deleted file mode 100644 index df52ee4..0000000 --- a/csharp/.openapi-generator/FILES +++ /dev/null @@ -1,165 +0,0 @@ -.gitignore -OneMessage.io.sln -README.md -api/openapi.yaml -appveyor.yml -docs/Ack.md -docs/AddTemplateRequest.md -docs/ChannelApi.md -docs/ChannelExtendedStatistics.md -docs/ChannelExtendedStatisticsInner.md -docs/ChannelStatistics.md -docs/ChannelStatus.md -docs/ChatIdProp.md -docs/Commerce.md -docs/CommerceParams.md -docs/Contacts.md -docs/ContactsContactsInner.md -docs/ContactsRequest.md -docs/GetAckInfo.md -docs/GetAckInfoHooksInner.md -docs/GetCommerce.md -docs/GetCommerceInner.md -docs/GetIP.md -docs/GetMe.md -docs/GetMe401Response.md -docs/GetMessages.md -docs/GetMessagesMessagesInner.md -docs/GetTemplates.md -docs/GetTemplatesTemplatesInner.md -docs/MeComponents.md -docs/MediaApi.md -docs/MediaId.md -docs/Message.md -docs/MessageIdProp.md -docs/MessagingApi.md -docs/PhoneProp.md -docs/ProductsCatalogsApi.md -docs/ReadMessageRequest.md -docs/RemoveTemplateRequest.md -docs/SendContactRequest.md -docs/SendFileRequest.md -docs/SendListRequest.md -docs/SendListRequestAllOfRows.md -docs/SendListRequestAllOfSections.md -docs/SendLocationRequest.md -docs/SendMessageRequest.md -docs/SendMessageStatus.md -docs/SendProductRequest.md -docs/SendProductRequestAllOfAction.md -docs/SendProductRequestAllOfActionProductItems.md -docs/SendProductRequestAllOfActionSections.md -docs/SendTemplateRequest.md -docs/SendTemplateRequestAllOfCurrency.md -docs/SendTemplateRequestAllOfDateTime.md -docs/SendTemplateRequestAllOfDateTimeComponent.md -docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md -docs/SendTemplateRequestAllOfLanguage.md -docs/SendTemplateRequestAllOfParams.md -docs/SetCommerce.md -docs/SetMe.md -docs/SetMeRequest.md -docs/SetSettings200Response.md -docs/SetSettings200ResponseAllOfUpdate.md -docs/SetWebhookStatus.md -docs/Settings.md -docs/TemplateCategoryProp.md -docs/TemplateComponentsProp.md -docs/TemplateComponentsPropInner.md -docs/TemplateComponentsPropInnerButtonsInner.md -docs/TemplateLanguageProp.md -docs/TemplateNamespaceField.md -docs/TemplatesApi.md -docs/UploadMedia.md -docs/WebhookUrl.md -docs/WebhooksApi.md -git_push.sh -src/OneMessage.io.Test/OneMessage.io.Test.csproj -src/OneMessage.io/Api/ChannelApi.cs -src/OneMessage.io/Api/MediaApi.cs -src/OneMessage.io/Api/MessagingApi.cs -src/OneMessage.io/Api/ProductsCatalogsApi.cs -src/OneMessage.io/Api/TemplatesApi.cs -src/OneMessage.io/Api/WebhooksApi.cs -src/OneMessage.io/Client/ApiClient.cs -src/OneMessage.io/Client/ApiException.cs -src/OneMessage.io/Client/ApiResponse.cs -src/OneMessage.io/Client/ClientUtils.cs -src/OneMessage.io/Client/Configuration.cs -src/OneMessage.io/Client/ExceptionFactory.cs -src/OneMessage.io/Client/GlobalConfiguration.cs -src/OneMessage.io/Client/HttpMethod.cs -src/OneMessage.io/Client/IApiAccessor.cs -src/OneMessage.io/Client/IAsynchronousClient.cs -src/OneMessage.io/Client/IReadableConfiguration.cs -src/OneMessage.io/Client/ISynchronousClient.cs -src/OneMessage.io/Client/Multimap.cs -src/OneMessage.io/Client/OpenAPIDateConverter.cs -src/OneMessage.io/Client/RequestOptions.cs -src/OneMessage.io/Client/RetryConfiguration.cs -src/OneMessage.io/Model/AbstractOpenAPISchema.cs -src/OneMessage.io/Model/Ack.cs -src/OneMessage.io/Model/AddTemplateRequest.cs -src/OneMessage.io/Model/ChannelExtendedStatistics.cs -src/OneMessage.io/Model/ChannelExtendedStatisticsInner.cs -src/OneMessage.io/Model/ChannelStatistics.cs -src/OneMessage.io/Model/ChannelStatus.cs -src/OneMessage.io/Model/ChatIdProp.cs -src/OneMessage.io/Model/Commerce.cs -src/OneMessage.io/Model/CommerceParams.cs -src/OneMessage.io/Model/Contacts.cs -src/OneMessage.io/Model/ContactsContactsInner.cs -src/OneMessage.io/Model/ContactsRequest.cs -src/OneMessage.io/Model/GetAckInfo.cs -src/OneMessage.io/Model/GetAckInfoHooksInner.cs -src/OneMessage.io/Model/GetCommerce.cs -src/OneMessage.io/Model/GetCommerceInner.cs -src/OneMessage.io/Model/GetIP.cs -src/OneMessage.io/Model/GetMe.cs -src/OneMessage.io/Model/GetMe401Response.cs -src/OneMessage.io/Model/GetMessages.cs -src/OneMessage.io/Model/GetMessagesMessagesInner.cs -src/OneMessage.io/Model/GetTemplates.cs -src/OneMessage.io/Model/GetTemplatesTemplatesInner.cs -src/OneMessage.io/Model/MeComponents.cs -src/OneMessage.io/Model/MediaId.cs -src/OneMessage.io/Model/Message.cs -src/OneMessage.io/Model/MessageIdProp.cs -src/OneMessage.io/Model/PhoneProp.cs -src/OneMessage.io/Model/ReadMessageRequest.cs -src/OneMessage.io/Model/RemoveTemplateRequest.cs -src/OneMessage.io/Model/SendContactRequest.cs -src/OneMessage.io/Model/SendFileRequest.cs -src/OneMessage.io/Model/SendListRequest.cs -src/OneMessage.io/Model/SendListRequestAllOfRows.cs -src/OneMessage.io/Model/SendListRequestAllOfSections.cs -src/OneMessage.io/Model/SendLocationRequest.cs -src/OneMessage.io/Model/SendMessageRequest.cs -src/OneMessage.io/Model/SendMessageStatus.cs -src/OneMessage.io/Model/SendProductRequest.cs -src/OneMessage.io/Model/SendProductRequestAllOfAction.cs -src/OneMessage.io/Model/SendProductRequestAllOfActionProductItems.cs -src/OneMessage.io/Model/SendProductRequestAllOfActionSections.cs -src/OneMessage.io/Model/SendTemplateRequest.cs -src/OneMessage.io/Model/SendTemplateRequestAllOfCurrency.cs -src/OneMessage.io/Model/SendTemplateRequestAllOfDateTime.cs -src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeComponent.cs -src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeUnixEpoch.cs -src/OneMessage.io/Model/SendTemplateRequestAllOfLanguage.cs -src/OneMessage.io/Model/SendTemplateRequestAllOfParams.cs -src/OneMessage.io/Model/SetCommerce.cs -src/OneMessage.io/Model/SetMe.cs -src/OneMessage.io/Model/SetMeRequest.cs -src/OneMessage.io/Model/SetSettings200Response.cs -src/OneMessage.io/Model/SetSettings200ResponseAllOfUpdate.cs -src/OneMessage.io/Model/SetWebhookStatus.cs -src/OneMessage.io/Model/Settings.cs -src/OneMessage.io/Model/TemplateCategoryProp.cs -src/OneMessage.io/Model/TemplateComponentsProp.cs -src/OneMessage.io/Model/TemplateComponentsPropInner.cs -src/OneMessage.io/Model/TemplateComponentsPropInnerButtonsInner.cs -src/OneMessage.io/Model/TemplateLanguageProp.cs -src/OneMessage.io/Model/TemplateNamespaceField.cs -src/OneMessage.io/Model/UploadMedia.cs -src/OneMessage.io/Model/WebhookUrl.cs -src/OneMessage.io/OneMessage.io.csproj diff --git a/csharp/.openapi-generator/VERSION b/csharp/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/csharp/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/csharp/OneMessage.io.sln b/csharp/OneMessage.io.sln deleted file mode 100644 index 66c4a9c..0000000 --- a/csharp/OneMessage.io.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneMessage.io", "src\OneMessage.io\OneMessage.io.csproj", "{433CE7FB-F511-46E6-87B7-C6C8E33C5EB8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneMessage.io.Test", "src\OneMessage.io.Test\OneMessage.io.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {433CE7FB-F511-46E6-87B7-C6C8E33C5EB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {433CE7FB-F511-46E6-87B7-C6C8E33C5EB8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {433CE7FB-F511-46E6-87B7-C6C8E33C5EB8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {433CE7FB-F511-46E6-87B7-C6C8E33C5EB8}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/csharp/README.md b/csharp/README.md deleted file mode 100644 index 20baf73..0000000 --- a/csharp/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# OneMessage.io - the C# library for the one_msg_waba_sdk - -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 2.39.0 -- SDK version: 1.0.3 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported -.NET 7.0 .NET Framework 4.8 - -## Dependencies - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later - -## Installation -Please refer to the latest nuget installation description at the top of a page [NuGet link](https://www.nuget.org/packages/OneMessage.io) - - -## Usage - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.ApiKey.Add("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.ApiKeyPrefix.Add("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // GetMe - GetMe result = apiInstance.GetMe(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetMe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` -```csharp -Configuration c = new Configuration(); -System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/"); -webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; -c.Proxy = webProxy; -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ChannelApi* | [**GetCommerce**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getcommerce) | **GET** /commerce | Get Commerce Settings -*ChannelApi* | [**GetExtendedStatistics**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getextendedstatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -*ChannelApi* | [**GetMe**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getme) | **GET** /me | Get Profile Info -*ChannelApi* | [**GetSettings**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getsettings) | **GET** /settings | Get Settings -*ChannelApi* | [**GetStatistics**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getstatistics) | **GET** /statistics | Get Channel statistics -*ChannelApi* | [**GetStatus**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getstatus) | **GET** /status | Get Status -*ChannelApi* | [**OutputIP**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#outputip) | **GET** /outputIP | Get channel server IP -*ChannelApi* | [**SetMe**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#setme) | **POST** /me | Change user info -*ChannelApi* | [**SetSettings**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#setsettings) | **POST** /settings | Set settings -*MediaApi* | [**UploadMedia**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MediaApi.md#uploadmedia) | **POST** /uploadMedia | Upload media & get mediaId -*MessagingApi* | [**MessagesList**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#messageslist) | **GET** /messages | Get messages list -*MessagingApi* | [**ReadMessage**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#readmessage) | **POST** /readMessage | Mark message as read -*MessagingApi* | [**SendContact**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendcontact) | **POST** /sendContact | Send a Contact -*MessagingApi* | [**SendFile**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendfile) | **POST** /sendFile | Send a File -*MessagingApi* | [**SendList**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendlist) | **POST** /sendList | Send List Message -*MessagingApi* | [**SendLocation**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendlocation) | **POST** /sendLocation | Send a Location -*MessagingApi* | [**SendMessage**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendmessage) | **POST** /sendMessage | Send a Message -*ProductsCatalogsApi* | [**SendProduct**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ProductsCatalogsApi.md#sendproduct) | **POST** /sendProduct | Send a Product -*ProductsCatalogsApi* | [**SetCommerce**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ProductsCatalogsApi.md#setcommerce) | **POST** /commerce | Set Commerce Settings -*TemplatesApi* | [**AddTemplate**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#addtemplate) | **POST** /addTemplate | Create template -*TemplatesApi* | [**RemoveTemplate**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#removetemplate) | **POST** /removeTemplate | Remove template -*TemplatesApi* | [**SendTemplate**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#sendtemplate) | **POST** /sendTemplate | Send Template Message -*TemplatesApi* | [**TemplatesList**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#templateslist) | **GET** /templates | Get templates list -*WebhooksApi* | [**AckHookInfo**](https://github.com/1msg/1sdk/tree/main/csharp/docs/WebhooksApi.md#ackhookinfo) | **GET** /hookInfo | Check ACKs -*WebhooksApi* | [**SetWebhook**](https://github.com/1msg/1sdk/tree/main/csharp/docs/WebhooksApi.md#setwebhook) | **POST** /webhook | Set webhook - - - -## Documentation for Models - - - [Model.Ack](https://github.com/1msg/1sdk/tree/main/csharp/docs/Ack.md) - - [Model.AddTemplateRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/AddTemplateRequest.md) - - [Model.ChannelExtendedStatistics](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelExtendedStatistics.md) - - [Model.ChannelExtendedStatisticsInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelExtendedStatisticsInner.md) - - [Model.ChannelStatistics](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelStatistics.md) - - [Model.ChannelStatus](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelStatus.md) - - [Model.ChatIdProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChatIdProp.md) - - [Model.Commerce](https://github.com/1msg/1sdk/tree/main/csharp/docs/Commerce.md) - - [Model.CommerceParams](https://github.com/1msg/1sdk/tree/main/csharp/docs/CommerceParams.md) - - [Model.Contacts](https://github.com/1msg/1sdk/tree/main/csharp/docs/Contacts.md) - - [Model.ContactsContactsInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/ContactsContactsInner.md) - - [Model.ContactsRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/ContactsRequest.md) - - [Model.GetAckInfo](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetAckInfo.md) - - [Model.GetAckInfoHooksInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetAckInfoHooksInner.md) - - [Model.GetCommerce](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetCommerce.md) - - [Model.GetCommerceInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetCommerceInner.md) - - [Model.GetIP](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetIP.md) - - [Model.GetMe](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMe.md) - - [Model.GetMe401Response](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMe401Response.md) - - [Model.GetMessages](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMessages.md) - - [Model.GetMessagesMessagesInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMessagesMessagesInner.md) - - [Model.GetTemplates](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetTemplates.md) - - [Model.GetTemplatesTemplatesInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetTemplatesTemplatesInner.md) - - [Model.MeComponents](https://github.com/1msg/1sdk/tree/main/csharp/docs/MeComponents.md) - - [Model.MediaId](https://github.com/1msg/1sdk/tree/main/csharp/docs/MediaId.md) - - [Model.Message](https://github.com/1msg/1sdk/tree/main/csharp/docs/Message.md) - - [Model.MessageIdProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessageIdProp.md) - - [Model.PhoneProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/PhoneProp.md) - - [Model.ReadMessageRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/ReadMessageRequest.md) - - [Model.RemoveTemplateRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/RemoveTemplateRequest.md) - - [Model.SendContactRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendContactRequest.md) - - [Model.SendFileRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendFileRequest.md) - - [Model.SendListRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendListRequest.md) - - [Model.SendListRequestAllOfRows](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendListRequestAllOfRows.md) - - [Model.SendListRequestAllOfSections](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendListRequestAllOfSections.md) - - [Model.SendLocationRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendLocationRequest.md) - - [Model.SendMessageRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendMessageRequest.md) - - [Model.SendMessageStatus](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendMessageStatus.md) - - [Model.SendProductRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequest.md) - - [Model.SendProductRequestAllOfAction](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequestAllOfAction.md) - - [Model.SendProductRequestAllOfActionProductItems](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequestAllOfActionProductItems.md) - - [Model.SendProductRequestAllOfActionSections](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequestAllOfActionSections.md) - - [Model.SendTemplateRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequest.md) - - [Model.SendTemplateRequestAllOfCurrency](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfCurrency.md) - - [Model.SendTemplateRequestAllOfDateTime](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfDateTime.md) - - [Model.SendTemplateRequestAllOfDateTimeComponent](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfDateTimeComponent.md) - - [Model.SendTemplateRequestAllOfDateTimeUnixEpoch](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md) - - [Model.SendTemplateRequestAllOfLanguage](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfLanguage.md) - - [Model.SendTemplateRequestAllOfParams](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfParams.md) - - [Model.SetCommerce](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetCommerce.md) - - [Model.SetMe](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetMe.md) - - [Model.SetMeRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetMeRequest.md) - - [Model.SetSettings200Response](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetSettings200Response.md) - - [Model.SetSettings200ResponseAllOfUpdate](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetSettings200ResponseAllOfUpdate.md) - - [Model.SetWebhookStatus](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetWebhookStatus.md) - - [Model.Settings](https://github.com/1msg/1sdk/tree/main/csharp/docs/Settings.md) - - [Model.TemplateCategoryProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateCategoryProp.md) - - [Model.TemplateComponentsProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateComponentsProp.md) - - [Model.TemplateComponentsPropInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateComponentsPropInner.md) - - [Model.TemplateComponentsPropInnerButtonsInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateComponentsPropInnerButtonsInner.md) - - [Model.TemplateLanguageProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateLanguageProp.md) - - [Model.TemplateNamespaceField](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateNamespaceField.md) - - [Model.UploadMedia](https://github.com/1msg/1sdk/tree/main/csharp/docs/UploadMedia.md) - - [Model.WebhookUrl](https://github.com/1msg/1sdk/tree/main/csharp/docs/WebhookUrl.md) - - -## Documentation for Authorization - - -Authentication schemes defined for the API: -### token - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - diff --git a/csharp/api/openapi.yaml b/csharp/api/openapi.yaml deleted file mode 100644 index 8e11068..0000000 --- a/csharp/api/openapi.yaml +++ /dev/null @@ -1,2474 +0,0 @@ -openapi: 3.0.0 -info: - contact: - email: hello@1msg.io - description: "[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool\ - \ for your business. With us you get full access to the official Whatsapp API/webhooks.\n\ - \nEvery API request must contain an Authorize HTTP header with a token. \nThis\ - \ is your channel token, which can be found in your channel project on your profile\ - \ page.\nPlease do not give the token to anyone or post it publicly.\n\nThe authorization\ - \ token must be added to each request in the GET parameter 'token' and always\ - \ passed to query string (?token={your_token}).\nParameters in GET queries pass\ - \ query string. Parameters in POST requests — through the JSON-encoded request\ - \ body. \n\nAll 'send' methods (except /sendTemplate) will only work when the\ - \ dialog session with the user is open. Some of our solutions simplify and avoid\ - \ such limitations, but we urge you to pay more attention to this detail" - title: one_msg_waba_sdk - version: 2.39.0 -servers: -- description: New common server url - url: "{protocol}://api.1msg.io/{channelId}" - variables: - channelId: - default: YOUR_INSTANCE_NUMBER - description: Your channel number - protocol: - default: https - enum: - - http - - https -tags: -- description: Manage your WhatsApp Business API channel - name: Channel -- description: How to setup webhooks for the WhatsApp Business API - name: Webhooks -- description: This part of the documentation describes how to send and receive messages - using the WhatsApp Business API - name: Messaging -- description: Template messaging via WhatsApp Business API - name: Templates -- description: How to build and send messages with single and multiple products - name: Products & Catalogs -- description: "Use the media node to upload, retrieve, or delete media" - name: Media -paths: - /me: - get: - description: Use this edge to retrieve your profile's About info - operationId: getMe - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetMe' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get Profile Info - tags: - - Channel - post: - description: Change user info - operationId: setMe - requestBody: - $ref: '#/components/requestBodies/SetMe' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Change user info - tags: - - Channel - /statistics: - get: - description: Get channel usage statistics - operationId: getStatistics - parameters: - - description: Month and year in format mm.YYYY. - example: "03.2022" - explode: true - in: query - name: date - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatistics' - description: Server response example - security: - - token: [] - summary: Get Channel statistics - tags: - - Channel - /extendedStatistics: - get: - description: Get channel usage extended statistics - operationId: getExtendedStatistics - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/channelExtendedStatistics' - description: Server response example - security: - - token: [] - summary: Get Extended Channel statistics - tags: - - Channel - /status: - get: - description: |- - Returns the status of your WhatsApp Business API client. Channel statuses: - - **connected**/**connecting** - everything is ok. - - **disconnected** - The Coreapp is not connected to the WhatsApp servers. - - **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. - - **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - operationId: getStatus - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatus' - description: Server response example - security: - - token: [] - summary: ' Get Status' - tags: - - Channel - /settings: - get: - description: '**webhookUrl** - Http or https URL for receiving notifications.' - operationId: getSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Settings' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get Settings - tags: - - Channel - post: - description: '**webhookUrl** - Http or https URL for receiving notifications.' - operationId: setSettings - requestBody: - $ref: '#/components/requestBodies/UpdateSettings' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/setSettings_200_response' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Set settings - tags: - - Channel - /commerce: - get: - description: |- - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. - **is_cart_enabled** - Set to true to enable cart or false to disable it. - operationId: getCommerce - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetCommerce' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get Commerce Settings - tags: - - Channel - post: - description: |- - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. - **is_cart_enabled** - Set to true to enable cart or false to disable it. - operationId: setCommerce - requestBody: - $ref: '#/components/requestBodies/UpdateCommerce' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetCommerce' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Set Commerce Settings - tags: - - Products & Catalogs - /webhook: - post: - callbacks: - messages: - $ref: '#/components/callbacks/Messages' - ack: - $ref: '#/components/callbacks/Ack' - description: |- - Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). - - **API responses in "Callbacks" tab** - operationId: setWebhook - requestBody: - $ref: '#/components/requestBodies/SetWebhook' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetWebhookStatus' - description: Server response example - security: - - token: [] - summary: Set webhook - tags: - - Webhooks - /sendList: - post: - description: Send Interactive List Message to an existing chat. (Only if the - dialogue has an Open Session). Only one of two parameters is needed to determine - the destination - chatId or phone. - operationId: sendList - requestBody: - $ref: '#/components/requestBodies/SendList' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send List Message - tags: - - Messaging - /sendFile: - post: - description: Send a file to an existing chat. (Only if the dialogue has an Open - Session). Only one of two parameters is needed to determine the destination - - chatId or phone. - operationId: sendFile - requestBody: - $ref: '#/components/requestBodies/SendFile' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a File - tags: - - Messaging - /sendTemplate: - post: - description: |- - Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. - - Example: - - {"template":"template_name","language":{"policy":"deterministic","code":"en"},"namespace":"namespace_id","params":[{"type":"header","parameters":[{"type":"image","image": {"link":"https://..."}}]},{"type":"body","parameters":[{"type":"text","text":"test"}]}],"phone":"556123122026"} - operationId: sendTemplate - requestBody: - $ref: '#/components/requestBodies/SendTemplate' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send Template Message - tags: - - Templates - /sendMessage: - post: - description: |- - Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. - - Only one of two parameters is needed to determine the destination - chatId or phone. - operationId: sendMessage - requestBody: - $ref: '#/components/requestBodies/SendMessage' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Message - tags: - - Messaging - /sendLocation: - post: - description: Send a location to an existing chat. (Only if the dialogue has - an Open Session). Only one of two parameters is needed to determine the destination - - chatId or phone. - operationId: sendLocation - requestBody: - $ref: '#/components/requestBodies/SendLocation' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Location - tags: - - Messaging - /sendContact: - post: - description: Send a contact to an existing chat. (Only if the dialogue has an - Open Session). Only one of two parameters is needed to determine the destination - - chatId or phone. - operationId: sendContact - requestBody: - $ref: '#/components/requestBodies/SendContact' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Contact - tags: - - Messaging - /sendProduct: - post: - description: |- - Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - - First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. - - **You can not send products to Business WhatsApp clients.** - operationId: sendProduct - requestBody: - $ref: '#/components/requestBodies/SendProduct' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Product - tags: - - Products & Catalogs - /addTemplate: - post: - description: Create new template for sending. - operationId: addTemplate - requestBody: - $ref: '#/components/requestBodies/AddTemplate' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AddTemplate' - description: Server response example - security: - - token: [] - summary: Create template - tags: - - Templates - /removeTemplate: - post: - description: Deleted template can not be restored. - operationId: removeTemplate - requestBody: - $ref: '#/components/requestBodies/RemoveTemplate' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - security: - - token: [] - summary: Remove template - tags: - - Templates - /templates: - get: - description: "" - operationId: templatesList - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetTemplates' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get templates list - tags: - - Templates - /uploadMedia: - post: - description: Upload media and get mediaId. Uploaded media can be sent in template - operationId: uploadMedia - requestBody: - $ref: '#/components/requestBodies/UploadMedia' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MediaId' - description: Server response example - security: - - token: [] - summary: Upload media & get mediaId - tags: - - Media - /messages: - get: - description: "" - operationId: messagesList - parameters: - - description: "Displays the last messages. If this parameter is passed, then\ - \ lastMessageNumber is ignored." - example: true - explode: true - in: query - name: last - required: false - schema: - type: boolean - style: form - - description: "The lastMessageNumber parameter from the last response. Example:\ - \ 100" - example: 100 - explode: true - in: query - name: lastMessageNumber - required: false - schema: - type: integer - style: form - - description: "The firstMessageNumber parameter from the last response. Example:\ - \ 1" - example: 1 - explode: true - in: query - name: firstMessageNumber - required: false - schema: - type: integer - style: form - - description: Sets length of the message list. Default 100. With value 0 returns - all messages. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: |- - Filter messages by chatId - - Chat ID from the message list. Example: 556123122026@c.us - example: 556123122026@c.us - explode: true - in: query - name: chatId - required: false - schema: - type: string - style: form - - description: "Filter messages received after specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: min_time - required: false - schema: - type: integer - style: form - - description: "Filter messages received before specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: max_time - required: false - schema: - type: integer - style: form - - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: msgId - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetMessages' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get messages list - tags: - - Messaging - /hookInfo: - get: - description: "" - operationId: ackHookInfo - parameters: - - allowEmptyValue: false - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: messageId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetAckInfo' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Check ACKs - tags: - - Webhooks - /outputIP: - get: - description: "" - operationId: outputIP - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetIP' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get channel server IP - tags: - - Channel - /readMessage: - post: - description: "" - operationId: readMessage - requestBody: - $ref: '#/components/requestBodies/ReadMessage' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Mark message as read - tags: - - Messaging -components: - callbacks: - Messages: - '{$request.body#/webhookUrl}': - post: - description: Sent on every new incoming or outgoing message to the URL specified - in the settings in the field **webhookUrl** - operationId: webhookMessages - requestBody: - $ref: '#/components/requestBodies/Messages' - responses: - "200": - description: OK - summary: New message notification - tags: - - Webhooks - Ack: - '{$request.body#/webhookUrl}': - post: - description: "Sent on outgoing message status updates (delivered, read)\ - \ to the address set in **webhookUrl** in settings \n\nIt works only if\ - \ the settings **webhookUrl** and **ackNotificationsOn**" - operationId: webhookAck - requestBody: - $ref: '#/components/requestBodies/Ack' - responses: - "200": - description: OK - summary: Message delivery status notification - tags: - - Webhooks - parameters: - messageId: - allowEmptyValue: false - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: messageId - required: true - schema: - type: string - style: form - msgId: - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: msgId - required: false - schema: - type: string - style: form - phone: - description: "Phone number. Example: 556123122026" - example: 556123122026 - explode: true - in: query - name: phone - required: true - schema: - type: integer - style: form - date: - description: Month and year in format mm.YYYY. - example: "03.2022" - explode: true - in: query - name: date - required: false - schema: - type: string - style: form - lastMessageNumber: - description: "The lastMessageNumber parameter from the last response. Example:\ - \ 100" - example: 100 - explode: true - in: query - name: lastMessageNumber - required: false - schema: - type: integer - style: form - last: - description: "Displays the last messages. If this parameter is passed, then\ - \ lastMessageNumber is ignored." - example: true - explode: true - in: query - name: last - required: false - schema: - type: boolean - style: form - firstMessageNumber: - description: "The firstMessageNumber parameter from the last response. Example:\ - \ 1" - example: 1 - explode: true - in: query - name: firstMessageNumber - required: false - schema: - type: integer - style: form - limit: - description: Sets length of the message list. Default 100. With value 0 returns - all messages. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form - chatId: - description: |- - Filter messages by chatId - - Chat ID from the message list. Example: 556123122026@c.us - example: 556123122026@c.us - explode: true - in: query - name: chatId - required: false - schema: - type: string - style: form - min_time: - description: "Filter messages received after specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: min_time - required: false - schema: - type: integer - style: form - max_time: - description: "Filter messages received before specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: max_time - required: false - schema: - type: integer - style: form - requestBodies: - Ack: - content: - application/json: - schema: - properties: - ack: - items: - $ref: '#/components/schemas/Ack' - type: array - type: object - AddTemplate: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AddTemplateRequest' - application/json: - schema: - $ref: '#/components/schemas/AddTemplateRequest' - required: true - Messages: - content: - application/json: - schema: - properties: - messages: - items: - $ref: '#/components/schemas/Message' - type: array - type: object - UpdateSettings: - content: - application/json: - schema: - $ref: '#/components/schemas/Settings' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/Settings' - required: true - UpdateCommerce: - content: - application/json: - schema: - $ref: '#/components/schemas/Commerce' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/Commerce' - required: true - RemoveTemplate: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoveTemplateRequest' - application/json: - schema: - $ref: '#/components/schemas/RemoveTemplateRequest' - required: true - SendMessage: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendMessageRequest' - application/json: - schema: - $ref: '#/components/schemas/SendMessageRequest' - required: true - SendLocation: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendLocationRequest' - application/json: - schema: - $ref: '#/components/schemas/SendLocationRequest' - required: true - SendContact: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendContactRequest' - application/json: - schema: - $ref: '#/components/schemas/SendContactRequest' - required: true - SendTemplate: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendTemplateRequest' - application/json: - schema: - $ref: '#/components/schemas/SendTemplateRequest' - required: true - SendFile: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendFileRequest' - application/json: - schema: - $ref: '#/components/schemas/SendFileRequest' - required: true - SendList: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendListRequest' - application/json: - schema: - $ref: '#/components/schemas/SendListRequest' - required: true - SendProduct: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendProductRequest' - application/json: - schema: - $ref: '#/components/schemas/SendProductRequest' - required: true - SetMe: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SetMeRequest' - application/json: - schema: - $ref: '#/components/schemas/SetMeRequest' - required: true - SetWebhook: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookUrl' - application/json: - schema: - $ref: '#/components/schemas/WebhookUrl' - required: true - UploadMedia: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/UploadMedia' - application/json: - schema: - $ref: '#/components/schemas/UploadMedia' - required: true - ReadMessage: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ReadMessageRequest' - application/json: - schema: - $ref: '#/components/schemas/ReadMessageRequest' - responses: - AddTemplate: - content: - application/json: - schema: - $ref: '#/components/schemas/AddTemplate' - description: Server response example - channelStatistics: - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatistics' - description: Server response example - channelExtendedStatistics: - content: - application/json: - schema: - $ref: '#/components/schemas/channelExtendedStatistics' - description: Server response example - channelStatus: - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatus' - description: Server response example - GetMe: - content: - application/json: - schema: - $ref: '#/components/schemas/GetMe' - description: Server response example - GetTemplates: - content: - application/json: - schema: - $ref: '#/components/schemas/GetTemplates' - description: Server response example - RemoveTemplate: - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - SendMessageStatus: - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - SendTemplate: - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - SetMe: - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - Settings: - content: - application/json: - schema: - $ref: '#/components/schemas/Settings' - description: Server response example - GetCommerce: - content: - application/json: - schema: - $ref: '#/components/schemas/GetCommerce' - description: Server response example - SetCommerce: - content: - application/json: - schema: - $ref: '#/components/schemas/SetCommerce' - description: Server response example - SetWebhookStatus: - content: - application/json: - schema: - $ref: '#/components/schemas/SetWebhookStatus' - description: Server response example - Unauthorized: - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - UpdateSettings: - content: - application/json: - schema: - $ref: '#/components/schemas/setSettings_200_response' - description: Server response example - UploadMedia: - content: - application/json: - schema: - $ref: '#/components/schemas/MediaId' - description: Server response example - GetMessages: - content: - application/json: - schema: - $ref: '#/components/schemas/GetMessages' - description: Server response example - GetAckInfo: - content: - application/json: - schema: - $ref: '#/components/schemas/GetAckInfo' - description: Server response example - GetIP: - content: - application/json: - schema: - $ref: '#/components/schemas/GetIP' - description: Server response example - ReadMessage: - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - schemas: - AddTemplate: - properties: {} - type: object - TemplateCategoryProp: - description: Template category - enum: - - MARKETING - - TRANSACTIONAL - - OTP - example: MARKETING - type: string - TemplateComponentsProp: - description: Array of template components - items: - $ref: '#/components/schemas/TemplateComponentsProp_inner' - type: array - TemplateLanguageProp: - description: Template language - enum: - - af - - sq - - ar - - az - - bn - - bg - - ca - - zh_CN - - zh_HK - - zh_TW - - hr - - cs - - da - - nl - - en - - en_GB - - en_US - - et - - fil - - fi - - fr - - de - - el - - gu - - he - - hi - - hu - - id - - ga - - it - - ja - - kn - - kk - - ko - - lo - - lv - - lt - - mk - - ms - - mr - - nb - - fa - - pl - - pt_BR - - pt_PT - - pa - - ro - - ru - - sr - - sk - - sl - - es - - es_AR - - es_ES - - es_MX - - sw - - sv - - ta - - te - - th - - tr - - uk - - ur - - uz - - vi - example: en - type: string - TemplateNamespaceProp: - description: Can be found by method /templates - example: ca300906_cfbc_410b_99fb_dcee8e13d578 - type: string - TemplateNamespaceField: - properties: - namespace: - example: ca300906_cfbc_410b_99fb_dcee8e13d578 - type: string - type: object - Ack: - properties: - id: - description: unique id of message - example: true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F - type: string - chatId: - description: chat ID - example: 12020721369@c.us - type: string - status: - description: type of the message status - enum: - - delivered - - viewed - - sent - example: viewed - type: string - type: object - AddTemplateRequest: - example: - components: null - name: start - language: en - category: MARKETING - properties: - name: - description: Name of template - example: start - type: string - category: - $ref: '#/components/schemas/TemplateCategoryProp' - components: - $ref: '#/components/schemas/TemplateComponentsProp' - language: - $ref: '#/components/schemas/TemplateLanguageProp' - type: object - ChatIdProp: - properties: - chatId: - description: |- - **Required if phone is not set** - - Chat ID from the message list. Examples: 12020721369@c.us - . Used instead of the phone parameter. - example: 12020721369@c.us - type: string - type: object - PhoneProp: - properties: - phone: - description: "**Required if chatId is not set**\n\nA phone number starting\ - \ with the country code. You do not\nneed to add your number. \n\nUSA\ - \ example: 12020721369." - example: 12020721369 - type: integer - type: object - MessageIdProp: - properties: - messageId: - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - type: string - type: object - Message: - properties: - id: - description: unique id - example: ABGHYoIXMAmY13IKOick9az6QYmt4R - type: string - body: - description: "text message for type \"chat\", or link to download the file\ - \ for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude\ - \ and longitude for \"location\", or message \"[Call]\" for \"call_log\"" - example: Ok! - type: string - fromMe: - description: "true - outgoing, false - incoming" - example: true - type: boolean - self: - description: "1 - generated by api, 0 - generated by app" - example: 0 - type: integer - isForwarded: - description: "true - forwarded message, false - direct message" - example: false - type: boolean - author: - description: Author ID of the message - example: 12020721369@c.us - type: string - time: - description: "send time, unix timestamp" - example: 1665396610 - type: integer - chatId: - description: chat ID - example: 12020721369@c.us - type: string - type: - description: type of the message - enum: - - chat - - interactive - - image - - video - - document - - audio - - sticker - - voice - example: chat - type: string - senderName: - description: Sender name - example: John - type: string - caption: - description: File caption or filename - example: photo.jpg - type: string - quotedMsgId: - description: ID of quoted message - example: ABGHYoIXMAmYTwIKOick9az6QYmt4R - type: string - type: object - SetMe: - example: - result: success - properties: - result: - example: success - nullable: false - type: string - type: object - SetMeRequest: - allOf: - - $ref: '#/components/schemas/MeComponents' - MeComponents: - properties: - about: - description: Profile`s About section. - example: Some about info - type: string - address: - description: Address of the business - example: "Neverland, Unexpected st." - type: string - description: - description: Description of the business. Max 256 characters - example: Some company description - type: string - email: - description: Business email - example: john@neverland.play - type: string - phone: - description: Linked phone number - example: "12020721369" - type: string - vertical: - description: Industry of the business - enum: - - Automotive - - "Beauty, Spa and Salon" - - Clothing and Apparel - - Education - - Entertainment - - Event Planning and Service - - Finance and Banking - - Food and Grocery - - Public Service - - Hotel and Lodging - - Medical and Health - - Non-profit - - Professional Services - - Shopping and Retail - - Travel and Transportation - - Restaurant - - Other - - "" - example: Other - type: string - photo: - description: "HTTP link\n*https://...*\n\nOr base64-encoded file with mime\ - \ data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* \n\ - \nFile in form-data input field" - type: string - type: object - GetMe: - allOf: - - $ref: '#/components/schemas/MeComponents' - - properties: - photo: - example: https://pps.whatsapp.net/sample.jpg - nullable: false - type: string - type: object - GetIP: - example: - result: 213.74.84.72 - properties: - result: - example: 213.74.84.72 - nullable: false - type: string - type: object - GetTemplates: - example: - total: 3 - templates: - - components: null - rejected_reason: NONE - name: start - namespace: ca300906_cfbc_410b_99fb_dcee8e13d578 - language: en - category: MARKETING - status: approved - - components: null - rejected_reason: NONE - name: start - namespace: ca300906_cfbc_410b_99fb_dcee8e13d578 - language: en - category: MARKETING - status: approved - properties: - total: - example: 3 - nullable: false - type: integer - templates: - items: - $ref: '#/components/schemas/GetTemplates_templates_inner' - type: array - type: object - channelStatistics: - example: - date: "03.2022" - templates_cost: 400.0313 - properties: - date: - example: "03.2022" - type: string - templates_cost: - example: 400.0313 - type: number - type: object - channelExtendedStatistics: - items: - $ref: '#/components/schemas/channelExtendedStatistics_inner' - type: array - channelStatus: - example: - status: connected - properties: - status: - description: channel Status - enum: - - connected - - connecting - - disconnected - - uninitialized - - unregistered - example: connected - type: string - type: object - RemoveTemplateRequest: - example: - name: start - properties: - name: - description: Template name - example: start - type: string - type: object - SendFileRequest: - allOf: - - properties: - body: - description: "HTTP link\n*https://...*\n\nOr base64-encoded file with\ - \ mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...*\ - \ \n\nFile in form-data input field" - type: string - filename: - description: "File name, for *example 1.jpg* or *hello.xlsx*" - type: string - caption: - description: "Text under the file. When sending an image сan be used with\ - \ mentionedPhones, example: this image for @556123122026" - type: string - required: - - body - - filename - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendListRequest: - allOf: - - properties: - body: - description: Main message text - example: Please choose option - type: string - header: - description: Header will be located above message text - example: Some options - type: string - footer: - description: Footer will be placed under message text - example: Thank you - type: string - action: - description: Action for open list - example: List - type: string - sections: - description: |- - Up to 10 sections from which the client can choose. - - Each section is object with fields: - - *title* - Title of section, up to 24 symbols. Required if there are more then 1 section - - *rows* - available options. Required - - - - Each option is object with fields: - - *id* - Unique id for option, up to 200 symbols. Required - - *title* - Title of option, up to 24 symbols. Required - - *description* - Description of option, up to 72 symbols - - - - Example: - - [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - example: - - title: Section 1 - rows: - - id: "1" - title: Option 1 - description: Description 1 - - title: Section 2 - rows: - - id: "2" - title: Option 2 - description: Description 2 - items: - $ref: '#/components/schemas/SendListRequest_allOf_sections' - type: array - required: - - action - - body - - sections - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendMessageRequest: - allOf: - - properties: - body: - description: "Message text, UTF-8 or UTF-16 string with emoji 🍏. Can\ - \ be used with mentionedPhones, example: this text for @556123122026" - type: string - required: - - body - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendLocationRequest: - allOf: - - properties: - lat: - description: "Latitude of the location. Example: 45.018337" - example: "45.018337" - type: string - lng: - description: "Longitude of the location. Example: -73.968285" - example: "-73.968285" - type: string - address: - description: "Address of the location. Only displayed if name is present.\ - \ Example: 9766 Valley View St., New York, NY 10024" - example: "9766 Valley View St., New York, NY 10024" - type: string - name: - description: "Name of the location. Example: Facebook HQ" - example: Facebook HQ - type: string - required: - - lat - - lng - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendContactRequest: - allOf: - - properties: - contacts: - description: |- - Array containing contact objects. - - Contact object parameters: - - **name** - full contact name. Required. Object with properties: - - * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) - - * first_name - First name. Example: Adam - - * last_name - Last name. Example: Smith - - * middle_name - Middle name. Example: John - - * suffix - Name suffix. Example: Junior - - * prefix - Name prefix. Example: Lord - - **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 - - **addresses** - array containing address objects with parameters: - - * street - Street number and name. Example: 1 Hacker Way - - * city - City name. Example: Menlo Park - - * state - State abbreviation. Example: CA - - * zip - ZIP code. Example: 94025 - - * country - Full country name. Example: United States - - * country_code - Two-letter country abbreviation. Example: us - - * type - Standard Values: HOME, WORK. Example: HOME - - **emails** - array containing email objects with parameters: - - * email - Email address. Example: test@fb.com - - * type - Standard Values: HOME, WORK. Example: WORK - - **org** - object containing parameters: - - * company - Name of the contact's company. Example: WhatsApp - - * department - Name of the contact's department. Example: Design - - * title - Contact's business title. Example: Manager - - **phones** - array containing phone objects with parameters: - - * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 - - * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME - - * wa_id - WhatsApp ID. Example: 19405551234 - - **urls** - array containing url objects with parameters: - - * url - URL. Example: https://www.facebook.com - - * type - Standard Values: HOME, WORK. Example: WORK - - Example: [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - example: "[{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United\ - \ States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker\ - \ Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\"\ - ,\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"\ - CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"\ - }],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\"\ - ,\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"\ - }],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\"\ - ,\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\"\ - :\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940)\ - \ 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"\ - type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\"\ - ,\"type\":\"WORK\"}]}]" - items: - type: object - type: array - required: - - body - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendMessageStatus: - example: - description: Message has been sent to the provider - id: gBGGeRhGZTEfAgkJCh2wAz4ZH-8 - message: Sent to 556123122026@c.us - sent: true - properties: - sent: - example: true - type: boolean - id: - description: unique message id - example: gBGGeRhGZTEfAgkJCh2wAz4ZH-8 - type: string - message: - description: Posting status message - example: Sent to 556123122026@c.us - type: string - description: - description: Result description - example: Message has been sent to the provider - type: string - type: object - SendTemplateRequest: - allOf: - - properties: - namespace: - description: Can be found by method /templates - example: ca300906_cfbc_410b_99fb_dcee1t39d578 - type: string - template: - description: Name of template - example: start - type: string - language: - $ref: '#/components/schemas/SendTemplateRequest_allOf_language' - params: - description: "Array of localizable parameters to be substituted into the\ - \ template. Each parameter is object contains the following field:\n\ - \n**type** - section of parameters - header, body, footer, button\n\n\ - **parameters** - variables for section.\n\nEach variable is an object\ - \ that can contain the following fields:\n\n**type** - can be text,\ - \ currency, date_time, image, document or video\n\n**video**- id (mediaId)\n\ - \n**document** \n\n* id (mediaId)\n\n* filename(optional)\n\n**image**\ - \ - object with field link (image url)\n\n**currency** - object containing\ - \ parameters currency_code and amount_1000.\n\n* *currency_code* - Currency\ - \ code as defined in ISO 4217.\n\n* *amount_1000* - Amount multiplied\ - \ by 1000.\n\n* *fallback_value* - Default text if localization fails.\n\ - \n**date_time** - If the date_time object is used, further definition\ - \ of the date and time is required.\n\n* *component* - The time is assembled\ - \ from components (i.e., day of the week, month, hour, etc.) The time\ - \ specified will be the same, regardless of the time zone the client\ - \ is in.\n\n* *unix_epoch* - The time to be displayed is dependent on\ - \ the time zone the client is in.\n\n* *fallback_value* - Default text\ - \ if localization fails.\n\n**button** - if button has parameter \n\n\ - * sub_type (url/quick_reply)\n\n* parameters (array to fill button variable)\n\ - \n* index - button position.\n\n**The number of parameters passed must\ - \ match the number of parameters in the template**" - items: - $ref: '#/components/schemas/SendTemplateRequest_allOf_params' - type: array - required: - - language - - namespace - - template - type: object - - $ref: '#/components/schemas/TemplateNamespaceField' - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendProductRequest: - allOf: - - properties: - action: - $ref: '#/components/schemas/SendProductRequest_allOf_action' - body: - description: "Text of message. Example: Some text." - example: Some text - type: string - footer: - description: "Located under the message text. Example: Footer." - example: Footer - type: string - header: - description: |- - Header of catalog. Example: Header. - - **Required when sending the catalog.** - example: Header - type: string - required: - - action - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - Settings: - example: - webhookUrl: https://bin.1msg.io/1f9aj261 - properties: - webhookUrl: - example: https://bin.1msg.io/1f9aj261 - nullable: true - type: string - type: object - Commerce: - example: - params: - is_catalog_visible: true - is_cart_enabled: true - properties: - params: - $ref: '#/components/schemas/Commerce_params' - type: object - GetCommerce: - items: - $ref: '#/components/schemas/GetCommerce_inner' - type: array - SetCommerce: - example: - success: true - properties: - success: - example: true - type: boolean - type: object - SetWebhookStatus: - example: - set: true - message: https://bin.1msg.io/1f9aj261 - properties: - set: - description: Flag indicating that the current request has changed webhook - example: true - type: boolean - message: - example: https://bin.1msg.io/1f9aj261 - type: string - type: object - WebhookUrl: - example: - webhookUrl: webhookUrl - properties: - webhookUrl: - description: "Http or https URL for receiving notifications. For testing,\ - \ we recommend using [our RequestBin](http://bin.1msg.io)." - type: string - required: - - webhookUrl - type: object - Contacts: - properties: - contacts: - description: List of checked numbers - items: - $ref: '#/components/schemas/Contacts_contacts_inner' - type: array - type: object - ContactsRequest: - properties: - blocking: - description: |- - Operating mode: - - *wait* - synchronous - - *no_wait* - asynchronous (default) - example: wait - type: string - force_check: - description: |- - Using cache: - - *true* - ignore cache - - *false* - use cache (default) - example: true - type: boolean - contacts: - description: |- - Array of contact numbers for checking. Recommended format is +16315551001 - - Example: - - ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - example: - - "16315551000" - - +1 631 555 1001 - - "6315551002" - - +1 (631) 555-1004 - - 1-631-555-1005 - items: - type: string - type: array - required: - - contacts - type: object - ReadMessageRequest: - allOf: - - $ref: '#/components/schemas/MessageIdProp' - UploadMedia: - allOf: - - properties: - body: - description: "HTTP link\n*https://...*\n\nOr base64-encoded file with\ - \ mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...*\ - \ \n\nFile in form-data input field" - type: string - required: - - body - type: object - MediaId: - example: - mediaId: ed2c7be7-b779-4ba8-a17c-6722f37be2a7 - properties: - mediaId: - example: ed2c7be7-b779-4ba8-a17c-6722f37be2a7 - type: string - type: object - GetMessages: - example: - messages: - - metadata: {} - messageNumber: 1 - chatId: 556123122026@c.us - author: 556123122026@c.us - caption: caption - chatName: "556123122026" - fromMe: true - body: Test message - type: chat - quotedMsgId: quotedMsgId - senderName: 780005553535@c.us - self: 1 - id: 0XzkmGNn4prUAQlzsHApGNRXQ0U - time: 1665396610 - isForwarded: 0 - - metadata: {} - messageNumber: 1 - chatId: 556123122026@c.us - author: 556123122026@c.us - caption: caption - chatName: "556123122026" - fromMe: true - body: Test message - type: chat - quotedMsgId: quotedMsgId - senderName: 780005553535@c.us - self: 1 - id: 0XzkmGNn4prUAQlzsHApGNRXQ0U - time: 1665396610 - isForwarded: 0 - properties: - messages: - items: - $ref: '#/components/schemas/GetMessages_messages_inner' - type: array - type: object - GetAckInfo: - example: - hooks: - - id: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: message - pricing: - billable: true - category: business_initiated - pricing_model: CBP - conversation: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - status: sent - timestamp: "1654864094" - recipient_id: "556123122026" - - id: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: message - pricing: - billable: true - category: business_initiated - pricing_model: CBP - conversation: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - status: sent - timestamp: "1654864094" - recipient_id: "556123122026" - properties: - hooks: - items: - $ref: '#/components/schemas/GetAckInfo_hooks_inner' - type: array - type: object - getMe_401_response: - properties: - error: - example: Wrong token "xxx7i1crxjxpkxxx" for channel "123". Please provide - token as a GET parameter. - type: string - type: object - setSettings_200_response_allOf_update: - allOf: - - $ref: '#/components/schemas/Settings' - - description: An object that lists the fields changed in the request - setSettings_200_response: - allOf: - - $ref: '#/components/schemas/Settings' - - properties: - update: - $ref: '#/components/schemas/setSettings_200_response_allOf_update' - required: - - update - type: object - TemplateComponentsProp_inner_buttons_inner: - properties: - type: - enum: - - PHONE_NUMBER - - URL - - QUICK_REPLY - example: QUICK_REPLY - type: string - text: - example: phone-button-text - type: string - url: - example: "https://www.website.com/{{1}}" - type: string - phone_number: - example: +1(234) 235-5678 - type: string - example: - items: {} - type: array - type: object - TemplateComponentsProp_inner: - properties: - type: - enum: - - BODY - - HEADER - - FOOTER - - BUTTONS - example: BODY - type: string - format: - description: Only for HEADER type - enum: - - TEXT - - IMAGE - - DOCUMENT - - VIDEO - example: TEXT - type: string - text: - example: "header text {{1}}" - type: string - example: - type: object - buttons: - items: - $ref: '#/components/schemas/TemplateComponentsProp_inner_buttons_inner' - type: array - type: object - GetTemplates_templates_inner: - example: - components: null - rejected_reason: NONE - name: start - namespace: ca300906_cfbc_410b_99fb_dcee8e13d578 - language: en - category: MARKETING - status: approved - properties: - category: - $ref: '#/components/schemas/TemplateCategoryProp' - components: - $ref: '#/components/schemas/TemplateComponentsProp' - language: - $ref: '#/components/schemas/TemplateLanguageProp' - name: - example: start - type: string - namespace: - description: Can be found by method /templates - example: ca300906_cfbc_410b_99fb_dcee8e13d578 - type: string - rejected_reason: - example: NONE - type: string - status: - example: approved - type: string - type: object - channelExtendedStatistics_inner: - properties: - business_initiated_paid_quantity: - example: 1 - type: integer - business_initiated_price: - example: 0.0691 - type: number - business_initiated_quantity: - example: 2 - type: integer - free_entry_point: - example: 0 - type: integer - free_quantity: - example: 1 - type: integer - free_tier: - example: 1 - type: integer - paid_quantity: - example: 1 - type: integer - period_date: - example: 2022-11-01T00:00:00Z - type: string - quantity: - example: 2 - type: number - total_price: - example: 0.0691 - type: number - user_initiated_paid_quantity: - example: 1 - type: integer - user_initiated_price: - example: 0.0691 - type: number - user_initiated_quantity: - example: 2 - type: integer - type: object - SendListRequest_allOf_rows: - properties: - id: - description: "Unique id for option, up to 200 symbols" - example: "1" - type: string - title: - description: "Title of option, up to 24 symbols." - example: Some option - type: string - description: - description: "Description of option, up to 72 symbols" - example: Some description - type: string - required: - - id - - title - type: object - example: null - SendListRequest_allOf_sections: - properties: - title: - description: "Title of section, up to 24 symbols. Required if there are\ - \ more then 1 section" - example: Some title - type: string - rows: - items: - $ref: '#/components/schemas/SendListRequest_allOf_rows' - type: array - required: - - rows - type: object - example: null - SendTemplateRequest_allOf_language: - description: |- - Object, containing fields "policy" and "code". - - **policy** - now "deterministic" is only available option; - - **code** - one of supported language codes - properties: - policy: - enum: - - deterministic - example: deterministic - type: string - code: - $ref: '#/components/schemas/TemplateLanguageProp' - type: object - example: null - SendTemplateRequest_allOf_currency: - properties: - currency_code: - example: USD - type: string - amount_1000: - example: 100990 - type: integer - type: object - example: null - SendTemplateRequest_allOf_date_time_component: - properties: - day_of_week: - enum: - - MONDAY - - TUESDAY - - WEDNESDAY - - THURSDAY - - FRIDAY - - SATURDAY - - SUNDAY - - "1" - - "2" - - "3" - - "4" - - "5" - - "6" - - "7" - example: FRIDAY - type: string - year: - example: 2001 - type: integer - month: - example: 4 - type: integer - day_of_month: - example: 13 - type: integer - hour: - example: 17 - type: integer - minute: - example: 20 - type: integer - calendar: - enum: - - GREGORIAN - - SOLAR_HIJRI - example: GREGORIAN - type: string - type: object - example: null - SendTemplateRequest_allOf_date_time_unix_epoch: - properties: - timestamp: - example: 987168000 - type: integer - type: object - example: null - SendTemplateRequest_allOf_date_time: - properties: - component: - $ref: '#/components/schemas/SendTemplateRequest_allOf_date_time_component' - unix_epoch: - $ref: '#/components/schemas/SendTemplateRequest_allOf_date_time_unix_epoch' - type: object - example: null - SendTemplateRequest_allOf_params: - properties: - default: - example: Some title - type: string - currency: - $ref: '#/components/schemas/SendTemplateRequest_allOf_currency' - date_time: - $ref: '#/components/schemas/SendTemplateRequest_allOf_date_time' - type: object - example: null - SendProductRequest_allOf_action_product_items: - properties: - product_retailer_id: - description: id of the product - example: product-1 - type: string - type: object - example: null - SendProductRequest_allOf_action_sections: - properties: - title: - description: "Title of the section. Example: the-section-title" - example: the-section-title - type: string - product_items: - items: - $ref: '#/components/schemas/SendProductRequest_allOf_action_product_items' - type: array - type: object - example: null - SendProductRequest_allOf_action: - description: |- - Object containing info about product or catalog. Can contain the following fields: - - **catalog_id** - id of catalog - - **product_retailer_id** - id of product. Only for sending single product. - - **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. - - Example: {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]} - example: "{\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\"\ - ,\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\"\ - :\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"\ - product_retailer_id\":\"{{SKU-1}}\"}]}]}" - properties: - catalog_id: - description: id of the catalog - example: "407921857496983" - type: string - product_retailer_id: - description: id of the product - example: product-1 - type: string - sections: - items: - $ref: '#/components/schemas/SendProductRequest_allOf_action_sections' - type: array - type: object - Commerce_params: - example: - is_catalog_visible: true - is_cart_enabled: true - properties: - is_cart_enabled: - example: true - type: boolean - is_catalog_visible: - example: true - type: boolean - required: - - is_cart_enabled - - is_catalog_visible - type: object - GetCommerce_inner: - properties: - id: - example: "789887292550821" - type: string - is_cart_enabled: - example: true - type: boolean - is_catalog_visible: - example: true - type: boolean - type: object - Contacts_contacts_inner: - properties: - input: - description: Sent value - example: "16315551000" - type: string - status: - description: "Contacts status: \n\n*failed* - got error on processing\n\n\ - *processing* - still not detected\n\n*invalid* - unavailable for sending\n\ - \n*valid* - available for sending" - example: valid - type: string - wa_id: - description: Formatted contact phone - example: "16315551000" - type: string - type: object - GetMessages_messages_inner: - example: - metadata: {} - messageNumber: 1 - chatId: 556123122026@c.us - author: 556123122026@c.us - caption: caption - chatName: "556123122026" - fromMe: true - body: Test message - type: chat - quotedMsgId: quotedMsgId - senderName: 780005553535@c.us - self: 1 - id: 0XzkmGNn4prUAQlzsHApGNRXQ0U - time: 1665396610 - isForwarded: 0 - properties: - messageNumber: - example: 1 - type: integer - id: - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - type: string - body: - example: Test message - type: string - fromMe: - example: true - type: boolean - self: - example: 1 - type: integer - isForwarded: - example: 0 - type: integer - author: - example: 556123122026@c.us - type: string - time: - example: 1665396610 - type: integer - chatId: - example: 556123122026@c.us - type: string - type: - example: chat - type: string - senderName: - example: 780005553535@c.us - type: string - caption: - type: string - example: null - quotedMsgId: - type: string - example: null - metadata: - example: {} - type: object - chatName: - example: "556123122026" - type: string - type: object - GetAckInfo_hooks_inner: - example: - id: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: message - pricing: - billable: true - category: business_initiated - pricing_model: CBP - conversation: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - status: sent - timestamp: "1654864094" - recipient_id: "556123122026" - properties: - id: - example: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: string - type: - example: message - type: string - status: - example: sent - type: string - pricing: - example: - billable: true - category: business_initiated - pricing_model: CBP - type: object - timestamp: - example: "1654864094" - type: string - conversation: - example: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - type: object - recipient_id: - example: "556123122026" - type: string - type: object - securitySchemes: - token: - in: query - name: token - type: apiKey - diff --git a/csharp/appveyor.yml b/csharp/appveyor.yml deleted file mode 100644 index f9d609b..0000000 --- a/csharp/appveyor.yml +++ /dev/null @@ -1,9 +0,0 @@ -# auto-generated by OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator) -# -image: Visual Studio 2019 -clone_depth: 1 -build_script: -- dotnet build -c Release -- dotnet test -c Release -after_build: -- dotnet pack .\src\OneMessage.io\OneMessage.io.csproj -o ../../output -c Release --no-build diff --git a/csharp/docs/Ack.md b/csharp/docs/Ack.md deleted file mode 100644 index 01d48b2..0000000 --- a/csharp/docs/Ack.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.Ack - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | unique id of message | [optional] -**ChatId** | **string** | chat ID | [optional] -**Status** | **string** | type of the message status | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/AddTemplateRequest.md b/csharp/docs/AddTemplateRequest.md deleted file mode 100644 index 99fe1dc..0000000 --- a/csharp/docs/AddTemplateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# OneMessage.io.Model.AddTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of template | [optional] -**Category** | **TemplateCategoryProp** | | [optional] -**Components** | [**TemplateComponentsProp**](TemplateComponentsProp.md) | | [optional] -**Language** | **TemplateLanguageProp** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ChannelApi.md b/csharp/docs/ChannelApi.md deleted file mode 100644 index cf62f24..0000000 --- a/csharp/docs/ChannelApi.md +++ /dev/null @@ -1,854 +0,0 @@ -# OneMessage.io.Api.ChannelApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|--------|--------------|-------------| -| [**GetCommerce**](ChannelApi.md#getcommerce) | **GET** /commerce | Get Commerce Settings | -| [**GetExtendedStatistics**](ChannelApi.md#getextendedstatistics) | **GET** /extendedStatistics | Get Extended Channel statistics | -| [**GetMe**](ChannelApi.md#getme) | **GET** /me | Get Profile Info | -| [**GetSettings**](ChannelApi.md#getsettings) | **GET** /settings | Get Settings | -| [**GetStatistics**](ChannelApi.md#getstatistics) | **GET** /statistics | Get Channel statistics | -| [**GetStatus**](ChannelApi.md#getstatus) | **GET** /status | Get Status | -| [**OutputIP**](ChannelApi.md#outputip) | **GET** /outputIP | Get channel server IP | -| [**SetMe**](ChannelApi.md#setme) | **POST** /me | Change user info | -| [**SetSettings**](ChannelApi.md#setsettings) | **POST** /settings | Set settings | - - -# **GetCommerce** -> GetCommerce GetCommerce () - -Get Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class GetCommerceExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // Get Commerce Settings - GetCommerce result = apiInstance.GetCommerce(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetCommerce: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the GetCommerceWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Commerce Settings - ApiResponse response = apiInstance.GetCommerceWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.GetCommerceWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**GetCommerce**](GetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetExtendedStatistics** -> ChannelExtendedStatistics GetExtendedStatistics () - -Get Extended Channel statistics - -Get channel usage extended statistics - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class GetExtendedStatisticsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // Get Extended Channel statistics - ChannelExtendedStatistics result = apiInstance.GetExtendedStatistics(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetExtendedStatistics: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the GetExtendedStatisticsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Extended Channel statistics - ApiResponse response = apiInstance.GetExtendedStatisticsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.GetExtendedStatisticsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**ChannelExtendedStatistics**](ChannelExtendedStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetMe** -> GetMe GetMe () - -Get Profile Info - -Use this edge to retrieve your profile's About info - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class GetMeExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // Get Profile Info - GetMe result = apiInstance.GetMe(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetMe: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the GetMeWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Profile Info - ApiResponse response = apiInstance.GetMeWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.GetMeWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**GetMe**](GetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetSettings** -> Settings GetSettings () - -Get Settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class GetSettingsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // Get Settings - Settings result = apiInstance.GetSettings(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetSettings: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the GetSettingsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Settings - ApiResponse response = apiInstance.GetSettingsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.GetSettingsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**Settings**](Settings.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetStatistics** -> ChannelStatistics GetStatistics (string date = null) - -Get Channel statistics - -Get channel usage statistics - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class GetStatisticsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - var date = 03.2022; // string | Month and year in format mm.YYYY. (optional) - - try - { - // Get Channel statistics - ChannelStatistics result = apiInstance.GetStatistics(date); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetStatistics: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the GetStatisticsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Channel statistics - ApiResponse response = apiInstance.GetStatisticsWithHttpInfo(date); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.GetStatisticsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **date** | **string** | Month and year in format mm.YYYY. | [optional] | - -### Return type - -[**ChannelStatistics**](ChannelStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetStatus** -> ChannelStatus GetStatus () - - Get Status - -Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class GetStatusExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // Get Status - ChannelStatus result = apiInstance.GetStatus(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetStatus: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the GetStatusWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Status - ApiResponse response = apiInstance.GetStatusWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.GetStatusWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**ChannelStatus**](ChannelStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **OutputIP** -> GetIP OutputIP () - -Get channel server IP - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class OutputIPExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // Get channel server IP - GetIP result = apiInstance.OutputIP(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.OutputIP: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the OutputIPWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get channel server IP - ApiResponse response = apiInstance.OutputIPWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.OutputIPWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**GetIP**](GetIP.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SetMe** -> SetMe SetMe (SetMeRequest setMeRequest) - -Change user info - -Change user info - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SetMeExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - var setMeRequest = new SetMeRequest(); // SetMeRequest | - - try - { - // Change user info - SetMe result = apiInstance.SetMe(setMeRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.SetMe: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SetMeWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Change user info - ApiResponse response = apiInstance.SetMeWithHttpInfo(setMeRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.SetMeWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **setMeRequest** | [**SetMeRequest**](SetMeRequest.md) | | | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SetSettings** -> SetSettings200Response SetSettings (Settings settings) - -Set settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SetSettingsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - var settings = new Settings(); // Settings | - - try - { - // Set settings - SetSettings200Response result = apiInstance.SetSettings(settings); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.SetSettings: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SetSettingsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Set settings - ApiResponse response = apiInstance.SetSettingsWithHttpInfo(settings); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ChannelApi.SetSettingsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **settings** | [**Settings**](Settings.md) | | | - -### Return type - -[**SetSettings200Response**](SetSettings200Response.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp/docs/ChannelExtendedStatistics.md b/csharp/docs/ChannelExtendedStatistics.md deleted file mode 100644 index ff387b7..0000000 --- a/csharp/docs/ChannelExtendedStatistics.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMessage.io.Model.ChannelExtendedStatistics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ChannelExtendedStatisticsInner.md b/csharp/docs/ChannelExtendedStatisticsInner.md deleted file mode 100644 index 0e3b38d..0000000 --- a/csharp/docs/ChannelExtendedStatisticsInner.md +++ /dev/null @@ -1,22 +0,0 @@ -# OneMessage.io.Model.ChannelExtendedStatisticsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BusinessInitiatedPaidQuantity** | **int** | | [optional] -**BusinessInitiatedPrice** | **decimal** | | [optional] -**BusinessInitiatedQuantity** | **int** | | [optional] -**FreeEntryPoint** | **int** | | [optional] -**FreeQuantity** | **int** | | [optional] -**FreeTier** | **int** | | [optional] -**PaidQuantity** | **int** | | [optional] -**PeriodDate** | **string** | | [optional] -**Quantity** | **decimal** | | [optional] -**TotalPrice** | **decimal** | | [optional] -**UserInitiatedPaidQuantity** | **int** | | [optional] -**UserInitiatedPrice** | **decimal** | | [optional] -**UserInitiatedQuantity** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ChannelStatistics.md b/csharp/docs/ChannelStatistics.md deleted file mode 100644 index eca1c23..0000000 --- a/csharp/docs/ChannelStatistics.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.ChannelStatistics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | | [optional] -**TemplatesCost** | **decimal** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ChannelStatus.md b/csharp/docs/ChannelStatus.md deleted file mode 100644 index 7bae9f7..0000000 --- a/csharp/docs/ChannelStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.ChannelStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | **string** | channel Status | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ChatIdProp.md b/csharp/docs/ChatIdProp.md deleted file mode 100644 index 683d217..0000000 --- a/csharp/docs/ChatIdProp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.ChatIdProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/Commerce.md b/csharp/docs/Commerce.md deleted file mode 100644 index 470db7c..0000000 --- a/csharp/docs/Commerce.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.Commerce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarParams** | [**CommerceParams**](CommerceParams.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/CommerceParams.md b/csharp/docs/CommerceParams.md deleted file mode 100644 index 4c2ec1f..0000000 --- a/csharp/docs/CommerceParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.CommerceParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IsCartEnabled** | **bool** | | -**IsCatalogVisible** | **bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/Contacts.md b/csharp/docs/Contacts.md deleted file mode 100644 index a055480..0000000 --- a/csharp/docs/Contacts.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.Contacts - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarContacts** | [**List<ContactsContactsInner>**](ContactsContactsInner.md) | List of checked numbers | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ContactsContactsInner.md b/csharp/docs/ContactsContactsInner.md deleted file mode 100644 index 52a9ac2..0000000 --- a/csharp/docs/ContactsContactsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.ContactsContactsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Input** | **string** | Sent value | [optional] -**Status** | **string** | Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending | [optional] -**WaId** | **string** | Formatted contact phone | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ContactsRequest.md b/csharp/docs/ContactsRequest.md deleted file mode 100644 index 30fbef2..0000000 --- a/csharp/docs/ContactsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.ContactsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocking** | **string** | Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) | [optional] -**ForceCheck** | **bool** | Using cache: *true* - ignore cache *false* - use cache (default) | [optional] -**Contacts** | **List<string>** | Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetAckInfo.md b/csharp/docs/GetAckInfo.md deleted file mode 100644 index 1d97add..0000000 --- a/csharp/docs/GetAckInfo.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.GetAckInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Hooks** | [**List<GetAckInfoHooksInner>**](GetAckInfoHooksInner.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetAckInfoHooksInner.md b/csharp/docs/GetAckInfoHooksInner.md deleted file mode 100644 index a6b60cd..0000000 --- a/csharp/docs/GetAckInfoHooksInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.GetAckInfoHooksInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**Type** | **string** | | [optional] -**Status** | **string** | | [optional] -**Pricing** | **Object** | | [optional] -**Timestamp** | **string** | | [optional] -**Conversation** | **Object** | | [optional] -**RecipientId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetCommerce.md b/csharp/docs/GetCommerce.md deleted file mode 100644 index 7e47cb3..0000000 --- a/csharp/docs/GetCommerce.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMessage.io.Model.GetCommerce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetCommerceInner.md b/csharp/docs/GetCommerceInner.md deleted file mode 100644 index d339ab5..0000000 --- a/csharp/docs/GetCommerceInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.GetCommerceInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**IsCartEnabled** | **bool** | | [optional] -**IsCatalogVisible** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetIP.md b/csharp/docs/GetIP.md deleted file mode 100644 index bcd9472..0000000 --- a/csharp/docs/GetIP.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.GetIP - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetMe.md b/csharp/docs/GetMe.md deleted file mode 100644 index 355ee81..0000000 --- a/csharp/docs/GetMe.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.GetMe - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**About** | **string** | Profile`s About section. | [optional] -**Address** | **string** | Address of the business | [optional] -**Description** | **string** | Description of the business. Max 256 characters | [optional] -**Email** | **string** | Business email | [optional] -**Phone** | **string** | Linked phone number | [optional] -**Vertical** | **string** | Industry of the business | [optional] -**Photo** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetMe401Response.md b/csharp/docs/GetMe401Response.md deleted file mode 100644 index 919df2f..0000000 --- a/csharp/docs/GetMe401Response.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.GetMe401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetMessages.md b/csharp/docs/GetMessages.md deleted file mode 100644 index ad6ace7..0000000 --- a/csharp/docs/GetMessages.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.GetMessages - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Messages** | [**List<GetMessagesMessagesInner>**](GetMessagesMessagesInner.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetMessagesMessagesInner.md b/csharp/docs/GetMessagesMessagesInner.md deleted file mode 100644 index b4ffc21..0000000 --- a/csharp/docs/GetMessagesMessagesInner.md +++ /dev/null @@ -1,24 +0,0 @@ -# OneMessage.io.Model.GetMessagesMessagesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessageNumber** | **int** | | [optional] -**Id** | **string** | | [optional] -**Body** | **string** | | [optional] -**FromMe** | **bool** | | [optional] -**Self** | **int** | | [optional] -**IsForwarded** | **int** | | [optional] -**Author** | **string** | | [optional] -**Time** | **int** | | [optional] -**ChatId** | **string** | | [optional] -**Type** | **string** | | [optional] -**SenderName** | **string** | | [optional] -**Caption** | **string** | | [optional] -**QuotedMsgId** | **string** | | [optional] -**Metadata** | **Object** | | [optional] -**ChatName** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetTemplates.md b/csharp/docs/GetTemplates.md deleted file mode 100644 index d55f07a..0000000 --- a/csharp/docs/GetTemplates.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.GetTemplates - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Total** | **int** | | [optional] -**Templates** | [**List<GetTemplatesTemplatesInner>**](GetTemplatesTemplatesInner.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/GetTemplatesTemplatesInner.md b/csharp/docs/GetTemplatesTemplatesInner.md deleted file mode 100644 index 2d5f815..0000000 --- a/csharp/docs/GetTemplatesTemplatesInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.GetTemplatesTemplatesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Category** | **TemplateCategoryProp** | | [optional] -**Components** | [**TemplateComponentsProp**](TemplateComponentsProp.md) | | [optional] -**Language** | **TemplateLanguageProp** | | [optional] -**Name** | **string** | | [optional] -**VarNamespace** | **string** | Can be found by method /templates | [optional] -**RejectedReason** | **string** | | [optional] -**Status** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/MeComponents.md b/csharp/docs/MeComponents.md deleted file mode 100644 index 343636c..0000000 --- a/csharp/docs/MeComponents.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.MeComponents - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**About** | **string** | Profile`s About section. | [optional] -**Address** | **string** | Address of the business | [optional] -**Description** | **string** | Description of the business. Max 256 characters | [optional] -**Email** | **string** | Business email | [optional] -**Phone** | **string** | Linked phone number | [optional] -**Vertical** | **string** | Industry of the business | [optional] -**Photo** | **string** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/MediaApi.md b/csharp/docs/MediaApi.md deleted file mode 100644 index 8a61979..0000000 --- a/csharp/docs/MediaApi.md +++ /dev/null @@ -1,104 +0,0 @@ -# OneMessage.io.Api.MediaApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|--------|--------------|-------------| -| [**UploadMedia**](MediaApi.md#uploadmedia) | **POST** /uploadMedia | Upload media & get mediaId | - - -# **UploadMedia** -> MediaId UploadMedia (UploadMedia uploadMedia) - -Upload media & get mediaId - -Upload media and get mediaId. Uploaded media can be sent in template - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class UploadMediaExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MediaApi(config); - var uploadMedia = new UploadMedia(); // UploadMedia | - - try - { - // Upload media & get mediaId - MediaId result = apiInstance.UploadMedia(uploadMedia); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MediaApi.UploadMedia: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the UploadMediaWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Upload media & get mediaId - ApiResponse response = apiInstance.UploadMediaWithHttpInfo(uploadMedia); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MediaApi.UploadMediaWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **uploadMedia** | [**UploadMedia**](UploadMedia.md) | | | - -### Return type - -[**MediaId**](MediaId.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp/docs/MediaId.md b/csharp/docs/MediaId.md deleted file mode 100644 index 2d7777e..0000000 --- a/csharp/docs/MediaId.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.MediaId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarMediaId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/Message.md b/csharp/docs/Message.md deleted file mode 100644 index e01515a..0000000 --- a/csharp/docs/Message.md +++ /dev/null @@ -1,21 +0,0 @@ -# OneMessage.io.Model.Message - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | unique id | [optional] -**Body** | **string** | text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" | [optional] -**FromMe** | **bool** | true - outgoing, false - incoming | [optional] -**Self** | **int** | 1 - generated by api, 0 - generated by app | [optional] -**IsForwarded** | **bool** | true - forwarded message, false - direct message | [optional] -**Author** | **string** | Author ID of the message | [optional] -**Time** | **int** | send time, unix timestamp | [optional] -**ChatId** | **string** | chat ID | [optional] -**Type** | **string** | type of the message | [optional] -**SenderName** | **string** | Sender name | [optional] -**Caption** | **string** | File caption or filename | [optional] -**QuotedMsgId** | **string** | ID of quoted message | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/MessageIdProp.md b/csharp/docs/MessageIdProp.md deleted file mode 100644 index 703d90e..0000000 --- a/csharp/docs/MessageIdProp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.MessageIdProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessageId** | **string** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/MessagingApi.md b/csharp/docs/MessagingApi.md deleted file mode 100644 index 3f9563d..0000000 --- a/csharp/docs/MessagingApi.md +++ /dev/null @@ -1,698 +0,0 @@ -# OneMessage.io.Api.MessagingApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|--------|--------------|-------------| -| [**MessagesList**](MessagingApi.md#messageslist) | **GET** /messages | Get messages list | -| [**ReadMessage**](MessagingApi.md#readmessage) | **POST** /readMessage | Mark message as read | -| [**SendContact**](MessagingApi.md#sendcontact) | **POST** /sendContact | Send a Contact | -| [**SendFile**](MessagingApi.md#sendfile) | **POST** /sendFile | Send a File | -| [**SendList**](MessagingApi.md#sendlist) | **POST** /sendList | Send List Message | -| [**SendLocation**](MessagingApi.md#sendlocation) | **POST** /sendLocation | Send a Location | -| [**SendMessage**](MessagingApi.md#sendmessage) | **POST** /sendMessage | Send a Message | - - -# **MessagesList** -> GetMessages MessagesList (bool? last = null, int? lastMessageNumber = null, int? firstMessageNumber = null, int? limit = null, string chatId = null, int? minTime = null, int? maxTime = null, string msgId = null) - -Get messages list - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class MessagesListExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var last = true; // bool? | Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - var lastMessageNumber = 100; // int? | The lastMessageNumber parameter from the last response. Example: 100 (optional) - var firstMessageNumber = 1; // int? | The firstMessageNumber parameter from the last response. Example: 1 (optional) - var limit = 200; // int? | Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - var chatId = 556123122026@c.us; // string | Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - var minTime = 1665396610; // int? | Filter messages received after specified time. Example: 1665396610 (optional) - var maxTime = 1665396610; // int? | Filter messages received before specified time. Example: 1665396610 (optional) - var msgId = 0XzkmGNn4prUAQlzsHApGNRXQ0U; // string | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - - try - { - // Get messages list - GetMessages result = apiInstance.MessagesList(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.MessagesList: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the MessagesListWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get messages list - ApiResponse response = apiInstance.MessagesListWithHttpInfo(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.MessagesListWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **last** | **bool?** | Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. | [optional] | -| **lastMessageNumber** | **int?** | The lastMessageNumber parameter from the last response. Example: 100 | [optional] | -| **firstMessageNumber** | **int?** | The firstMessageNumber parameter from the last response. Example: 1 | [optional] | -| **limit** | **int?** | Sets length of the message list. Default 100. With value 0 returns all messages. | [optional] | -| **chatId** | **string** | Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us | [optional] | -| **minTime** | **int?** | Filter messages received after specified time. Example: 1665396610 | [optional] | -| **maxTime** | **int?** | Filter messages received before specified time. Example: 1665396610 | [optional] | -| **msgId** | **string** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] | - -### Return type - -[**GetMessages**](GetMessages.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **ReadMessage** -> SetMe ReadMessage (ReadMessageRequest readMessageRequest = null) - -Mark message as read - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class ReadMessageExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var readMessageRequest = new ReadMessageRequest(); // ReadMessageRequest | (optional) - - try - { - // Mark message as read - SetMe result = apiInstance.ReadMessage(readMessageRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.ReadMessage: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the ReadMessageWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Mark message as read - ApiResponse response = apiInstance.ReadMessageWithHttpInfo(readMessageRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.ReadMessageWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **readMessageRequest** | [**ReadMessageRequest**](ReadMessageRequest.md) | | [optional] | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SendContact** -> SendMessageStatus SendContact (SendContactRequest sendContactRequest) - -Send a Contact - -Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendContactExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var sendContactRequest = new SendContactRequest(); // SendContactRequest | - - try - { - // Send a Contact - SendMessageStatus result = apiInstance.SendContact(sendContactRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.SendContact: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendContactWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send a Contact - ApiResponse response = apiInstance.SendContactWithHttpInfo(sendContactRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.SendContactWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendContactRequest** | [**SendContactRequest**](SendContactRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SendFile** -> SendMessageStatus SendFile (SendFileRequest sendFileRequest) - -Send a File - -Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendFileExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var sendFileRequest = new SendFileRequest(); // SendFileRequest | - - try - { - // Send a File - SendMessageStatus result = apiInstance.SendFile(sendFileRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.SendFile: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendFileWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send a File - ApiResponse response = apiInstance.SendFileWithHttpInfo(sendFileRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.SendFileWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendFileRequest** | [**SendFileRequest**](SendFileRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SendList** -> SendMessageStatus SendList (SendListRequest sendListRequest) - -Send List Message - -Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendListExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var sendListRequest = new SendListRequest(); // SendListRequest | - - try - { - // Send List Message - SendMessageStatus result = apiInstance.SendList(sendListRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.SendList: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendListWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send List Message - ApiResponse response = apiInstance.SendListWithHttpInfo(sendListRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.SendListWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendListRequest** | [**SendListRequest**](SendListRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SendLocation** -> SendMessageStatus SendLocation (SendLocationRequest sendLocationRequest) - -Send a Location - -Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendLocationExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var sendLocationRequest = new SendLocationRequest(); // SendLocationRequest | - - try - { - // Send a Location - SendMessageStatus result = apiInstance.SendLocation(sendLocationRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.SendLocation: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendLocationWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send a Location - ApiResponse response = apiInstance.SendLocationWithHttpInfo(sendLocationRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.SendLocationWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendLocationRequest** | [**SendLocationRequest**](SendLocationRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SendMessage** -> SendMessageStatus SendMessage (SendMessageRequest sendMessageRequest) - -Send a Message - -Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendMessageExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new MessagingApi(config); - var sendMessageRequest = new SendMessageRequest(); // SendMessageRequest | - - try - { - // Send a Message - SendMessageStatus result = apiInstance.SendMessage(sendMessageRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling MessagingApi.SendMessage: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendMessageWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send a Message - ApiResponse response = apiInstance.SendMessageWithHttpInfo(sendMessageRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling MessagingApi.SendMessageWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendMessageRequest** | [**SendMessageRequest**](SendMessageRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp/docs/PhoneProp.md b/csharp/docs/PhoneProp.md deleted file mode 100644 index 7fe110d..0000000 --- a/csharp/docs/PhoneProp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.PhoneProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/ProductsCatalogsApi.md b/csharp/docs/ProductsCatalogsApi.md deleted file mode 100644 index 0879ec8..0000000 --- a/csharp/docs/ProductsCatalogsApi.md +++ /dev/null @@ -1,202 +0,0 @@ -# OneMessage.io.Api.ProductsCatalogsApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|--------|--------------|-------------| -| [**SendProduct**](ProductsCatalogsApi.md#sendproduct) | **POST** /sendProduct | Send a Product | -| [**SetCommerce**](ProductsCatalogsApi.md#setcommerce) | **POST** /commerce | Set Commerce Settings | - - -# **SendProduct** -> SendMessageStatus SendProduct (SendProductRequest sendProductRequest) - -Send a Product - -Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendProductExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ProductsCatalogsApi(config); - var sendProductRequest = new SendProductRequest(); // SendProductRequest | - - try - { - // Send a Product - SendMessageStatus result = apiInstance.SendProduct(sendProductRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProductsCatalogsApi.SendProduct: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendProductWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send a Product - ApiResponse response = apiInstance.SendProductWithHttpInfo(sendProductRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ProductsCatalogsApi.SendProductWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendProductRequest** | [**SendProductRequest**](SendProductRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SetCommerce** -> SetCommerce SetCommerce (Commerce commerce) - -Set Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SetCommerceExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ProductsCatalogsApi(config); - var commerce = new Commerce(); // Commerce | - - try - { - // Set Commerce Settings - SetCommerce result = apiInstance.SetCommerce(commerce); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProductsCatalogsApi.SetCommerce: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SetCommerceWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Set Commerce Settings - ApiResponse response = apiInstance.SetCommerceWithHttpInfo(commerce); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling ProductsCatalogsApi.SetCommerceWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **commerce** | [**Commerce**](Commerce.md) | | | - -### Return type - -[**SetCommerce**](SetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp/docs/ReadMessageRequest.md b/csharp/docs/ReadMessageRequest.md deleted file mode 100644 index 2a9faba..0000000 --- a/csharp/docs/ReadMessageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.ReadMessageRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessageId** | **string** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/RemoveTemplateRequest.md b/csharp/docs/RemoveTemplateRequest.md deleted file mode 100644 index ce443c1..0000000 --- a/csharp/docs/RemoveTemplateRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.RemoveTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Template name | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendContactRequest.md b/csharp/docs/SendContactRequest.md deleted file mode 100644 index acf81fd..0000000 --- a/csharp/docs/SendContactRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.SendContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Contacts** | **List<Object>** | Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendFileRequest.md b/csharp/docs/SendFileRequest.md deleted file mode 100644 index bdf96f5..0000000 --- a/csharp/docs/SendFileRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneMessage.io.Model.SendFileRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Body** | **string** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | -**Filename** | **string** | File name, for *example 1.jpg* or *hello.xlsx* | -**Caption** | **string** | Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendListRequest.md b/csharp/docs/SendListRequest.md deleted file mode 100644 index 5163802..0000000 --- a/csharp/docs/SendListRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.SendListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Body** | **string** | Main message text | -**Header** | **string** | Header will be located above message text | [optional] -**Footer** | **string** | Footer will be placed under message text | [optional] -**Action** | **string** | Action for open list | -**Sections** | [**List<SendListRequestAllOfSections>**](SendListRequestAllOfSections.md) | Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendListRequestAllOfRows.md b/csharp/docs/SendListRequestAllOfRows.md deleted file mode 100644 index 4ff0aec..0000000 --- a/csharp/docs/SendListRequestAllOfRows.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.SendListRequestAllOfRows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | Unique id for option, up to 200 symbols | -**Title** | **string** | Title of option, up to 24 symbols. | -**Description** | **string** | Description of option, up to 72 symbols | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendListRequestAllOfSections.md b/csharp/docs/SendListRequestAllOfSections.md deleted file mode 100644 index e5b060f..0000000 --- a/csharp/docs/SendListRequestAllOfSections.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.SendListRequestAllOfSections - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | Title of section, up to 24 symbols. Required if there are more then 1 section | [optional] -**Rows** | [**List<SendListRequestAllOfRows>**](SendListRequestAllOfRows.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendLocationRequest.md b/csharp/docs/SendLocationRequest.md deleted file mode 100644 index 5dc830a..0000000 --- a/csharp/docs/SendLocationRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# OneMessage.io.Model.SendLocationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Lat** | **string** | Latitude of the location. Example: 45.018337 | -**Lng** | **string** | Longitude of the location. Example: -73.968285 | -**Address** | **string** | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 | [optional] -**Name** | **string** | Name of the location. Example: Facebook HQ | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendMessageRequest.md b/csharp/docs/SendMessageRequest.md deleted file mode 100644 index 9289051..0000000 --- a/csharp/docs/SendMessageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.SendMessageRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Body** | **string** | Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendMessageStatus.md b/csharp/docs/SendMessageStatus.md deleted file mode 100644 index aee79ea..0000000 --- a/csharp/docs/SendMessageStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# OneMessage.io.Model.SendMessageStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Sent** | **bool** | | [optional] -**Id** | **string** | unique message id | [optional] -**Message** | **string** | Posting status message | [optional] -**Description** | **string** | Result description | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendProductRequest.md b/csharp/docs/SendProductRequest.md deleted file mode 100644 index 9c0735a..0000000 --- a/csharp/docs/SendProductRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# OneMessage.io.Model.SendProductRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Action** | [**SendProductRequestAllOfAction**](SendProductRequestAllOfAction.md) | | -**Body** | **string** | Text of message. Example: Some text. | [optional] -**Footer** | **string** | Located under the message text. Example: Footer. | [optional] -**Header** | **string** | Header of catalog. Example: Header. **Required when sending the catalog.** | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendProductRequestAllOfAction.md b/csharp/docs/SendProductRequestAllOfAction.md deleted file mode 100644 index bbc9406..0000000 --- a/csharp/docs/SendProductRequestAllOfAction.md +++ /dev/null @@ -1,13 +0,0 @@ -# OneMessage.io.Model.SendProductRequestAllOfAction -Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CatalogId** | **string** | id of the catalog | [optional] -**ProductRetailerId** | **string** | id of the product | [optional] -**Sections** | [**List<SendProductRequestAllOfActionSections>**](SendProductRequestAllOfActionSections.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendProductRequestAllOfActionProductItems.md b/csharp/docs/SendProductRequestAllOfActionProductItems.md deleted file mode 100644 index b8e7a05..0000000 --- a/csharp/docs/SendProductRequestAllOfActionProductItems.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.SendProductRequestAllOfActionProductItems - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ProductRetailerId** | **string** | id of the product | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendProductRequestAllOfActionSections.md b/csharp/docs/SendProductRequestAllOfActionSections.md deleted file mode 100644 index d07a564..0000000 --- a/csharp/docs/SendProductRequestAllOfActionSections.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.SendProductRequestAllOfActionSections - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | Title of the section. Example: the-section-title | [optional] -**ProductItems** | [**List<SendProductRequestAllOfActionProductItems>**](SendProductRequestAllOfActionProductItems.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequest.md b/csharp/docs/SendTemplateRequest.md deleted file mode 100644 index e17f584..0000000 --- a/csharp/docs/SendTemplateRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarNamespace** | **string** | Can be found by method /templates | -**ChatId** | **string** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**Phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**Template** | **string** | Name of template | -**Language** | [**SendTemplateRequestAllOfLanguage**](SendTemplateRequestAllOfLanguage.md) | | -**VarParams** | [**List<SendTemplateRequestAllOfParams>**](SendTemplateRequestAllOfParams.md) | Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequestAllOfCurrency.md b/csharp/docs/SendTemplateRequestAllOfCurrency.md deleted file mode 100644 index 6e04c01..0000000 --- a/csharp/docs/SendTemplateRequestAllOfCurrency.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequestAllOfCurrency - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CurrencyCode** | **string** | | [optional] -**Amount1000** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequestAllOfDateTime.md b/csharp/docs/SendTemplateRequestAllOfDateTime.md deleted file mode 100644 index 5fb358f..0000000 --- a/csharp/docs/SendTemplateRequestAllOfDateTime.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequestAllOfDateTime - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Component** | [**SendTemplateRequestAllOfDateTimeComponent**](SendTemplateRequestAllOfDateTimeComponent.md) | | [optional] -**UnixEpoch** | [**SendTemplateRequestAllOfDateTimeUnixEpoch**](SendTemplateRequestAllOfDateTimeUnixEpoch.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequestAllOfDateTimeComponent.md b/csharp/docs/SendTemplateRequestAllOfDateTimeComponent.md deleted file mode 100644 index 8a298be..0000000 --- a/csharp/docs/SendTemplateRequestAllOfDateTimeComponent.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequestAllOfDateTimeComponent - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DayOfWeek** | **string** | | [optional] -**Year** | **int** | | [optional] -**Month** | **int** | | [optional] -**DayOfMonth** | **int** | | [optional] -**Hour** | **int** | | [optional] -**Minute** | **int** | | [optional] -**Calendar** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md b/csharp/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md deleted file mode 100644 index 669390f..0000000 --- a/csharp/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequestAllOfDateTimeUnixEpoch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Timestamp** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequestAllOfLanguage.md b/csharp/docs/SendTemplateRequestAllOfLanguage.md deleted file mode 100644 index aae8745..0000000 --- a/csharp/docs/SendTemplateRequestAllOfLanguage.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequestAllOfLanguage -Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Policy** | **string** | | [optional] -**Code** | **TemplateLanguageProp** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SendTemplateRequestAllOfParams.md b/csharp/docs/SendTemplateRequestAllOfParams.md deleted file mode 100644 index 1cafcad..0000000 --- a/csharp/docs/SendTemplateRequestAllOfParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMessage.io.Model.SendTemplateRequestAllOfParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarDefault** | **string** | | [optional] -**Currency** | [**SendTemplateRequestAllOfCurrency**](SendTemplateRequestAllOfCurrency.md) | | [optional] -**DateTime** | [**SendTemplateRequestAllOfDateTime**](SendTemplateRequestAllOfDateTime.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SetCommerce.md b/csharp/docs/SetCommerce.md deleted file mode 100644 index 4435eff..0000000 --- a/csharp/docs/SetCommerce.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.SetCommerce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SetMe.md b/csharp/docs/SetMe.md deleted file mode 100644 index a0c64a8..0000000 --- a/csharp/docs/SetMe.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.SetMe - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SetMeRequest.md b/csharp/docs/SetMeRequest.md deleted file mode 100644 index 713bda2..0000000 --- a/csharp/docs/SetMeRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# OneMessage.io.Model.SetMeRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**About** | **string** | Profile`s About section. | [optional] -**Address** | **string** | Address of the business | [optional] -**Description** | **string** | Description of the business. Max 256 characters | [optional] -**Email** | **string** | Business email | [optional] -**Phone** | **string** | Linked phone number | [optional] -**Vertical** | **string** | Industry of the business | [optional] -**Photo** | **string** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SetSettings200Response.md b/csharp/docs/SetSettings200Response.md deleted file mode 100644 index 31e62e1..0000000 --- a/csharp/docs/SetSettings200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.SetSettings200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WebhookUrl** | **string** | | [optional] -**Update** | [**SetSettings200ResponseAllOfUpdate**](SetSettings200ResponseAllOfUpdate.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SetSettings200ResponseAllOfUpdate.md b/csharp/docs/SetSettings200ResponseAllOfUpdate.md deleted file mode 100644 index c8405d6..0000000 --- a/csharp/docs/SetSettings200ResponseAllOfUpdate.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.SetSettings200ResponseAllOfUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WebhookUrl** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/SetWebhookStatus.md b/csharp/docs/SetWebhookStatus.md deleted file mode 100644 index 439bce9..0000000 --- a/csharp/docs/SetWebhookStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMessage.io.Model.SetWebhookStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Set** | **bool** | Flag indicating that the current request has changed webhook | [optional] -**Message** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/Settings.md b/csharp/docs/Settings.md deleted file mode 100644 index bd06ff6..0000000 --- a/csharp/docs/Settings.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.Settings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WebhookUrl** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplateCategoryProp.md b/csharp/docs/TemplateCategoryProp.md deleted file mode 100644 index 558c8d0..0000000 --- a/csharp/docs/TemplateCategoryProp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.TemplateCategoryProp -Template category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplateComponentsProp.md b/csharp/docs/TemplateComponentsProp.md deleted file mode 100644 index 52e399d..0000000 --- a/csharp/docs/TemplateComponentsProp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.TemplateComponentsProp -Array of template components - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplateComponentsPropInner.md b/csharp/docs/TemplateComponentsPropInner.md deleted file mode 100644 index f71b7ca..0000000 --- a/csharp/docs/TemplateComponentsPropInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneMessage.io.Model.TemplateComponentsPropInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**Format** | **string** | Only for HEADER type | [optional] -**Text** | **string** | | [optional] -**Example** | **Object** | | [optional] -**Buttons** | [**List<TemplateComponentsPropInnerButtonsInner>**](TemplateComponentsPropInnerButtonsInner.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplateComponentsPropInnerButtonsInner.md b/csharp/docs/TemplateComponentsPropInnerButtonsInner.md deleted file mode 100644 index 0b1a187..0000000 --- a/csharp/docs/TemplateComponentsPropInnerButtonsInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneMessage.io.Model.TemplateComponentsPropInnerButtonsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**Text** | **string** | | [optional] -**Url** | **string** | | [optional] -**PhoneNumber** | **string** | | [optional] -**Example** | **List<Object>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplateLanguageProp.md b/csharp/docs/TemplateLanguageProp.md deleted file mode 100644 index 4990f5e..0000000 --- a/csharp/docs/TemplateLanguageProp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.TemplateLanguageProp -Template language - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplateNamespaceField.md b/csharp/docs/TemplateNamespaceField.md deleted file mode 100644 index 12e22f6..0000000 --- a/csharp/docs/TemplateNamespaceField.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.TemplateNamespaceField - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarNamespace** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/TemplatesApi.md b/csharp/docs/TemplatesApi.md deleted file mode 100644 index 05137f0..0000000 --- a/csharp/docs/TemplatesApi.md +++ /dev/null @@ -1,389 +0,0 @@ -# OneMessage.io.Api.TemplatesApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|--------|--------------|-------------| -| [**AddTemplate**](TemplatesApi.md#addtemplate) | **POST** /addTemplate | Create template | -| [**RemoveTemplate**](TemplatesApi.md#removetemplate) | **POST** /removeTemplate | Remove template | -| [**SendTemplate**](TemplatesApi.md#sendtemplate) | **POST** /sendTemplate | Send Template Message | -| [**TemplatesList**](TemplatesApi.md#templateslist) | **GET** /templates | Get templates list | - - -# **AddTemplate** -> Object AddTemplate (AddTemplateRequest addTemplateRequest) - -Create template - -Create new template for sending. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class AddTemplateExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new TemplatesApi(config); - var addTemplateRequest = new AddTemplateRequest(); // AddTemplateRequest | - - try - { - // Create template - Object result = apiInstance.AddTemplate(addTemplateRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TemplatesApi.AddTemplate: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the AddTemplateWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Create template - ApiResponse response = apiInstance.AddTemplateWithHttpInfo(addTemplateRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling TemplatesApi.AddTemplateWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **addTemplateRequest** | [**AddTemplateRequest**](AddTemplateRequest.md) | | | - -### Return type - -**Object** - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **RemoveTemplate** -> SetMe RemoveTemplate (RemoveTemplateRequest removeTemplateRequest) - -Remove template - -Deleted template can not be restored. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class RemoveTemplateExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new TemplatesApi(config); - var removeTemplateRequest = new RemoveTemplateRequest(); // RemoveTemplateRequest | - - try - { - // Remove template - SetMe result = apiInstance.RemoveTemplate(removeTemplateRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TemplatesApi.RemoveTemplate: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the RemoveTemplateWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Remove template - ApiResponse response = apiInstance.RemoveTemplateWithHttpInfo(removeTemplateRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling TemplatesApi.RemoveTemplateWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **removeTemplateRequest** | [**RemoveTemplateRequest**](RemoveTemplateRequest.md) | | | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SendTemplate** -> SendMessageStatus SendTemplate (SendTemplateRequest sendTemplateRequest) - -Send Template Message - -Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SendTemplateExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new TemplatesApi(config); - var sendTemplateRequest = new SendTemplateRequest(); // SendTemplateRequest | - - try - { - // Send Template Message - SendMessageStatus result = apiInstance.SendTemplate(sendTemplateRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TemplatesApi.SendTemplate: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SendTemplateWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send Template Message - ApiResponse response = apiInstance.SendTemplateWithHttpInfo(sendTemplateRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling TemplatesApi.SendTemplateWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **sendTemplateRequest** | [**SendTemplateRequest**](SendTemplateRequest.md) | | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **TemplatesList** -> GetTemplates TemplatesList () - -Get templates list - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class TemplatesListExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new TemplatesApi(config); - - try - { - // Get templates list - GetTemplates result = apiInstance.TemplatesList(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TemplatesApi.TemplatesList: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the TemplatesListWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get templates list - ApiResponse response = apiInstance.TemplatesListWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling TemplatesApi.TemplatesListWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters -This endpoint does not need any parameter. -### Return type - -[**GetTemplates**](GetTemplates.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp/docs/UploadMedia.md b/csharp/docs/UploadMedia.md deleted file mode 100644 index c93932c..0000000 --- a/csharp/docs/UploadMedia.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.UploadMedia - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Body** | **string** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/WebhookUrl.md b/csharp/docs/WebhookUrl.md deleted file mode 100644 index fdb2598..0000000 --- a/csharp/docs/WebhookUrl.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMessage.io.Model.WebhookUrl - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarWebhookUrl** | **string** | Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp/docs/WebhooksApi.md b/csharp/docs/WebhooksApi.md deleted file mode 100644 index 777c7dd..0000000 --- a/csharp/docs/WebhooksApi.md +++ /dev/null @@ -1,200 +0,0 @@ -# OneMessage.io.Api.WebhooksApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|--------|--------------|-------------| -| [**AckHookInfo**](WebhooksApi.md#ackhookinfo) | **GET** /hookInfo | Check ACKs | -| [**SetWebhook**](WebhooksApi.md#setwebhook) | **POST** /webhook | Set webhook | - - -# **AckHookInfo** -> GetAckInfo AckHookInfo (string messageId) - -Check ACKs - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class AckHookInfoExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new WebhooksApi(config); - var messageId = 0XzkmGNn4prUAQlzsHApGNRXQ0U; // string | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - - try - { - // Check ACKs - GetAckInfo result = apiInstance.AckHookInfo(messageId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling WebhooksApi.AckHookInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the AckHookInfoWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Check ACKs - ApiResponse response = apiInstance.AckHookInfoWithHttpInfo(messageId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WebhooksApi.AckHookInfoWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **messageId** | **string** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | | - -### Return type - -[**GetAckInfo**](GetAckInfo.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SetWebhook** -> SetWebhookStatus SetWebhook (WebhookUrl webhookUrl) - -Set webhook - -Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class SetWebhookExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new WebhooksApi(config); - var webhookUrl = new WebhookUrl(); // WebhookUrl | - - try - { - // Set webhook - SetWebhookStatus result = apiInstance.SetWebhook(webhookUrl); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling WebhooksApi.SetWebhook: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -#### Using the SetWebhookWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Set webhook - ApiResponse response = apiInstance.SetWebhookWithHttpInfo(webhookUrl); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WebhooksApi.SetWebhookWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **webhookUrl** | [**WebhookUrl**](WebhookUrl.md) | | | - -### Return type - -[**SetWebhookStatus**](SetWebhookStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp/git_push.sh b/csharp/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/csharp/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/csharp/src/OneMessage.io.Test/Api/ChannelApiTests.cs b/csharp/src/OneMessage.io.Test/Api/ChannelApiTests.cs deleted file mode 100644 index 651b15b..0000000 --- a/csharp/src/OneMessage.io.Test/Api/ChannelApiTests.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using OneMessage.io.Client; -using OneMessage.io.Api; -// uncomment below to import models -//using OneMessage.io.Model; - -namespace OneMessage.io.Test.Api -{ - /// - /// Class for testing ChannelApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class ChannelApiTests : IDisposable - { - private ChannelApi instance; - - public ChannelApiTests() - { - instance = new ChannelApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ChannelApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' ChannelApi - //Assert.IsType(instance); - } - - /// - /// Test GetCommerce - /// - [Fact] - public void GetCommerceTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetCommerce(); - //Assert.IsType(response); - } - - /// - /// Test GetExtendedStatistics - /// - [Fact] - public void GetExtendedStatisticsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetExtendedStatistics(); - //Assert.IsType(response); - } - - /// - /// Test GetMe - /// - [Fact] - public void GetMeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetMe(); - //Assert.IsType(response); - } - - /// - /// Test GetSettings - /// - [Fact] - public void GetSettingsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetSettings(); - //Assert.IsType(response); - } - - /// - /// Test GetStatistics - /// - [Fact] - public void GetStatisticsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string? date = null; - //var response = instance.GetStatistics(date); - //Assert.IsType(response); - } - - /// - /// Test GetStatus - /// - [Fact] - public void GetStatusTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetStatus(); - //Assert.IsType(response); - } - - /// - /// Test OutputIP - /// - [Fact] - public void OutputIPTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.OutputIP(); - //Assert.IsType(response); - } - - /// - /// Test SetMe - /// - [Fact] - public void SetMeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SetMeRequest setMeRequest = null; - //var response = instance.SetMe(setMeRequest); - //Assert.IsType(response); - } - - /// - /// Test SetSettings - /// - [Fact] - public void SetSettingsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Settings settings = null; - //var response = instance.SetSettings(settings); - //Assert.IsType(response); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Api/MediaApiTests.cs b/csharp/src/OneMessage.io.Test/Api/MediaApiTests.cs deleted file mode 100644 index baacf6d..0000000 --- a/csharp/src/OneMessage.io.Test/Api/MediaApiTests.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using OneMessage.io.Client; -using OneMessage.io.Api; -// uncomment below to import models -//using OneMessage.io.Model; - -namespace OneMessage.io.Test.Api -{ - /// - /// Class for testing MediaApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class MediaApiTests : IDisposable - { - private MediaApi instance; - - public MediaApiTests() - { - instance = new MediaApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MediaApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' MediaApi - //Assert.IsType(instance); - } - - /// - /// Test UploadMedia - /// - [Fact] - public void UploadMediaTest() - { - // TODO uncomment below to test the method and replace null with proper value - //UploadMedia uploadMedia = null; - //var response = instance.UploadMedia(uploadMedia); - //Assert.IsType(response); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Api/MessagingApiTests.cs b/csharp/src/OneMessage.io.Test/Api/MessagingApiTests.cs deleted file mode 100644 index 7df2394..0000000 --- a/csharp/src/OneMessage.io.Test/Api/MessagingApiTests.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using OneMessage.io.Client; -using OneMessage.io.Api; -// uncomment below to import models -//using OneMessage.io.Model; - -namespace OneMessage.io.Test.Api -{ - /// - /// Class for testing MessagingApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class MessagingApiTests : IDisposable - { - private MessagingApi instance; - - public MessagingApiTests() - { - instance = new MessagingApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MessagingApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' MessagingApi - //Assert.IsType(instance); - } - - /// - /// Test MessagesList - /// - [Fact] - public void MessagesListTest() - { - // TODO uncomment below to test the method and replace null with proper value - //bool? last = null; - //int? lastMessageNumber = null; - //int? firstMessageNumber = null; - //int? limit = null; - //string? chatId = null; - //int? minTime = null; - //int? maxTime = null; - //string? msgId = null; - //var response = instance.MessagesList(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - //Assert.IsType(response); - } - - /// - /// Test ReadMessage - /// - [Fact] - public void ReadMessageTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ReadMessageRequest? readMessageRequest = null; - //var response = instance.ReadMessage(readMessageRequest); - //Assert.IsType(response); - } - - /// - /// Test SendContact - /// - [Fact] - public void SendContactTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendContactRequest sendContactRequest = null; - //var response = instance.SendContact(sendContactRequest); - //Assert.IsType(response); - } - - /// - /// Test SendFile - /// - [Fact] - public void SendFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendFileRequest sendFileRequest = null; - //var response = instance.SendFile(sendFileRequest); - //Assert.IsType(response); - } - - /// - /// Test SendList - /// - [Fact] - public void SendListTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendListRequest sendListRequest = null; - //var response = instance.SendList(sendListRequest); - //Assert.IsType(response); - } - - /// - /// Test SendLocation - /// - [Fact] - public void SendLocationTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendLocationRequest sendLocationRequest = null; - //var response = instance.SendLocation(sendLocationRequest); - //Assert.IsType(response); - } - - /// - /// Test SendMessage - /// - [Fact] - public void SendMessageTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendMessageRequest sendMessageRequest = null; - //var response = instance.SendMessage(sendMessageRequest); - //Assert.IsType(response); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Api/ProductsCatalogsApiTests.cs b/csharp/src/OneMessage.io.Test/Api/ProductsCatalogsApiTests.cs deleted file mode 100644 index 9dcd94c..0000000 --- a/csharp/src/OneMessage.io.Test/Api/ProductsCatalogsApiTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using OneMessage.io.Client; -using OneMessage.io.Api; -// uncomment below to import models -//using OneMessage.io.Model; - -namespace OneMessage.io.Test.Api -{ - /// - /// Class for testing ProductsCatalogsApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class ProductsCatalogsApiTests : IDisposable - { - private ProductsCatalogsApi instance; - - public ProductsCatalogsApiTests() - { - instance = new ProductsCatalogsApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ProductsCatalogsApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' ProductsCatalogsApi - //Assert.IsType(instance); - } - - /// - /// Test SendProduct - /// - [Fact] - public void SendProductTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendProductRequest sendProductRequest = null; - //var response = instance.SendProduct(sendProductRequest); - //Assert.IsType(response); - } - - /// - /// Test SetCommerce - /// - [Fact] - public void SetCommerceTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Commerce commerce = null; - //var response = instance.SetCommerce(commerce); - //Assert.IsType(response); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Api/TemplatesApiTests.cs b/csharp/src/OneMessage.io.Test/Api/TemplatesApiTests.cs deleted file mode 100644 index 9f6bd1b..0000000 --- a/csharp/src/OneMessage.io.Test/Api/TemplatesApiTests.cs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using OneMessage.io.Client; -using OneMessage.io.Api; -// uncomment below to import models -//using OneMessage.io.Model; - -namespace OneMessage.io.Test.Api -{ - /// - /// Class for testing TemplatesApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class TemplatesApiTests : IDisposable - { - private TemplatesApi instance; - - public TemplatesApiTests() - { - instance = new TemplatesApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplatesApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' TemplatesApi - //Assert.IsType(instance); - } - - /// - /// Test AddTemplate - /// - [Fact] - public void AddTemplateTest() - { - // TODO uncomment below to test the method and replace null with proper value - //AddTemplateRequest addTemplateRequest = null; - //var response = instance.AddTemplate(addTemplateRequest); - //Assert.IsType(response); - } - - /// - /// Test RemoveTemplate - /// - [Fact] - public void RemoveTemplateTest() - { - // TODO uncomment below to test the method and replace null with proper value - //RemoveTemplateRequest removeTemplateRequest = null; - //var response = instance.RemoveTemplate(removeTemplateRequest); - //Assert.IsType(response); - } - - /// - /// Test SendTemplate - /// - [Fact] - public void SendTemplateTest() - { - // TODO uncomment below to test the method and replace null with proper value - //SendTemplateRequest sendTemplateRequest = null; - //var response = instance.SendTemplate(sendTemplateRequest); - //Assert.IsType(response); - } - - /// - /// Test TemplatesList - /// - [Fact] - public void TemplatesListTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.TemplatesList(); - //Assert.IsType(response); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Api/WebhooksApiTests.cs b/csharp/src/OneMessage.io.Test/Api/WebhooksApiTests.cs deleted file mode 100644 index bbd0f2c..0000000 --- a/csharp/src/OneMessage.io.Test/Api/WebhooksApiTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using OneMessage.io.Client; -using OneMessage.io.Api; -// uncomment below to import models -//using OneMessage.io.Model; - -namespace OneMessage.io.Test.Api -{ - /// - /// Class for testing WebhooksApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class WebhooksApiTests : IDisposable - { - private WebhooksApi instance; - - public WebhooksApiTests() - { - instance = new WebhooksApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of WebhooksApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' WebhooksApi - //Assert.IsType(instance); - } - - /// - /// Test AckHookInfo - /// - [Fact] - public void AckHookInfoTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string messageId = null; - //var response = instance.AckHookInfo(messageId); - //Assert.IsType(response); - } - - /// - /// Test SetWebhook - /// - [Fact] - public void SetWebhookTest() - { - // TODO uncomment below to test the method and replace null with proper value - //WebhookUrl webhookUrl = null; - //var response = instance.SetWebhook(webhookUrl); - //Assert.IsType(response); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/AckTests.cs b/csharp/src/OneMessage.io.Test/Model/AckTests.cs deleted file mode 100644 index 931ab25..0000000 --- a/csharp/src/OneMessage.io.Test/Model/AckTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing Ack - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AckTests : IDisposable - { - // TODO uncomment below to declare an instance variable for Ack - //private Ack instance; - - public AckTests() - { - // TODO uncomment below to create an instance of Ack - //instance = new Ack(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of Ack - /// - [Fact] - public void AckInstanceTest() - { - // TODO uncomment below to test "IsType" Ack - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/AddTemplateRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/AddTemplateRequestTests.cs deleted file mode 100644 index df95913..0000000 --- a/csharp/src/OneMessage.io.Test/Model/AddTemplateRequestTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing AddTemplateRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AddTemplateRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for AddTemplateRequest - //private AddTemplateRequest instance; - - public AddTemplateRequestTests() - { - // TODO uncomment below to create an instance of AddTemplateRequest - //instance = new AddTemplateRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of AddTemplateRequest - /// - [Fact] - public void AddTemplateRequestInstanceTest() - { - // TODO uncomment below to test "IsType" AddTemplateRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - /// - /// Test the property 'Category' - /// - [Fact] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - - /// - /// Test the property 'Components' - /// - [Fact] - public void ComponentsTest() - { - // TODO unit test for the property 'Components' - } - - /// - /// Test the property 'Language' - /// - [Fact] - public void LanguageTest() - { - // TODO unit test for the property 'Language' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsInnerTests.cs deleted file mode 100644 index 5093c55..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsInnerTests.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ChannelExtendedStatisticsInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ChannelExtendedStatisticsInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ChannelExtendedStatisticsInner - //private ChannelExtendedStatisticsInner instance; - - public ChannelExtendedStatisticsInnerTests() - { - // TODO uncomment below to create an instance of ChannelExtendedStatisticsInner - //instance = new ChannelExtendedStatisticsInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ChannelExtendedStatisticsInner - /// - [Fact] - public void ChannelExtendedStatisticsInnerInstanceTest() - { - // TODO uncomment below to test "IsType" ChannelExtendedStatisticsInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'BusinessInitiatedPaidQuantity' - /// - [Fact] - public void BusinessInitiatedPaidQuantityTest() - { - // TODO unit test for the property 'BusinessInitiatedPaidQuantity' - } - - /// - /// Test the property 'BusinessInitiatedPrice' - /// - [Fact] - public void BusinessInitiatedPriceTest() - { - // TODO unit test for the property 'BusinessInitiatedPrice' - } - - /// - /// Test the property 'BusinessInitiatedQuantity' - /// - [Fact] - public void BusinessInitiatedQuantityTest() - { - // TODO unit test for the property 'BusinessInitiatedQuantity' - } - - /// - /// Test the property 'FreeEntryPoint' - /// - [Fact] - public void FreeEntryPointTest() - { - // TODO unit test for the property 'FreeEntryPoint' - } - - /// - /// Test the property 'FreeQuantity' - /// - [Fact] - public void FreeQuantityTest() - { - // TODO unit test for the property 'FreeQuantity' - } - - /// - /// Test the property 'FreeTier' - /// - [Fact] - public void FreeTierTest() - { - // TODO unit test for the property 'FreeTier' - } - - /// - /// Test the property 'PaidQuantity' - /// - [Fact] - public void PaidQuantityTest() - { - // TODO unit test for the property 'PaidQuantity' - } - - /// - /// Test the property 'PeriodDate' - /// - [Fact] - public void PeriodDateTest() - { - // TODO unit test for the property 'PeriodDate' - } - - /// - /// Test the property 'Quantity' - /// - [Fact] - public void QuantityTest() - { - // TODO unit test for the property 'Quantity' - } - - /// - /// Test the property 'TotalPrice' - /// - [Fact] - public void TotalPriceTest() - { - // TODO unit test for the property 'TotalPrice' - } - - /// - /// Test the property 'UserInitiatedPaidQuantity' - /// - [Fact] - public void UserInitiatedPaidQuantityTest() - { - // TODO unit test for the property 'UserInitiatedPaidQuantity' - } - - /// - /// Test the property 'UserInitiatedPrice' - /// - [Fact] - public void UserInitiatedPriceTest() - { - // TODO unit test for the property 'UserInitiatedPrice' - } - - /// - /// Test the property 'UserInitiatedQuantity' - /// - [Fact] - public void UserInitiatedQuantityTest() - { - // TODO unit test for the property 'UserInitiatedQuantity' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsTests.cs b/csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsTests.cs deleted file mode 100644 index e1fd0b1..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ChannelExtendedStatisticsTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ChannelExtendedStatistics - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ChannelExtendedStatisticsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ChannelExtendedStatistics - //private ChannelExtendedStatistics instance; - - public ChannelExtendedStatisticsTests() - { - // TODO uncomment below to create an instance of ChannelExtendedStatistics - //instance = new ChannelExtendedStatistics(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ChannelExtendedStatistics - /// - [Fact] - public void ChannelExtendedStatisticsInstanceTest() - { - // TODO uncomment below to test "IsType" ChannelExtendedStatistics - //Assert.IsType(instance); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ChannelStatisticsTests.cs b/csharp/src/OneMessage.io.Test/Model/ChannelStatisticsTests.cs deleted file mode 100644 index 4069937..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ChannelStatisticsTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ChannelStatistics - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ChannelStatisticsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ChannelStatistics - //private ChannelStatistics instance; - - public ChannelStatisticsTests() - { - // TODO uncomment below to create an instance of ChannelStatistics - //instance = new ChannelStatistics(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ChannelStatistics - /// - [Fact] - public void ChannelStatisticsInstanceTest() - { - // TODO uncomment below to test "IsType" ChannelStatistics - //Assert.IsType(instance); - } - - /// - /// Test the property 'Date' - /// - [Fact] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - - /// - /// Test the property 'TemplatesCost' - /// - [Fact] - public void TemplatesCostTest() - { - // TODO unit test for the property 'TemplatesCost' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ChannelStatusTests.cs b/csharp/src/OneMessage.io.Test/Model/ChannelStatusTests.cs deleted file mode 100644 index 5986f25..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ChannelStatusTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ChannelStatus - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ChannelStatusTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ChannelStatus - //private ChannelStatus instance; - - public ChannelStatusTests() - { - // TODO uncomment below to create an instance of ChannelStatus - //instance = new ChannelStatus(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ChannelStatus - /// - [Fact] - public void ChannelStatusInstanceTest() - { - // TODO uncomment below to test "IsType" ChannelStatus - //Assert.IsType(instance); - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ChatIdPropTests.cs b/csharp/src/OneMessage.io.Test/Model/ChatIdPropTests.cs deleted file mode 100644 index 414a985..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ChatIdPropTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ChatIdProp - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ChatIdPropTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ChatIdProp - //private ChatIdProp instance; - - public ChatIdPropTests() - { - // TODO uncomment below to create an instance of ChatIdProp - //instance = new ChatIdProp(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ChatIdProp - /// - [Fact] - public void ChatIdPropInstanceTest() - { - // TODO uncomment below to test "IsType" ChatIdProp - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/CommerceParamsTests.cs b/csharp/src/OneMessage.io.Test/Model/CommerceParamsTests.cs deleted file mode 100644 index 80bfbab..0000000 --- a/csharp/src/OneMessage.io.Test/Model/CommerceParamsTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing CommerceParams - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CommerceParamsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for CommerceParams - //private CommerceParams instance; - - public CommerceParamsTests() - { - // TODO uncomment below to create an instance of CommerceParams - //instance = new CommerceParams(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of CommerceParams - /// - [Fact] - public void CommerceParamsInstanceTest() - { - // TODO uncomment below to test "IsType" CommerceParams - //Assert.IsType(instance); - } - - /// - /// Test the property 'IsCartEnabled' - /// - [Fact] - public void IsCartEnabledTest() - { - // TODO unit test for the property 'IsCartEnabled' - } - - /// - /// Test the property 'IsCatalogVisible' - /// - [Fact] - public void IsCatalogVisibleTest() - { - // TODO unit test for the property 'IsCatalogVisible' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/CommerceTests.cs b/csharp/src/OneMessage.io.Test/Model/CommerceTests.cs deleted file mode 100644 index 7f0471e..0000000 --- a/csharp/src/OneMessage.io.Test/Model/CommerceTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing Commerce - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CommerceTests : IDisposable - { - // TODO uncomment below to declare an instance variable for Commerce - //private Commerce instance; - - public CommerceTests() - { - // TODO uncomment below to create an instance of Commerce - //instance = new Commerce(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of Commerce - /// - [Fact] - public void CommerceInstanceTest() - { - // TODO uncomment below to test "IsType" Commerce - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarParams' - /// - [Fact] - public void VarParamsTest() - { - // TODO unit test for the property 'VarParams' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ContactsContactsInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/ContactsContactsInnerTests.cs deleted file mode 100644 index 20b09ef..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ContactsContactsInnerTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ContactsContactsInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ContactsContactsInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ContactsContactsInner - //private ContactsContactsInner instance; - - public ContactsContactsInnerTests() - { - // TODO uncomment below to create an instance of ContactsContactsInner - //instance = new ContactsContactsInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ContactsContactsInner - /// - [Fact] - public void ContactsContactsInnerInstanceTest() - { - // TODO uncomment below to test "IsType" ContactsContactsInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'Input' - /// - [Fact] - public void InputTest() - { - // TODO unit test for the property 'Input' - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - /// - /// Test the property 'WaId' - /// - [Fact] - public void WaIdTest() - { - // TODO unit test for the property 'WaId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ContactsRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/ContactsRequestTests.cs deleted file mode 100644 index a33cc36..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ContactsRequestTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ContactsRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ContactsRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ContactsRequest - //private ContactsRequest instance; - - public ContactsRequestTests() - { - // TODO uncomment below to create an instance of ContactsRequest - //instance = new ContactsRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ContactsRequest - /// - [Fact] - public void ContactsRequestInstanceTest() - { - // TODO uncomment below to test "IsType" ContactsRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'Blocking' - /// - [Fact] - public void BlockingTest() - { - // TODO unit test for the property 'Blocking' - } - - /// - /// Test the property 'ForceCheck' - /// - [Fact] - public void ForceCheckTest() - { - // TODO unit test for the property 'ForceCheck' - } - - /// - /// Test the property 'Contacts' - /// - [Fact] - public void ContactsTest() - { - // TODO unit test for the property 'Contacts' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ContactsTests.cs b/csharp/src/OneMessage.io.Test/Model/ContactsTests.cs deleted file mode 100644 index 1b1b159..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ContactsTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing Contacts - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ContactsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for Contacts - //private Contacts instance; - - public ContactsTests() - { - // TODO uncomment below to create an instance of Contacts - //instance = new Contacts(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of Contacts - /// - [Fact] - public void ContactsInstanceTest() - { - // TODO uncomment below to test "IsType" Contacts - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarContacts' - /// - [Fact] - public void VarContactsTest() - { - // TODO unit test for the property 'VarContacts' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetAckInfoHooksInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/GetAckInfoHooksInnerTests.cs deleted file mode 100644 index cb8cfab..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetAckInfoHooksInnerTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetAckInfoHooksInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetAckInfoHooksInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetAckInfoHooksInner - //private GetAckInfoHooksInner instance; - - public GetAckInfoHooksInnerTests() - { - // TODO uncomment below to create an instance of GetAckInfoHooksInner - //instance = new GetAckInfoHooksInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetAckInfoHooksInner - /// - [Fact] - public void GetAckInfoHooksInnerInstanceTest() - { - // TODO uncomment below to test "IsType" GetAckInfoHooksInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - /// - /// Test the property 'Pricing' - /// - [Fact] - public void PricingTest() - { - // TODO unit test for the property 'Pricing' - } - - /// - /// Test the property 'Timestamp' - /// - [Fact] - public void TimestampTest() - { - // TODO unit test for the property 'Timestamp' - } - - /// - /// Test the property 'Conversation' - /// - [Fact] - public void ConversationTest() - { - // TODO unit test for the property 'Conversation' - } - - /// - /// Test the property 'RecipientId' - /// - [Fact] - public void RecipientIdTest() - { - // TODO unit test for the property 'RecipientId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetAckInfoTests.cs b/csharp/src/OneMessage.io.Test/Model/GetAckInfoTests.cs deleted file mode 100644 index 933cf98..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetAckInfoTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetAckInfo - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetAckInfoTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetAckInfo - //private GetAckInfo instance; - - public GetAckInfoTests() - { - // TODO uncomment below to create an instance of GetAckInfo - //instance = new GetAckInfo(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetAckInfo - /// - [Fact] - public void GetAckInfoInstanceTest() - { - // TODO uncomment below to test "IsType" GetAckInfo - //Assert.IsType(instance); - } - - /// - /// Test the property 'Hooks' - /// - [Fact] - public void HooksTest() - { - // TODO unit test for the property 'Hooks' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetCommerceInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/GetCommerceInnerTests.cs deleted file mode 100644 index b732f82..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetCommerceInnerTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetCommerceInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetCommerceInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetCommerceInner - //private GetCommerceInner instance; - - public GetCommerceInnerTests() - { - // TODO uncomment below to create an instance of GetCommerceInner - //instance = new GetCommerceInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetCommerceInner - /// - [Fact] - public void GetCommerceInnerInstanceTest() - { - // TODO uncomment below to test "IsType" GetCommerceInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'IsCartEnabled' - /// - [Fact] - public void IsCartEnabledTest() - { - // TODO unit test for the property 'IsCartEnabled' - } - - /// - /// Test the property 'IsCatalogVisible' - /// - [Fact] - public void IsCatalogVisibleTest() - { - // TODO unit test for the property 'IsCatalogVisible' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetCommerceTests.cs b/csharp/src/OneMessage.io.Test/Model/GetCommerceTests.cs deleted file mode 100644 index d4e530e..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetCommerceTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetCommerce - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetCommerceTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetCommerce - //private GetCommerce instance; - - public GetCommerceTests() - { - // TODO uncomment below to create an instance of GetCommerce - //instance = new GetCommerce(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetCommerce - /// - [Fact] - public void GetCommerceInstanceTest() - { - // TODO uncomment below to test "IsType" GetCommerce - //Assert.IsType(instance); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetIPTests.cs b/csharp/src/OneMessage.io.Test/Model/GetIPTests.cs deleted file mode 100644 index f02e766..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetIPTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetIP - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetIPTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetIP - //private GetIP instance; - - public GetIPTests() - { - // TODO uncomment below to create an instance of GetIP - //instance = new GetIP(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetIP - /// - [Fact] - public void GetIPInstanceTest() - { - // TODO uncomment below to test "IsType" GetIP - //Assert.IsType(instance); - } - - /// - /// Test the property 'Result' - /// - [Fact] - public void ResultTest() - { - // TODO unit test for the property 'Result' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetMe401ResponseTests.cs b/csharp/src/OneMessage.io.Test/Model/GetMe401ResponseTests.cs deleted file mode 100644 index 981ccdf..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetMe401ResponseTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetMe401Response - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetMe401ResponseTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetMe401Response - //private GetMe401Response instance; - - public GetMe401ResponseTests() - { - // TODO uncomment below to create an instance of GetMe401Response - //instance = new GetMe401Response(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetMe401Response - /// - [Fact] - public void GetMe401ResponseInstanceTest() - { - // TODO uncomment below to test "IsType" GetMe401Response - //Assert.IsType(instance); - } - - /// - /// Test the property 'Error' - /// - [Fact] - public void ErrorTest() - { - // TODO unit test for the property 'Error' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetMeTests.cs b/csharp/src/OneMessage.io.Test/Model/GetMeTests.cs deleted file mode 100644 index d6e6418..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetMeTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetMe - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetMeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetMe - //private GetMe instance; - - public GetMeTests() - { - // TODO uncomment below to create an instance of GetMe - //instance = new GetMe(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetMe - /// - [Fact] - public void GetMeInstanceTest() - { - // TODO uncomment below to test "IsType" GetMe - //Assert.IsType(instance); - } - - /// - /// Test the property 'About' - /// - [Fact] - public void AboutTest() - { - // TODO unit test for the property 'About' - } - - /// - /// Test the property 'Address' - /// - [Fact] - public void AddressTest() - { - // TODO unit test for the property 'Address' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'Email' - /// - [Fact] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Vertical' - /// - [Fact] - public void VerticalTest() - { - // TODO unit test for the property 'Vertical' - } - - /// - /// Test the property 'Photo' - /// - [Fact] - public void PhotoTest() - { - // TODO unit test for the property 'Photo' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetMessagesMessagesInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/GetMessagesMessagesInnerTests.cs deleted file mode 100644 index 6eb73b7..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetMessagesMessagesInnerTests.cs +++ /dev/null @@ -1,193 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetMessagesMessagesInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetMessagesMessagesInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetMessagesMessagesInner - //private GetMessagesMessagesInner instance; - - public GetMessagesMessagesInnerTests() - { - // TODO uncomment below to create an instance of GetMessagesMessagesInner - //instance = new GetMessagesMessagesInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetMessagesMessagesInner - /// - [Fact] - public void GetMessagesMessagesInnerInstanceTest() - { - // TODO uncomment below to test "IsType" GetMessagesMessagesInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'MessageNumber' - /// - [Fact] - public void MessageNumberTest() - { - // TODO unit test for the property 'MessageNumber' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - - /// - /// Test the property 'FromMe' - /// - [Fact] - public void FromMeTest() - { - // TODO unit test for the property 'FromMe' - } - - /// - /// Test the property 'Self' - /// - [Fact] - public void SelfTest() - { - // TODO unit test for the property 'Self' - } - - /// - /// Test the property 'IsForwarded' - /// - [Fact] - public void IsForwardedTest() - { - // TODO unit test for the property 'IsForwarded' - } - - /// - /// Test the property 'Author' - /// - [Fact] - public void AuthorTest() - { - // TODO unit test for the property 'Author' - } - - /// - /// Test the property 'Time' - /// - [Fact] - public void TimeTest() - { - // TODO unit test for the property 'Time' - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - - /// - /// Test the property 'SenderName' - /// - [Fact] - public void SenderNameTest() - { - // TODO unit test for the property 'SenderName' - } - - /// - /// Test the property 'Caption' - /// - [Fact] - public void CaptionTest() - { - // TODO unit test for the property 'Caption' - } - - /// - /// Test the property 'QuotedMsgId' - /// - [Fact] - public void QuotedMsgIdTest() - { - // TODO unit test for the property 'QuotedMsgId' - } - - /// - /// Test the property 'Metadata' - /// - [Fact] - public void MetadataTest() - { - // TODO unit test for the property 'Metadata' - } - - /// - /// Test the property 'ChatName' - /// - [Fact] - public void ChatNameTest() - { - // TODO unit test for the property 'ChatName' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetMessagesTests.cs b/csharp/src/OneMessage.io.Test/Model/GetMessagesTests.cs deleted file mode 100644 index ba1d74c..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetMessagesTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetMessages - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetMessagesTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetMessages - //private GetMessages instance; - - public GetMessagesTests() - { - // TODO uncomment below to create an instance of GetMessages - //instance = new GetMessages(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetMessages - /// - [Fact] - public void GetMessagesInstanceTest() - { - // TODO uncomment below to test "IsType" GetMessages - //Assert.IsType(instance); - } - - /// - /// Test the property 'Messages' - /// - [Fact] - public void MessagesTest() - { - // TODO unit test for the property 'Messages' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetTemplatesTemplatesInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/GetTemplatesTemplatesInnerTests.cs deleted file mode 100644 index 914ed92..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetTemplatesTemplatesInnerTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetTemplatesTemplatesInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetTemplatesTemplatesInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetTemplatesTemplatesInner - //private GetTemplatesTemplatesInner instance; - - public GetTemplatesTemplatesInnerTests() - { - // TODO uncomment below to create an instance of GetTemplatesTemplatesInner - //instance = new GetTemplatesTemplatesInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetTemplatesTemplatesInner - /// - [Fact] - public void GetTemplatesTemplatesInnerInstanceTest() - { - // TODO uncomment below to test "IsType" GetTemplatesTemplatesInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'Category' - /// - [Fact] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - - /// - /// Test the property 'Components' - /// - [Fact] - public void ComponentsTest() - { - // TODO unit test for the property 'Components' - } - - /// - /// Test the property 'Language' - /// - [Fact] - public void LanguageTest() - { - // TODO unit test for the property 'Language' - } - - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - /// - /// Test the property 'VarNamespace' - /// - [Fact] - public void VarNamespaceTest() - { - // TODO unit test for the property 'VarNamespace' - } - - /// - /// Test the property 'RejectedReason' - /// - [Fact] - public void RejectedReasonTest() - { - // TODO unit test for the property 'RejectedReason' - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/GetTemplatesTests.cs b/csharp/src/OneMessage.io.Test/Model/GetTemplatesTests.cs deleted file mode 100644 index 49cc0d9..0000000 --- a/csharp/src/OneMessage.io.Test/Model/GetTemplatesTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing GetTemplates - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetTemplatesTests : IDisposable - { - // TODO uncomment below to declare an instance variable for GetTemplates - //private GetTemplates instance; - - public GetTemplatesTests() - { - // TODO uncomment below to create an instance of GetTemplates - //instance = new GetTemplates(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of GetTemplates - /// - [Fact] - public void GetTemplatesInstanceTest() - { - // TODO uncomment below to test "IsType" GetTemplates - //Assert.IsType(instance); - } - - /// - /// Test the property 'Total' - /// - [Fact] - public void TotalTest() - { - // TODO unit test for the property 'Total' - } - - /// - /// Test the property 'Templates' - /// - [Fact] - public void TemplatesTest() - { - // TODO unit test for the property 'Templates' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/MeComponentsTests.cs b/csharp/src/OneMessage.io.Test/Model/MeComponentsTests.cs deleted file mode 100644 index 224b71c..0000000 --- a/csharp/src/OneMessage.io.Test/Model/MeComponentsTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing MeComponents - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MeComponentsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MeComponents - //private MeComponents instance; - - public MeComponentsTests() - { - // TODO uncomment below to create an instance of MeComponents - //instance = new MeComponents(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MeComponents - /// - [Fact] - public void MeComponentsInstanceTest() - { - // TODO uncomment below to test "IsType" MeComponents - //Assert.IsType(instance); - } - - /// - /// Test the property 'About' - /// - [Fact] - public void AboutTest() - { - // TODO unit test for the property 'About' - } - - /// - /// Test the property 'Address' - /// - [Fact] - public void AddressTest() - { - // TODO unit test for the property 'Address' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'Email' - /// - [Fact] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Vertical' - /// - [Fact] - public void VerticalTest() - { - // TODO unit test for the property 'Vertical' - } - - /// - /// Test the property 'Photo' - /// - [Fact] - public void PhotoTest() - { - // TODO unit test for the property 'Photo' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/MediaIdTests.cs b/csharp/src/OneMessage.io.Test/Model/MediaIdTests.cs deleted file mode 100644 index 2e06a1c..0000000 --- a/csharp/src/OneMessage.io.Test/Model/MediaIdTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing MediaId - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MediaIdTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MediaId - //private MediaId instance; - - public MediaIdTests() - { - // TODO uncomment below to create an instance of MediaId - //instance = new MediaId(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MediaId - /// - [Fact] - public void MediaIdInstanceTest() - { - // TODO uncomment below to test "IsType" MediaId - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarMediaId' - /// - [Fact] - public void VarMediaIdTest() - { - // TODO unit test for the property 'VarMediaId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/MessageIdPropTests.cs b/csharp/src/OneMessage.io.Test/Model/MessageIdPropTests.cs deleted file mode 100644 index dcbb69c..0000000 --- a/csharp/src/OneMessage.io.Test/Model/MessageIdPropTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing MessageIdProp - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MessageIdPropTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MessageIdProp - //private MessageIdProp instance; - - public MessageIdPropTests() - { - // TODO uncomment below to create an instance of MessageIdProp - //instance = new MessageIdProp(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MessageIdProp - /// - [Fact] - public void MessageIdPropInstanceTest() - { - // TODO uncomment below to test "IsType" MessageIdProp - //Assert.IsType(instance); - } - - /// - /// Test the property 'MessageId' - /// - [Fact] - public void MessageIdTest() - { - // TODO unit test for the property 'MessageId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/MessageTests.cs b/csharp/src/OneMessage.io.Test/Model/MessageTests.cs deleted file mode 100644 index deae065..0000000 --- a/csharp/src/OneMessage.io.Test/Model/MessageTests.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing Message - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MessageTests : IDisposable - { - // TODO uncomment below to declare an instance variable for Message - //private Message instance; - - public MessageTests() - { - // TODO uncomment below to create an instance of Message - //instance = new Message(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of Message - /// - [Fact] - public void MessageInstanceTest() - { - // TODO uncomment below to test "IsType" Message - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - - /// - /// Test the property 'FromMe' - /// - [Fact] - public void FromMeTest() - { - // TODO unit test for the property 'FromMe' - } - - /// - /// Test the property 'Self' - /// - [Fact] - public void SelfTest() - { - // TODO unit test for the property 'Self' - } - - /// - /// Test the property 'IsForwarded' - /// - [Fact] - public void IsForwardedTest() - { - // TODO unit test for the property 'IsForwarded' - } - - /// - /// Test the property 'Author' - /// - [Fact] - public void AuthorTest() - { - // TODO unit test for the property 'Author' - } - - /// - /// Test the property 'Time' - /// - [Fact] - public void TimeTest() - { - // TODO unit test for the property 'Time' - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - - /// - /// Test the property 'SenderName' - /// - [Fact] - public void SenderNameTest() - { - // TODO unit test for the property 'SenderName' - } - - /// - /// Test the property 'Caption' - /// - [Fact] - public void CaptionTest() - { - // TODO unit test for the property 'Caption' - } - - /// - /// Test the property 'QuotedMsgId' - /// - [Fact] - public void QuotedMsgIdTest() - { - // TODO unit test for the property 'QuotedMsgId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/PhonePropTests.cs b/csharp/src/OneMessage.io.Test/Model/PhonePropTests.cs deleted file mode 100644 index cc2244a..0000000 --- a/csharp/src/OneMessage.io.Test/Model/PhonePropTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing PhoneProp - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PhonePropTests : IDisposable - { - // TODO uncomment below to declare an instance variable for PhoneProp - //private PhoneProp instance; - - public PhonePropTests() - { - // TODO uncomment below to create an instance of PhoneProp - //instance = new PhoneProp(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of PhoneProp - /// - [Fact] - public void PhonePropInstanceTest() - { - // TODO uncomment below to test "IsType" PhoneProp - //Assert.IsType(instance); - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/ReadMessageRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/ReadMessageRequestTests.cs deleted file mode 100644 index 0a5d82b..0000000 --- a/csharp/src/OneMessage.io.Test/Model/ReadMessageRequestTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing ReadMessageRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReadMessageRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for ReadMessageRequest - //private ReadMessageRequest instance; - - public ReadMessageRequestTests() - { - // TODO uncomment below to create an instance of ReadMessageRequest - //instance = new ReadMessageRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of ReadMessageRequest - /// - [Fact] - public void ReadMessageRequestInstanceTest() - { - // TODO uncomment below to test "IsType" ReadMessageRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'MessageId' - /// - [Fact] - public void MessageIdTest() - { - // TODO unit test for the property 'MessageId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/RemoveTemplateRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/RemoveTemplateRequestTests.cs deleted file mode 100644 index 5af9020..0000000 --- a/csharp/src/OneMessage.io.Test/Model/RemoveTemplateRequestTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing RemoveTemplateRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class RemoveTemplateRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for RemoveTemplateRequest - //private RemoveTemplateRequest instance; - - public RemoveTemplateRequestTests() - { - // TODO uncomment below to create an instance of RemoveTemplateRequest - //instance = new RemoveTemplateRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of RemoveTemplateRequest - /// - [Fact] - public void RemoveTemplateRequestInstanceTest() - { - // TODO uncomment below to test "IsType" RemoveTemplateRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendContactRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendContactRequestTests.cs deleted file mode 100644 index f7e00dc..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendContactRequestTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendContactRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendContactRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendContactRequest - //private SendContactRequest instance; - - public SendContactRequestTests() - { - // TODO uncomment below to create an instance of SendContactRequest - //instance = new SendContactRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendContactRequest - /// - [Fact] - public void SendContactRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendContactRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Contacts' - /// - [Fact] - public void ContactsTest() - { - // TODO unit test for the property 'Contacts' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendFileRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendFileRequestTests.cs deleted file mode 100644 index 7459304..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendFileRequestTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendFileRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendFileRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendFileRequest - //private SendFileRequest instance; - - public SendFileRequestTests() - { - // TODO uncomment below to create an instance of SendFileRequest - //instance = new SendFileRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendFileRequest - /// - [Fact] - public void SendFileRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendFileRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - - /// - /// Test the property 'Filename' - /// - [Fact] - public void FilenameTest() - { - // TODO unit test for the property 'Filename' - } - - /// - /// Test the property 'Caption' - /// - [Fact] - public void CaptionTest() - { - // TODO unit test for the property 'Caption' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfRowsTests.cs b/csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfRowsTests.cs deleted file mode 100644 index 79cdf2e..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfRowsTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendListRequestAllOfRows - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendListRequestAllOfRowsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendListRequestAllOfRows - //private SendListRequestAllOfRows instance; - - public SendListRequestAllOfRowsTests() - { - // TODO uncomment below to create an instance of SendListRequestAllOfRows - //instance = new SendListRequestAllOfRows(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendListRequestAllOfRows - /// - [Fact] - public void SendListRequestAllOfRowsInstanceTest() - { - // TODO uncomment below to test "IsType" SendListRequestAllOfRows - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Title' - /// - [Fact] - public void TitleTest() - { - // TODO unit test for the property 'Title' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfSectionsTests.cs b/csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfSectionsTests.cs deleted file mode 100644 index 69699a2..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendListRequestAllOfSectionsTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendListRequestAllOfSections - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendListRequestAllOfSectionsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendListRequestAllOfSections - //private SendListRequestAllOfSections instance; - - public SendListRequestAllOfSectionsTests() - { - // TODO uncomment below to create an instance of SendListRequestAllOfSections - //instance = new SendListRequestAllOfSections(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendListRequestAllOfSections - /// - [Fact] - public void SendListRequestAllOfSectionsInstanceTest() - { - // TODO uncomment below to test "IsType" SendListRequestAllOfSections - //Assert.IsType(instance); - } - - /// - /// Test the property 'Title' - /// - [Fact] - public void TitleTest() - { - // TODO unit test for the property 'Title' - } - - /// - /// Test the property 'Rows' - /// - [Fact] - public void RowsTest() - { - // TODO unit test for the property 'Rows' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendListRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendListRequestTests.cs deleted file mode 100644 index 766c543..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendListRequestTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendListRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendListRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendListRequest - //private SendListRequest instance; - - public SendListRequestTests() - { - // TODO uncomment below to create an instance of SendListRequest - //instance = new SendListRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendListRequest - /// - [Fact] - public void SendListRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendListRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - - /// - /// Test the property 'Header' - /// - [Fact] - public void HeaderTest() - { - // TODO unit test for the property 'Header' - } - - /// - /// Test the property 'Footer' - /// - [Fact] - public void FooterTest() - { - // TODO unit test for the property 'Footer' - } - - /// - /// Test the property 'Action' - /// - [Fact] - public void ActionTest() - { - // TODO unit test for the property 'Action' - } - - /// - /// Test the property 'Sections' - /// - [Fact] - public void SectionsTest() - { - // TODO unit test for the property 'Sections' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendLocationRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendLocationRequestTests.cs deleted file mode 100644 index 5795707..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendLocationRequestTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendLocationRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendLocationRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendLocationRequest - //private SendLocationRequest instance; - - public SendLocationRequestTests() - { - // TODO uncomment below to create an instance of SendLocationRequest - //instance = new SendLocationRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendLocationRequest - /// - [Fact] - public void SendLocationRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendLocationRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Lat' - /// - [Fact] - public void LatTest() - { - // TODO unit test for the property 'Lat' - } - - /// - /// Test the property 'Lng' - /// - [Fact] - public void LngTest() - { - // TODO unit test for the property 'Lng' - } - - /// - /// Test the property 'Address' - /// - [Fact] - public void AddressTest() - { - // TODO unit test for the property 'Address' - } - - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendMessageRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendMessageRequestTests.cs deleted file mode 100644 index 52a5b18..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendMessageRequestTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendMessageRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendMessageRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendMessageRequest - //private SendMessageRequest instance; - - public SendMessageRequestTests() - { - // TODO uncomment below to create an instance of SendMessageRequest - //instance = new SendMessageRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendMessageRequest - /// - [Fact] - public void SendMessageRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendMessageRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendMessageStatusTests.cs b/csharp/src/OneMessage.io.Test/Model/SendMessageStatusTests.cs deleted file mode 100644 index 7abe438..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendMessageStatusTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendMessageStatus - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendMessageStatusTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendMessageStatus - //private SendMessageStatus instance; - - public SendMessageStatusTests() - { - // TODO uncomment below to create an instance of SendMessageStatus - //instance = new SendMessageStatus(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendMessageStatus - /// - [Fact] - public void SendMessageStatusInstanceTest() - { - // TODO uncomment below to test "IsType" SendMessageStatus - //Assert.IsType(instance); - } - - /// - /// Test the property 'Sent' - /// - [Fact] - public void SentTest() - { - // TODO unit test for the property 'Sent' - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - - /// - /// Test the property 'Message' - /// - [Fact] - public void MessageTest() - { - // TODO unit test for the property 'Message' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionProductItemsTests.cs b/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionProductItemsTests.cs deleted file mode 100644 index d4429a5..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionProductItemsTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendProductRequestAllOfActionProductItems - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendProductRequestAllOfActionProductItemsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendProductRequestAllOfActionProductItems - //private SendProductRequestAllOfActionProductItems instance; - - public SendProductRequestAllOfActionProductItemsTests() - { - // TODO uncomment below to create an instance of SendProductRequestAllOfActionProductItems - //instance = new SendProductRequestAllOfActionProductItems(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendProductRequestAllOfActionProductItems - /// - [Fact] - public void SendProductRequestAllOfActionProductItemsInstanceTest() - { - // TODO uncomment below to test "IsType" SendProductRequestAllOfActionProductItems - //Assert.IsType(instance); - } - - /// - /// Test the property 'ProductRetailerId' - /// - [Fact] - public void ProductRetailerIdTest() - { - // TODO unit test for the property 'ProductRetailerId' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionSectionsTests.cs b/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionSectionsTests.cs deleted file mode 100644 index 131b2d5..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionSectionsTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendProductRequestAllOfActionSections - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendProductRequestAllOfActionSectionsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendProductRequestAllOfActionSections - //private SendProductRequestAllOfActionSections instance; - - public SendProductRequestAllOfActionSectionsTests() - { - // TODO uncomment below to create an instance of SendProductRequestAllOfActionSections - //instance = new SendProductRequestAllOfActionSections(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendProductRequestAllOfActionSections - /// - [Fact] - public void SendProductRequestAllOfActionSectionsInstanceTest() - { - // TODO uncomment below to test "IsType" SendProductRequestAllOfActionSections - //Assert.IsType(instance); - } - - /// - /// Test the property 'Title' - /// - [Fact] - public void TitleTest() - { - // TODO unit test for the property 'Title' - } - - /// - /// Test the property 'ProductItems' - /// - [Fact] - public void ProductItemsTest() - { - // TODO unit test for the property 'ProductItems' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionTests.cs b/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionTests.cs deleted file mode 100644 index aa2cbdf..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendProductRequestAllOfActionTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendProductRequestAllOfAction - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendProductRequestAllOfActionTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendProductRequestAllOfAction - //private SendProductRequestAllOfAction instance; - - public SendProductRequestAllOfActionTests() - { - // TODO uncomment below to create an instance of SendProductRequestAllOfAction - //instance = new SendProductRequestAllOfAction(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendProductRequestAllOfAction - /// - [Fact] - public void SendProductRequestAllOfActionInstanceTest() - { - // TODO uncomment below to test "IsType" SendProductRequestAllOfAction - //Assert.IsType(instance); - } - - /// - /// Test the property 'CatalogId' - /// - [Fact] - public void CatalogIdTest() - { - // TODO unit test for the property 'CatalogId' - } - - /// - /// Test the property 'ProductRetailerId' - /// - [Fact] - public void ProductRetailerIdTest() - { - // TODO unit test for the property 'ProductRetailerId' - } - - /// - /// Test the property 'Sections' - /// - [Fact] - public void SectionsTest() - { - // TODO unit test for the property 'Sections' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendProductRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendProductRequestTests.cs deleted file mode 100644 index e49f1a1..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendProductRequestTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendProductRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendProductRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendProductRequest - //private SendProductRequest instance; - - public SendProductRequestTests() - { - // TODO uncomment below to create an instance of SendProductRequest - //instance = new SendProductRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendProductRequest - /// - [Fact] - public void SendProductRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendProductRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Action' - /// - [Fact] - public void ActionTest() - { - // TODO unit test for the property 'Action' - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - - /// - /// Test the property 'Footer' - /// - [Fact] - public void FooterTest() - { - // TODO unit test for the property 'Footer' - } - - /// - /// Test the property 'Header' - /// - [Fact] - public void HeaderTest() - { - // TODO unit test for the property 'Header' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfCurrencyTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfCurrencyTests.cs deleted file mode 100644 index a5b6904..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfCurrencyTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequestAllOfCurrency - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestAllOfCurrencyTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequestAllOfCurrency - //private SendTemplateRequestAllOfCurrency instance; - - public SendTemplateRequestAllOfCurrencyTests() - { - // TODO uncomment below to create an instance of SendTemplateRequestAllOfCurrency - //instance = new SendTemplateRequestAllOfCurrency(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequestAllOfCurrency - /// - [Fact] - public void SendTemplateRequestAllOfCurrencyInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequestAllOfCurrency - //Assert.IsType(instance); - } - - /// - /// Test the property 'CurrencyCode' - /// - [Fact] - public void CurrencyCodeTest() - { - // TODO unit test for the property 'CurrencyCode' - } - - /// - /// Test the property 'Amount1000' - /// - [Fact] - public void Amount1000Test() - { - // TODO unit test for the property 'Amount1000' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeComponentTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeComponentTests.cs deleted file mode 100644 index 6ffa7b4..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeComponentTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequestAllOfDateTimeComponent - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestAllOfDateTimeComponentTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequestAllOfDateTimeComponent - //private SendTemplateRequestAllOfDateTimeComponent instance; - - public SendTemplateRequestAllOfDateTimeComponentTests() - { - // TODO uncomment below to create an instance of SendTemplateRequestAllOfDateTimeComponent - //instance = new SendTemplateRequestAllOfDateTimeComponent(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequestAllOfDateTimeComponent - /// - [Fact] - public void SendTemplateRequestAllOfDateTimeComponentInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequestAllOfDateTimeComponent - //Assert.IsType(instance); - } - - /// - /// Test the property 'DayOfWeek' - /// - [Fact] - public void DayOfWeekTest() - { - // TODO unit test for the property 'DayOfWeek' - } - - /// - /// Test the property 'Year' - /// - [Fact] - public void YearTest() - { - // TODO unit test for the property 'Year' - } - - /// - /// Test the property 'Month' - /// - [Fact] - public void MonthTest() - { - // TODO unit test for the property 'Month' - } - - /// - /// Test the property 'DayOfMonth' - /// - [Fact] - public void DayOfMonthTest() - { - // TODO unit test for the property 'DayOfMonth' - } - - /// - /// Test the property 'Hour' - /// - [Fact] - public void HourTest() - { - // TODO unit test for the property 'Hour' - } - - /// - /// Test the property 'Minute' - /// - [Fact] - public void MinuteTest() - { - // TODO unit test for the property 'Minute' - } - - /// - /// Test the property 'Calendar' - /// - [Fact] - public void CalendarTest() - { - // TODO unit test for the property 'Calendar' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeTests.cs deleted file mode 100644 index 0650458..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequestAllOfDateTime - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestAllOfDateTimeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequestAllOfDateTime - //private SendTemplateRequestAllOfDateTime instance; - - public SendTemplateRequestAllOfDateTimeTests() - { - // TODO uncomment below to create an instance of SendTemplateRequestAllOfDateTime - //instance = new SendTemplateRequestAllOfDateTime(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequestAllOfDateTime - /// - [Fact] - public void SendTemplateRequestAllOfDateTimeInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequestAllOfDateTime - //Assert.IsType(instance); - } - - /// - /// Test the property 'Component' - /// - [Fact] - public void ComponentTest() - { - // TODO unit test for the property 'Component' - } - - /// - /// Test the property 'UnixEpoch' - /// - [Fact] - public void UnixEpochTest() - { - // TODO unit test for the property 'UnixEpoch' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeUnixEpochTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeUnixEpochTests.cs deleted file mode 100644 index 6a5b5da..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfDateTimeUnixEpochTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequestAllOfDateTimeUnixEpoch - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestAllOfDateTimeUnixEpochTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequestAllOfDateTimeUnixEpoch - //private SendTemplateRequestAllOfDateTimeUnixEpoch instance; - - public SendTemplateRequestAllOfDateTimeUnixEpochTests() - { - // TODO uncomment below to create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch - //instance = new SendTemplateRequestAllOfDateTimeUnixEpoch(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequestAllOfDateTimeUnixEpoch - /// - [Fact] - public void SendTemplateRequestAllOfDateTimeUnixEpochInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequestAllOfDateTimeUnixEpoch - //Assert.IsType(instance); - } - - /// - /// Test the property 'Timestamp' - /// - [Fact] - public void TimestampTest() - { - // TODO unit test for the property 'Timestamp' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfLanguageTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfLanguageTests.cs deleted file mode 100644 index 31c8d8a..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfLanguageTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequestAllOfLanguage - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestAllOfLanguageTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequestAllOfLanguage - //private SendTemplateRequestAllOfLanguage instance; - - public SendTemplateRequestAllOfLanguageTests() - { - // TODO uncomment below to create an instance of SendTemplateRequestAllOfLanguage - //instance = new SendTemplateRequestAllOfLanguage(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequestAllOfLanguage - /// - [Fact] - public void SendTemplateRequestAllOfLanguageInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequestAllOfLanguage - //Assert.IsType(instance); - } - - /// - /// Test the property 'Policy' - /// - [Fact] - public void PolicyTest() - { - // TODO unit test for the property 'Policy' - } - - /// - /// Test the property 'Code' - /// - [Fact] - public void CodeTest() - { - // TODO unit test for the property 'Code' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfParamsTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfParamsTests.cs deleted file mode 100644 index e22bc1c..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestAllOfParamsTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequestAllOfParams - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestAllOfParamsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequestAllOfParams - //private SendTemplateRequestAllOfParams instance; - - public SendTemplateRequestAllOfParamsTests() - { - // TODO uncomment below to create an instance of SendTemplateRequestAllOfParams - //instance = new SendTemplateRequestAllOfParams(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequestAllOfParams - /// - [Fact] - public void SendTemplateRequestAllOfParamsInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequestAllOfParams - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarDefault' - /// - [Fact] - public void VarDefaultTest() - { - // TODO unit test for the property 'VarDefault' - } - - /// - /// Test the property 'Currency' - /// - [Fact] - public void CurrencyTest() - { - // TODO unit test for the property 'Currency' - } - - /// - /// Test the property 'DateTime' - /// - [Fact] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestTests.cs deleted file mode 100644 index d4075b8..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SendTemplateRequestTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SendTemplateRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendTemplateRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SendTemplateRequest - //private SendTemplateRequest instance; - - public SendTemplateRequestTests() - { - // TODO uncomment below to create an instance of SendTemplateRequest - //instance = new SendTemplateRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SendTemplateRequest - /// - [Fact] - public void SendTemplateRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SendTemplateRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarNamespace' - /// - [Fact] - public void VarNamespaceTest() - { - // TODO unit test for the property 'VarNamespace' - } - - /// - /// Test the property 'ChatId' - /// - [Fact] - public void ChatIdTest() - { - // TODO unit test for the property 'ChatId' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Template' - /// - [Fact] - public void TemplateTest() - { - // TODO unit test for the property 'Template' - } - - /// - /// Test the property 'Language' - /// - [Fact] - public void LanguageTest() - { - // TODO unit test for the property 'Language' - } - - /// - /// Test the property 'VarParams' - /// - [Fact] - public void VarParamsTest() - { - // TODO unit test for the property 'VarParams' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SetCommerceTests.cs b/csharp/src/OneMessage.io.Test/Model/SetCommerceTests.cs deleted file mode 100644 index 357addd..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SetCommerceTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SetCommerce - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetCommerceTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SetCommerce - //private SetCommerce instance; - - public SetCommerceTests() - { - // TODO uncomment below to create an instance of SetCommerce - //instance = new SetCommerce(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SetCommerce - /// - [Fact] - public void SetCommerceInstanceTest() - { - // TODO uncomment below to test "IsType" SetCommerce - //Assert.IsType(instance); - } - - /// - /// Test the property 'Success' - /// - [Fact] - public void SuccessTest() - { - // TODO unit test for the property 'Success' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SetMeRequestTests.cs b/csharp/src/OneMessage.io.Test/Model/SetMeRequestTests.cs deleted file mode 100644 index 5a93aed..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SetMeRequestTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SetMeRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetMeRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SetMeRequest - //private SetMeRequest instance; - - public SetMeRequestTests() - { - // TODO uncomment below to create an instance of SetMeRequest - //instance = new SetMeRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SetMeRequest - /// - [Fact] - public void SetMeRequestInstanceTest() - { - // TODO uncomment below to test "IsType" SetMeRequest - //Assert.IsType(instance); - } - - /// - /// Test the property 'About' - /// - [Fact] - public void AboutTest() - { - // TODO unit test for the property 'About' - } - - /// - /// Test the property 'Address' - /// - [Fact] - public void AddressTest() - { - // TODO unit test for the property 'Address' - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - /// - /// Test the property 'Email' - /// - [Fact] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - - /// - /// Test the property 'Phone' - /// - [Fact] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - - /// - /// Test the property 'Vertical' - /// - [Fact] - public void VerticalTest() - { - // TODO unit test for the property 'Vertical' - } - - /// - /// Test the property 'Photo' - /// - [Fact] - public void PhotoTest() - { - // TODO unit test for the property 'Photo' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SetMeTests.cs b/csharp/src/OneMessage.io.Test/Model/SetMeTests.cs deleted file mode 100644 index d9f863c..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SetMeTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SetMe - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetMeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SetMe - //private SetMe instance; - - public SetMeTests() - { - // TODO uncomment below to create an instance of SetMe - //instance = new SetMe(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SetMe - /// - [Fact] - public void SetMeInstanceTest() - { - // TODO uncomment below to test "IsType" SetMe - //Assert.IsType(instance); - } - - /// - /// Test the property 'Result' - /// - [Fact] - public void ResultTest() - { - // TODO unit test for the property 'Result' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseAllOfUpdateTests.cs b/csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseAllOfUpdateTests.cs deleted file mode 100644 index 0283c58..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseAllOfUpdateTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SetSettings200ResponseAllOfUpdate - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetSettings200ResponseAllOfUpdateTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SetSettings200ResponseAllOfUpdate - //private SetSettings200ResponseAllOfUpdate instance; - - public SetSettings200ResponseAllOfUpdateTests() - { - // TODO uncomment below to create an instance of SetSettings200ResponseAllOfUpdate - //instance = new SetSettings200ResponseAllOfUpdate(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SetSettings200ResponseAllOfUpdate - /// - [Fact] - public void SetSettings200ResponseAllOfUpdateInstanceTest() - { - // TODO uncomment below to test "IsType" SetSettings200ResponseAllOfUpdate - //Assert.IsType(instance); - } - - /// - /// Test the property 'WebhookUrl' - /// - [Fact] - public void WebhookUrlTest() - { - // TODO unit test for the property 'WebhookUrl' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseTests.cs b/csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseTests.cs deleted file mode 100644 index 610d9cc..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SetSettings200ResponseTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SetSettings200Response - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetSettings200ResponseTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SetSettings200Response - //private SetSettings200Response instance; - - public SetSettings200ResponseTests() - { - // TODO uncomment below to create an instance of SetSettings200Response - //instance = new SetSettings200Response(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SetSettings200Response - /// - [Fact] - public void SetSettings200ResponseInstanceTest() - { - // TODO uncomment below to test "IsType" SetSettings200Response - //Assert.IsType(instance); - } - - /// - /// Test the property 'WebhookUrl' - /// - [Fact] - public void WebhookUrlTest() - { - // TODO unit test for the property 'WebhookUrl' - } - - /// - /// Test the property 'Update' - /// - [Fact] - public void UpdateTest() - { - // TODO unit test for the property 'Update' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SetWebhookStatusTests.cs b/csharp/src/OneMessage.io.Test/Model/SetWebhookStatusTests.cs deleted file mode 100644 index 1dfce54..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SetWebhookStatusTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing SetWebhookStatus - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetWebhookStatusTests : IDisposable - { - // TODO uncomment below to declare an instance variable for SetWebhookStatus - //private SetWebhookStatus instance; - - public SetWebhookStatusTests() - { - // TODO uncomment below to create an instance of SetWebhookStatus - //instance = new SetWebhookStatus(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of SetWebhookStatus - /// - [Fact] - public void SetWebhookStatusInstanceTest() - { - // TODO uncomment below to test "IsType" SetWebhookStatus - //Assert.IsType(instance); - } - - /// - /// Test the property 'Set' - /// - [Fact] - public void SetTest() - { - // TODO unit test for the property 'Set' - } - - /// - /// Test the property 'Message' - /// - [Fact] - public void MessageTest() - { - // TODO unit test for the property 'Message' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/SettingsTests.cs b/csharp/src/OneMessage.io.Test/Model/SettingsTests.cs deleted file mode 100644 index 99a3ff7..0000000 --- a/csharp/src/OneMessage.io.Test/Model/SettingsTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing Settings - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SettingsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for Settings - //private Settings instance; - - public SettingsTests() - { - // TODO uncomment below to create an instance of Settings - //instance = new Settings(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of Settings - /// - [Fact] - public void SettingsInstanceTest() - { - // TODO uncomment below to test "IsType" Settings - //Assert.IsType(instance); - } - - /// - /// Test the property 'WebhookUrl' - /// - [Fact] - public void WebhookUrlTest() - { - // TODO unit test for the property 'WebhookUrl' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/TemplateCategoryPropTests.cs b/csharp/src/OneMessage.io.Test/Model/TemplateCategoryPropTests.cs deleted file mode 100644 index 61eb95b..0000000 --- a/csharp/src/OneMessage.io.Test/Model/TemplateCategoryPropTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing TemplateCategoryProp - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TemplateCategoryPropTests : IDisposable - { - // TODO uncomment below to declare an instance variable for TemplateCategoryProp - //private TemplateCategoryProp instance; - - public TemplateCategoryPropTests() - { - // TODO uncomment below to create an instance of TemplateCategoryProp - //instance = new TemplateCategoryProp(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplateCategoryProp - /// - [Fact] - public void TemplateCategoryPropInstanceTest() - { - // TODO uncomment below to test "IsType" TemplateCategoryProp - //Assert.IsType(instance); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerButtonsInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerButtonsInnerTests.cs deleted file mode 100644 index b5969ea..0000000 --- a/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerButtonsInnerTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing TemplateComponentsPropInnerButtonsInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TemplateComponentsPropInnerButtonsInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for TemplateComponentsPropInnerButtonsInner - //private TemplateComponentsPropInnerButtonsInner instance; - - public TemplateComponentsPropInnerButtonsInnerTests() - { - // TODO uncomment below to create an instance of TemplateComponentsPropInnerButtonsInner - //instance = new TemplateComponentsPropInnerButtonsInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplateComponentsPropInnerButtonsInner - /// - [Fact] - public void TemplateComponentsPropInnerButtonsInnerInstanceTest() - { - // TODO uncomment below to test "IsType" TemplateComponentsPropInnerButtonsInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - // TODO unit test for the property 'Text' - } - - /// - /// Test the property 'Url' - /// - [Fact] - public void UrlTest() - { - // TODO unit test for the property 'Url' - } - - /// - /// Test the property 'PhoneNumber' - /// - [Fact] - public void PhoneNumberTest() - { - // TODO unit test for the property 'PhoneNumber' - } - - /// - /// Test the property 'Example' - /// - [Fact] - public void ExampleTest() - { - // TODO unit test for the property 'Example' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerTests.cs b/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerTests.cs deleted file mode 100644 index db2c6f6..0000000 --- a/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropInnerTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing TemplateComponentsPropInner - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TemplateComponentsPropInnerTests : IDisposable - { - // TODO uncomment below to declare an instance variable for TemplateComponentsPropInner - //private TemplateComponentsPropInner instance; - - public TemplateComponentsPropInnerTests() - { - // TODO uncomment below to create an instance of TemplateComponentsPropInner - //instance = new TemplateComponentsPropInner(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplateComponentsPropInner - /// - [Fact] - public void TemplateComponentsPropInnerInstanceTest() - { - // TODO uncomment below to test "IsType" TemplateComponentsPropInner - //Assert.IsType(instance); - } - - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - - /// - /// Test the property 'Format' - /// - [Fact] - public void FormatTest() - { - // TODO unit test for the property 'Format' - } - - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - // TODO unit test for the property 'Text' - } - - /// - /// Test the property 'Example' - /// - [Fact] - public void ExampleTest() - { - // TODO unit test for the property 'Example' - } - - /// - /// Test the property 'Buttons' - /// - [Fact] - public void ButtonsTest() - { - // TODO unit test for the property 'Buttons' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropTests.cs b/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropTests.cs deleted file mode 100644 index 01b7c3e..0000000 --- a/csharp/src/OneMessage.io.Test/Model/TemplateComponentsPropTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing TemplateComponentsProp - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TemplateComponentsPropTests : IDisposable - { - // TODO uncomment below to declare an instance variable for TemplateComponentsProp - //private TemplateComponentsProp instance; - - public TemplateComponentsPropTests() - { - // TODO uncomment below to create an instance of TemplateComponentsProp - //instance = new TemplateComponentsProp(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplateComponentsProp - /// - [Fact] - public void TemplateComponentsPropInstanceTest() - { - // TODO uncomment below to test "IsType" TemplateComponentsProp - //Assert.IsType(instance); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/TemplateLanguagePropTests.cs b/csharp/src/OneMessage.io.Test/Model/TemplateLanguagePropTests.cs deleted file mode 100644 index 3d19f18..0000000 --- a/csharp/src/OneMessage.io.Test/Model/TemplateLanguagePropTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing TemplateLanguageProp - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TemplateLanguagePropTests : IDisposable - { - // TODO uncomment below to declare an instance variable for TemplateLanguageProp - //private TemplateLanguageProp instance; - - public TemplateLanguagePropTests() - { - // TODO uncomment below to create an instance of TemplateLanguageProp - //instance = new TemplateLanguageProp(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplateLanguageProp - /// - [Fact] - public void TemplateLanguagePropInstanceTest() - { - // TODO uncomment below to test "IsType" TemplateLanguageProp - //Assert.IsType(instance); - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/TemplateNamespaceFieldTests.cs b/csharp/src/OneMessage.io.Test/Model/TemplateNamespaceFieldTests.cs deleted file mode 100644 index eb1bdea..0000000 --- a/csharp/src/OneMessage.io.Test/Model/TemplateNamespaceFieldTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing TemplateNamespaceField - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TemplateNamespaceFieldTests : IDisposable - { - // TODO uncomment below to declare an instance variable for TemplateNamespaceField - //private TemplateNamespaceField instance; - - public TemplateNamespaceFieldTests() - { - // TODO uncomment below to create an instance of TemplateNamespaceField - //instance = new TemplateNamespaceField(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of TemplateNamespaceField - /// - [Fact] - public void TemplateNamespaceFieldInstanceTest() - { - // TODO uncomment below to test "IsType" TemplateNamespaceField - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarNamespace' - /// - [Fact] - public void VarNamespaceTest() - { - // TODO unit test for the property 'VarNamespace' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/UploadMediaTests.cs b/csharp/src/OneMessage.io.Test/Model/UploadMediaTests.cs deleted file mode 100644 index 5613a75..0000000 --- a/csharp/src/OneMessage.io.Test/Model/UploadMediaTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing UploadMedia - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class UploadMediaTests : IDisposable - { - // TODO uncomment below to declare an instance variable for UploadMedia - //private UploadMedia instance; - - public UploadMediaTests() - { - // TODO uncomment below to create an instance of UploadMedia - //instance = new UploadMedia(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of UploadMedia - /// - [Fact] - public void UploadMediaInstanceTest() - { - // TODO uncomment below to test "IsType" UploadMedia - //Assert.IsType(instance); - } - - /// - /// Test the property 'Body' - /// - [Fact] - public void BodyTest() - { - // TODO unit test for the property 'Body' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/Model/WebhookUrlTests.cs b/csharp/src/OneMessage.io.Test/Model/WebhookUrlTests.cs deleted file mode 100644 index 64378a1..0000000 --- a/csharp/src/OneMessage.io.Test/Model/WebhookUrlTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using OneMessage.io.Model; -using OneMessage.io.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace OneMessage.io.Test.Model -{ - /// - /// Class for testing WebhookUrl - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class WebhookUrlTests : IDisposable - { - // TODO uncomment below to declare an instance variable for WebhookUrl - //private WebhookUrl instance; - - public WebhookUrlTests() - { - // TODO uncomment below to create an instance of WebhookUrl - //instance = new WebhookUrl(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of WebhookUrl - /// - [Fact] - public void WebhookUrlInstanceTest() - { - // TODO uncomment below to test "IsType" WebhookUrl - //Assert.IsType(instance); - } - - /// - /// Test the property 'VarWebhookUrl' - /// - [Fact] - public void VarWebhookUrlTest() - { - // TODO unit test for the property 'VarWebhookUrl' - } - } -} diff --git a/csharp/src/OneMessage.io.Test/OneMessage.io.Test.csproj b/csharp/src/OneMessage.io.Test/OneMessage.io.Test.csproj deleted file mode 100644 index f8e466f..0000000 --- a/csharp/src/OneMessage.io.Test/OneMessage.io.Test.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - OneMessage.io.Test - OneMessage.io.Test - net7.0;net48 - false - - - - - - - - - - - - diff --git a/csharp/src/OneMessage.io/Api/ChannelApi.cs b/csharp/src/OneMessage.io/Api/ChannelApi.cs deleted file mode 100644 index 2178731..0000000 --- a/csharp/src/OneMessage.io/Api/ChannelApi.cs +++ /dev/null @@ -1,1845 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace OneMessage.io.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IChannelApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Get Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetCommerce - GetCommerce GetCommerce(int operationIndex = 0); - - /// - /// Get Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetCommerce - ApiResponse GetCommerceWithHttpInfo(int operationIndex = 0); - /// - /// Get Extended Channel statistics - /// - /// - /// Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ChannelExtendedStatistics - ChannelExtendedStatistics GetExtendedStatistics(int operationIndex = 0); - - /// - /// Get Extended Channel statistics - /// - /// - /// Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ChannelExtendedStatistics - ApiResponse GetExtendedStatisticsWithHttpInfo(int operationIndex = 0); - /// - /// Get Profile Info - /// - /// - /// Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetMe - GetMe GetMe(int operationIndex = 0); - - /// - /// Get Profile Info - /// - /// - /// Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetMe - ApiResponse GetMeWithHttpInfo(int operationIndex = 0); - /// - /// Get Settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Settings - Settings GetSettings(int operationIndex = 0); - - /// - /// Get Settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Settings - ApiResponse GetSettingsWithHttpInfo(int operationIndex = 0); - /// - /// Get Channel statistics - /// - /// - /// Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// ChannelStatistics - ChannelStatistics GetStatistics(string date = default(string), int operationIndex = 0); - - /// - /// Get Channel statistics - /// - /// - /// Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// ApiResponse of ChannelStatistics - ApiResponse GetStatisticsWithHttpInfo(string date = default(string), int operationIndex = 0); - /// - /// Get Status - /// - /// - /// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ChannelStatus - ChannelStatus GetStatus(int operationIndex = 0); - - /// - /// Get Status - /// - /// - /// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ChannelStatus - ApiResponse GetStatusWithHttpInfo(int operationIndex = 0); - /// - /// Get channel server IP - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetIP - GetIP OutputIP(int operationIndex = 0); - - /// - /// Get channel server IP - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetIP - ApiResponse OutputIPWithHttpInfo(int operationIndex = 0); - /// - /// Change user info - /// - /// - /// Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetMe - SetMe SetMe(SetMeRequest setMeRequest, int operationIndex = 0); - - /// - /// Change user info - /// - /// - /// Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetMe - ApiResponse SetMeWithHttpInfo(SetMeRequest setMeRequest, int operationIndex = 0); - /// - /// Set settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetSettings200Response - SetSettings200Response SetSettings(Settings settings, int operationIndex = 0); - - /// - /// Set settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetSettings200Response - ApiResponse SetSettingsWithHttpInfo(Settings settings, int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IChannelApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Get Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetCommerce - System.Threading.Tasks.Task GetCommerceAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetCommerce) - System.Threading.Tasks.Task> GetCommerceWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Extended Channel statistics - /// - /// - /// Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ChannelExtendedStatistics - System.Threading.Tasks.Task GetExtendedStatisticsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Extended Channel statistics - /// - /// - /// Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ChannelExtendedStatistics) - System.Threading.Tasks.Task> GetExtendedStatisticsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Profile Info - /// - /// - /// Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetMe - System.Threading.Tasks.Task GetMeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Profile Info - /// - /// - /// Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetMe) - System.Threading.Tasks.Task> GetMeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Settings - System.Threading.Tasks.Task GetSettingsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Settings) - System.Threading.Tasks.Task> GetSettingsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Channel statistics - /// - /// - /// Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ChannelStatistics - System.Threading.Tasks.Task GetStatisticsAsync(string date = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Channel statistics - /// - /// - /// Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ChannelStatistics) - System.Threading.Tasks.Task> GetStatisticsWithHttpInfoAsync(string date = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Status - /// - /// - /// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ChannelStatus - System.Threading.Tasks.Task GetStatusAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Status - /// - /// - /// Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ChannelStatus) - System.Threading.Tasks.Task> GetStatusWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get channel server IP - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetIP - System.Threading.Tasks.Task OutputIPAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get channel server IP - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetIP) - System.Threading.Tasks.Task> OutputIPWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Change user info - /// - /// - /// Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetMe - System.Threading.Tasks.Task SetMeAsync(SetMeRequest setMeRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Change user info - /// - /// - /// Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetMe) - System.Threading.Tasks.Task> SetMeWithHttpInfoAsync(SetMeRequest setMeRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Set settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetSettings200Response - System.Threading.Tasks.Task SetSettingsAsync(Settings settings, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Set settings - /// - /// - /// **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetSettings200Response) - System.Threading.Tasks.Task> SetSettingsWithHttpInfoAsync(Settings settings, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IChannelApi : IChannelApiSync, IChannelApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ChannelApi : IChannelApi - { - private OneMessage.io.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ChannelApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ChannelApi(string basePath) - { - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - new OneMessage.io.Client.Configuration { BasePath = basePath } - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public ChannelApi(OneMessage.io.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public ChannelApi(OneMessage.io.Client.ISynchronousClient client, OneMessage.io.Client.IAsynchronousClient asyncClient, OneMessage.io.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public OneMessage.io.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public OneMessage.io.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public OneMessage.io.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public OneMessage.io.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Get Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetCommerce - public GetCommerce GetCommerce(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = GetCommerceWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetCommerce - public OneMessage.io.Client.ApiResponse GetCommerceWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetCommerce"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/commerce", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetCommerce", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetCommerce - public async System.Threading.Tasks.Task GetCommerceAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await GetCommerceWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetCommerce) - public async System.Threading.Tasks.Task> GetCommerceWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetCommerce"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/commerce", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetCommerce", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Extended Channel statistics Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ChannelExtendedStatistics - public ChannelExtendedStatistics GetExtendedStatistics(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = GetExtendedStatisticsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get Extended Channel statistics Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ChannelExtendedStatistics - public OneMessage.io.Client.ApiResponse GetExtendedStatisticsWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetExtendedStatistics"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/extendedStatistics", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetExtendedStatistics", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Extended Channel statistics Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ChannelExtendedStatistics - public async System.Threading.Tasks.Task GetExtendedStatisticsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await GetExtendedStatisticsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Extended Channel statistics Get channel usage extended statistics - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ChannelExtendedStatistics) - public async System.Threading.Tasks.Task> GetExtendedStatisticsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetExtendedStatistics"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/extendedStatistics", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetExtendedStatistics", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Profile Info Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetMe - public GetMe GetMe(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = GetMeWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get Profile Info Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetMe - public OneMessage.io.Client.ApiResponse GetMeWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetMe"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/me", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetMe", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Profile Info Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetMe - public async System.Threading.Tasks.Task GetMeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await GetMeWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Profile Info Use this edge to retrieve your profile's About info - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetMe) - public async System.Threading.Tasks.Task> GetMeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetMe"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/me", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetMe", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Settings - public Settings GetSettings(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = GetSettingsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get Settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Settings - public OneMessage.io.Client.ApiResponse GetSettingsWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetSettings"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/settings", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetSettings", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Settings - public async System.Threading.Tasks.Task GetSettingsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await GetSettingsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Settings) - public async System.Threading.Tasks.Task> GetSettingsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetSettings"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetSettings", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Channel statistics Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// ChannelStatistics - public ChannelStatistics GetStatistics(string date = default(string), int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = GetStatisticsWithHttpInfo(date); - return localVarResponse.Data; - } - - /// - /// Get Channel statistics Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// ApiResponse of ChannelStatistics - public OneMessage.io.Client.ApiResponse GetStatisticsWithHttpInfo(string date = default(string), int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (date != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "date", date)); - } - - localVarRequestOptions.Operation = "ChannelApi.GetStatistics"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/statistics", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetStatistics", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Channel statistics Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ChannelStatistics - public async System.Threading.Tasks.Task GetStatisticsAsync(string date = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await GetStatisticsWithHttpInfoAsync(date, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Channel statistics Get channel usage statistics - /// - /// Thrown when fails to make API call - /// Month and year in format mm.YYYY. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ChannelStatistics) - public async System.Threading.Tasks.Task> GetStatisticsWithHttpInfoAsync(string date = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (date != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "date", date)); - } - - localVarRequestOptions.Operation = "ChannelApi.GetStatistics"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/statistics", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetStatistics", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Status Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ChannelStatus - public ChannelStatus GetStatus(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = GetStatusWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get Status Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ChannelStatus - public OneMessage.io.Client.ApiResponse GetStatusWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/status", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Status Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ChannelStatus - public async System.Threading.Tasks.Task GetStatusAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await GetStatusWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Status Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ChannelStatus) - public async System.Threading.Tasks.Task> GetStatusWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.GetStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/status", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get channel server IP - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetIP - public GetIP OutputIP(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = OutputIPWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get channel server IP - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetIP - public OneMessage.io.Client.ApiResponse OutputIPWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.OutputIP"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/outputIP", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("OutputIP", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get channel server IP - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetIP - public async System.Threading.Tasks.Task OutputIPAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await OutputIPWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get channel server IP - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetIP) - public async System.Threading.Tasks.Task> OutputIPWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "ChannelApi.OutputIP"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/outputIP", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("OutputIP", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Change user info Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetMe - public SetMe SetMe(SetMeRequest setMeRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SetMeWithHttpInfo(setMeRequest); - return localVarResponse.Data; - } - - /// - /// Change user info Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetMe - public OneMessage.io.Client.ApiResponse SetMeWithHttpInfo(SetMeRequest setMeRequest, int operationIndex = 0) - { - // verify the required parameter 'setMeRequest' is set - if (setMeRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'setMeRequest' when calling ChannelApi->SetMe"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = setMeRequest; - - localVarRequestOptions.Operation = "ChannelApi.SetMe"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/me", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetMe", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Change user info Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetMe - public async System.Threading.Tasks.Task SetMeAsync(SetMeRequest setMeRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SetMeWithHttpInfoAsync(setMeRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Change user info Change user info - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetMe) - public async System.Threading.Tasks.Task> SetMeWithHttpInfoAsync(SetMeRequest setMeRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'setMeRequest' is set - if (setMeRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'setMeRequest' when calling ChannelApi->SetMe"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = setMeRequest; - - localVarRequestOptions.Operation = "ChannelApi.SetMe"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/me", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetMe", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Set settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetSettings200Response - public SetSettings200Response SetSettings(Settings settings, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SetSettingsWithHttpInfo(settings); - return localVarResponse.Data; - } - - /// - /// Set settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetSettings200Response - public OneMessage.io.Client.ApiResponse SetSettingsWithHttpInfo(Settings settings, int operationIndex = 0) - { - // verify the required parameter 'settings' is set - if (settings == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'settings' when calling ChannelApi->SetSettings"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = settings; - - localVarRequestOptions.Operation = "ChannelApi.SetSettings"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/settings", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetSettings", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Set settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetSettings200Response - public async System.Threading.Tasks.Task SetSettingsAsync(Settings settings, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SetSettingsWithHttpInfoAsync(settings, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Set settings **webhookUrl** - Http or https URL for receiving notifications. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetSettings200Response) - public async System.Threading.Tasks.Task> SetSettingsWithHttpInfoAsync(Settings settings, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'settings' is set - if (settings == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'settings' when calling ChannelApi->SetSettings"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = settings; - - localVarRequestOptions.Operation = "ChannelApi.SetSettings"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetSettings", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/csharp/src/OneMessage.io/Api/MediaApi.cs b/csharp/src/OneMessage.io/Api/MediaApi.cs deleted file mode 100644 index 16ea0ce..0000000 --- a/csharp/src/OneMessage.io/Api/MediaApi.cs +++ /dev/null @@ -1,366 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace OneMessage.io.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMediaApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Upload media & get mediaId - /// - /// - /// Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// MediaId - MediaId UploadMedia(UploadMedia uploadMedia, int operationIndex = 0); - - /// - /// Upload media & get mediaId - /// - /// - /// Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of MediaId - ApiResponse UploadMediaWithHttpInfo(UploadMedia uploadMedia, int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMediaApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Upload media & get mediaId - /// - /// - /// Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of MediaId - System.Threading.Tasks.Task UploadMediaAsync(UploadMedia uploadMedia, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Upload media & get mediaId - /// - /// - /// Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MediaId) - System.Threading.Tasks.Task> UploadMediaWithHttpInfoAsync(UploadMedia uploadMedia, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMediaApi : IMediaApiSync, IMediaApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class MediaApi : IMediaApi - { - private OneMessage.io.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public MediaApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public MediaApi(string basePath) - { - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - new OneMessage.io.Client.Configuration { BasePath = basePath } - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public MediaApi(OneMessage.io.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public MediaApi(OneMessage.io.Client.ISynchronousClient client, OneMessage.io.Client.IAsynchronousClient asyncClient, OneMessage.io.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public OneMessage.io.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public OneMessage.io.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public OneMessage.io.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public OneMessage.io.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Upload media & get mediaId Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// MediaId - public MediaId UploadMedia(UploadMedia uploadMedia, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = UploadMediaWithHttpInfo(uploadMedia); - return localVarResponse.Data; - } - - /// - /// Upload media & get mediaId Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of MediaId - public OneMessage.io.Client.ApiResponse UploadMediaWithHttpInfo(UploadMedia uploadMedia, int operationIndex = 0) - { - // verify the required parameter 'uploadMedia' is set - if (uploadMedia == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'uploadMedia' when calling MediaApi->UploadMedia"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = uploadMedia; - - localVarRequestOptions.Operation = "MediaApi.UploadMedia"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/uploadMedia", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UploadMedia", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Upload media & get mediaId Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of MediaId - public async System.Threading.Tasks.Task UploadMediaAsync(UploadMedia uploadMedia, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await UploadMediaWithHttpInfoAsync(uploadMedia, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Upload media & get mediaId Upload media and get mediaId. Uploaded media can be sent in template - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MediaId) - public async System.Threading.Tasks.Task> UploadMediaWithHttpInfoAsync(UploadMedia uploadMedia, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'uploadMedia' is set - if (uploadMedia == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'uploadMedia' when calling MediaApi->UploadMedia"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = uploadMedia; - - localVarRequestOptions.Operation = "MediaApi.UploadMedia"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/uploadMedia", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UploadMedia", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/csharp/src/OneMessage.io/Api/MessagingApi.cs b/csharp/src/OneMessage.io/Api/MessagingApi.cs deleted file mode 100644 index 15bae65..0000000 --- a/csharp/src/OneMessage.io/Api/MessagingApi.cs +++ /dev/null @@ -1,1686 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace OneMessage.io.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMessagingApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Get messages list - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// GetMessages - GetMessages MessagesList(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0); - - /// - /// Get messages list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// ApiResponse of GetMessages - ApiResponse MessagesListWithHttpInfo(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0); - /// - /// Mark message as read - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// SetMe - SetMe ReadMessage(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0); - - /// - /// Mark message as read - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of SetMe - ApiResponse ReadMessageWithHttpInfo(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0); - /// - /// Send a Contact - /// - /// - /// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendContact(SendContactRequest sendContactRequest, int operationIndex = 0); - - /// - /// Send a Contact - /// - /// - /// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendContactWithHttpInfo(SendContactRequest sendContactRequest, int operationIndex = 0); - /// - /// Send a File - /// - /// - /// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendFile(SendFileRequest sendFileRequest, int operationIndex = 0); - - /// - /// Send a File - /// - /// - /// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendFileWithHttpInfo(SendFileRequest sendFileRequest, int operationIndex = 0); - /// - /// Send List Message - /// - /// - /// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendList(SendListRequest sendListRequest, int operationIndex = 0); - - /// - /// Send List Message - /// - /// - /// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendListWithHttpInfo(SendListRequest sendListRequest, int operationIndex = 0); - /// - /// Send a Location - /// - /// - /// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendLocation(SendLocationRequest sendLocationRequest, int operationIndex = 0); - - /// - /// Send a Location - /// - /// - /// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendLocationWithHttpInfo(SendLocationRequest sendLocationRequest, int operationIndex = 0); - /// - /// Send a Message - /// - /// - /// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendMessage(SendMessageRequest sendMessageRequest, int operationIndex = 0); - - /// - /// Send a Message - /// - /// - /// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendMessageWithHttpInfo(SendMessageRequest sendMessageRequest, int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMessagingApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Get messages list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetMessages - System.Threading.Tasks.Task MessagesListAsync(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get messages list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetMessages) - System.Threading.Tasks.Task> MessagesListWithHttpInfoAsync(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Mark message as read - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetMe - System.Threading.Tasks.Task ReadMessageAsync(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Mark message as read - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetMe) - System.Threading.Tasks.Task> ReadMessageWithHttpInfoAsync(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send a Contact - /// - /// - /// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendContactAsync(SendContactRequest sendContactRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send a Contact - /// - /// - /// Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendContactWithHttpInfoAsync(SendContactRequest sendContactRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send a File - /// - /// - /// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendFileAsync(SendFileRequest sendFileRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send a File - /// - /// - /// Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendFileWithHttpInfoAsync(SendFileRequest sendFileRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send List Message - /// - /// - /// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendListAsync(SendListRequest sendListRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send List Message - /// - /// - /// Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendListWithHttpInfoAsync(SendListRequest sendListRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send a Location - /// - /// - /// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendLocationAsync(SendLocationRequest sendLocationRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send a Location - /// - /// - /// Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendLocationWithHttpInfoAsync(SendLocationRequest sendLocationRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send a Message - /// - /// - /// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendMessageAsync(SendMessageRequest sendMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send a Message - /// - /// - /// Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendMessageWithHttpInfoAsync(SendMessageRequest sendMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMessagingApi : IMessagingApiSync, IMessagingApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class MessagingApi : IMessagingApi - { - private OneMessage.io.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public MessagingApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public MessagingApi(string basePath) - { - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - new OneMessage.io.Client.Configuration { BasePath = basePath } - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public MessagingApi(OneMessage.io.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public MessagingApi(OneMessage.io.Client.ISynchronousClient client, OneMessage.io.Client.IAsynchronousClient asyncClient, OneMessage.io.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public OneMessage.io.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public OneMessage.io.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public OneMessage.io.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public OneMessage.io.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Get messages list - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// GetMessages - public GetMessages MessagesList(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = MessagesListWithHttpInfo(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - return localVarResponse.Data; - } - - /// - /// Get messages list - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// ApiResponse of GetMessages - public OneMessage.io.Client.ApiResponse MessagesListWithHttpInfo(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (last != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "last", last)); - } - if (lastMessageNumber != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "lastMessageNumber", lastMessageNumber)); - } - if (firstMessageNumber != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "firstMessageNumber", firstMessageNumber)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (chatId != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "chatId", chatId)); - } - if (minTime != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "min_time", minTime)); - } - if (maxTime != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "max_time", maxTime)); - } - if (msgId != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "msgId", msgId)); - } - - localVarRequestOptions.Operation = "MessagingApi.MessagesList"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/messages", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("MessagesList", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get messages list - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetMessages - public async System.Threading.Tasks.Task MessagesListAsync(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await MessagesListWithHttpInfoAsync(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get messages list - /// - /// Thrown when fails to make API call - /// Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - /// The lastMessageNumber parameter from the last response. Example: 100 (optional) - /// The firstMessageNumber parameter from the last response. Example: 1 (optional) - /// Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - /// Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - /// Filter messages received after specified time. Example: 1665396610 (optional) - /// Filter messages received before specified time. Example: 1665396610 (optional) - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetMessages) - public async System.Threading.Tasks.Task> MessagesListWithHttpInfoAsync(bool? last = default(bool?), int? lastMessageNumber = default(int?), int? firstMessageNumber = default(int?), int? limit = default(int?), string chatId = default(string), int? minTime = default(int?), int? maxTime = default(int?), string msgId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (last != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "last", last)); - } - if (lastMessageNumber != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "lastMessageNumber", lastMessageNumber)); - } - if (firstMessageNumber != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "firstMessageNumber", firstMessageNumber)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (chatId != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "chatId", chatId)); - } - if (minTime != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "min_time", minTime)); - } - if (maxTime != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "max_time", maxTime)); - } - if (msgId != null) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "msgId", msgId)); - } - - localVarRequestOptions.Operation = "MessagingApi.MessagesList"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/messages", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("MessagesList", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Mark message as read - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// SetMe - public SetMe ReadMessage(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = ReadMessageWithHttpInfo(readMessageRequest); - return localVarResponse.Data; - } - - /// - /// Mark message as read - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of SetMe - public OneMessage.io.Client.ApiResponse ReadMessageWithHttpInfo(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = readMessageRequest; - - localVarRequestOptions.Operation = "MessagingApi.ReadMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/readMessage", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ReadMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Mark message as read - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetMe - public async System.Threading.Tasks.Task ReadMessageAsync(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await ReadMessageWithHttpInfoAsync(readMessageRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Mark message as read - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetMe) - public async System.Threading.Tasks.Task> ReadMessageWithHttpInfoAsync(ReadMessageRequest readMessageRequest = default(ReadMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = readMessageRequest; - - localVarRequestOptions.Operation = "MessagingApi.ReadMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/readMessage", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ReadMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Contact Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendContact(SendContactRequest sendContactRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendContactWithHttpInfo(sendContactRequest); - return localVarResponse.Data; - } - - /// - /// Send a Contact Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendContactWithHttpInfo(SendContactRequest sendContactRequest, int operationIndex = 0) - { - // verify the required parameter 'sendContactRequest' is set - if (sendContactRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendContactRequest' when calling MessagingApi->SendContact"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendContactRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendContact"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendContact", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendContact", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Contact Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendContactAsync(SendContactRequest sendContactRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendContactWithHttpInfoAsync(sendContactRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send a Contact Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendContactWithHttpInfoAsync(SendContactRequest sendContactRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendContactRequest' is set - if (sendContactRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendContactRequest' when calling MessagingApi->SendContact"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendContactRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendContact"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendContact", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendContact", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a File Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendFile(SendFileRequest sendFileRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendFileWithHttpInfo(sendFileRequest); - return localVarResponse.Data; - } - - /// - /// Send a File Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendFileWithHttpInfo(SendFileRequest sendFileRequest, int operationIndex = 0) - { - // verify the required parameter 'sendFileRequest' is set - if (sendFileRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendFileRequest' when calling MessagingApi->SendFile"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendFileRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendFile"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendFile", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a File Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendFileAsync(SendFileRequest sendFileRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendFileWithHttpInfoAsync(sendFileRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send a File Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendFileWithHttpInfoAsync(SendFileRequest sendFileRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendFileRequest' is set - if (sendFileRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendFileRequest' when calling MessagingApi->SendFile"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendFileRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendFile"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendFile", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send List Message Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendList(SendListRequest sendListRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendListWithHttpInfo(sendListRequest); - return localVarResponse.Data; - } - - /// - /// Send List Message Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendListWithHttpInfo(SendListRequest sendListRequest, int operationIndex = 0) - { - // verify the required parameter 'sendListRequest' is set - if (sendListRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendListRequest' when calling MessagingApi->SendList"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendListRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendList"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendList", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendList", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send List Message Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendListAsync(SendListRequest sendListRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendListWithHttpInfoAsync(sendListRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send List Message Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendListWithHttpInfoAsync(SendListRequest sendListRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendListRequest' is set - if (sendListRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendListRequest' when calling MessagingApi->SendList"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendListRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendList"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendList", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Location Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendLocation(SendLocationRequest sendLocationRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendLocationWithHttpInfo(sendLocationRequest); - return localVarResponse.Data; - } - - /// - /// Send a Location Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendLocationWithHttpInfo(SendLocationRequest sendLocationRequest, int operationIndex = 0) - { - // verify the required parameter 'sendLocationRequest' is set - if (sendLocationRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendLocationRequest' when calling MessagingApi->SendLocation"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendLocationRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendLocation"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendLocation", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendLocation", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Location Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendLocationAsync(SendLocationRequest sendLocationRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendLocationWithHttpInfoAsync(sendLocationRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send a Location Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendLocationWithHttpInfoAsync(SendLocationRequest sendLocationRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendLocationRequest' is set - if (sendLocationRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendLocationRequest' when calling MessagingApi->SendLocation"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendLocationRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendLocation"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendLocation", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendLocation", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Message Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendMessage(SendMessageRequest sendMessageRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendMessageWithHttpInfo(sendMessageRequest); - return localVarResponse.Data; - } - - /// - /// Send a Message Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendMessageWithHttpInfo(SendMessageRequest sendMessageRequest, int operationIndex = 0) - { - // verify the required parameter 'sendMessageRequest' is set - if (sendMessageRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendMessageRequest' when calling MessagingApi->SendMessage"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendMessageRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendMessage", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Message Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendMessageAsync(SendMessageRequest sendMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendMessageWithHttpInfoAsync(sendMessageRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send a Message Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendMessageWithHttpInfoAsync(SendMessageRequest sendMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendMessageRequest' is set - if (sendMessageRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendMessageRequest' when calling MessagingApi->SendMessage"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendMessageRequest; - - localVarRequestOptions.Operation = "MessagingApi.SendMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendMessage", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/csharp/src/OneMessage.io/Api/ProductsCatalogsApi.cs b/csharp/src/OneMessage.io/Api/ProductsCatalogsApi.cs deleted file mode 100644 index cb35ab9..0000000 --- a/csharp/src/OneMessage.io/Api/ProductsCatalogsApi.cs +++ /dev/null @@ -1,572 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace OneMessage.io.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IProductsCatalogsApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Send a Product - /// - /// - /// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendProduct(SendProductRequest sendProductRequest, int operationIndex = 0); - - /// - /// Send a Product - /// - /// - /// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendProductWithHttpInfo(SendProductRequest sendProductRequest, int operationIndex = 0); - /// - /// Set Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetCommerce - SetCommerce SetCommerce(Commerce commerce, int operationIndex = 0); - - /// - /// Set Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetCommerce - ApiResponse SetCommerceWithHttpInfo(Commerce commerce, int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IProductsCatalogsApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Send a Product - /// - /// - /// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendProductAsync(SendProductRequest sendProductRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send a Product - /// - /// - /// Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendProductWithHttpInfoAsync(SendProductRequest sendProductRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Set Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetCommerce - System.Threading.Tasks.Task SetCommerceAsync(Commerce commerce, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Set Commerce Settings - /// - /// - /// **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetCommerce) - System.Threading.Tasks.Task> SetCommerceWithHttpInfoAsync(Commerce commerce, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IProductsCatalogsApi : IProductsCatalogsApiSync, IProductsCatalogsApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ProductsCatalogsApi : IProductsCatalogsApi - { - private OneMessage.io.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ProductsCatalogsApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ProductsCatalogsApi(string basePath) - { - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - new OneMessage.io.Client.Configuration { BasePath = basePath } - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public ProductsCatalogsApi(OneMessage.io.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public ProductsCatalogsApi(OneMessage.io.Client.ISynchronousClient client, OneMessage.io.Client.IAsynchronousClient asyncClient, OneMessage.io.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public OneMessage.io.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public OneMessage.io.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public OneMessage.io.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public OneMessage.io.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Send a Product Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendProduct(SendProductRequest sendProductRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendProductWithHttpInfo(sendProductRequest); - return localVarResponse.Data; - } - - /// - /// Send a Product Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendProductWithHttpInfo(SendProductRequest sendProductRequest, int operationIndex = 0) - { - // verify the required parameter 'sendProductRequest' is set - if (sendProductRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendProductRequest' when calling ProductsCatalogsApi->SendProduct"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendProductRequest; - - localVarRequestOptions.Operation = "ProductsCatalogsApi.SendProduct"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendProduct", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendProduct", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send a Product Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendProductAsync(SendProductRequest sendProductRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendProductWithHttpInfoAsync(sendProductRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send a Product Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendProductWithHttpInfoAsync(SendProductRequest sendProductRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendProductRequest' is set - if (sendProductRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendProductRequest' when calling ProductsCatalogsApi->SendProduct"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendProductRequest; - - localVarRequestOptions.Operation = "ProductsCatalogsApi.SendProduct"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendProduct", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendProduct", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Set Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetCommerce - public SetCommerce SetCommerce(Commerce commerce, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SetCommerceWithHttpInfo(commerce); - return localVarResponse.Data; - } - - /// - /// Set Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetCommerce - public OneMessage.io.Client.ApiResponse SetCommerceWithHttpInfo(Commerce commerce, int operationIndex = 0) - { - // verify the required parameter 'commerce' is set - if (commerce == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'commerce' when calling ProductsCatalogsApi->SetCommerce"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = commerce; - - localVarRequestOptions.Operation = "ProductsCatalogsApi.SetCommerce"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/commerce", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetCommerce", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Set Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetCommerce - public async System.Threading.Tasks.Task SetCommerceAsync(Commerce commerce, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SetCommerceWithHttpInfoAsync(commerce, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Set Commerce Settings **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetCommerce) - public async System.Threading.Tasks.Task> SetCommerceWithHttpInfoAsync(Commerce commerce, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'commerce' is set - if (commerce == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'commerce' when calling ProductsCatalogsApi->SetCommerce"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = commerce; - - localVarRequestOptions.Operation = "ProductsCatalogsApi.SetCommerce"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/commerce", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetCommerce", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/csharp/src/OneMessage.io/Api/TemplatesApi.cs b/csharp/src/OneMessage.io/Api/TemplatesApi.cs deleted file mode 100644 index 31d77e8..0000000 --- a/csharp/src/OneMessage.io/Api/TemplatesApi.cs +++ /dev/null @@ -1,955 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace OneMessage.io.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITemplatesApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Create template - /// - /// - /// Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Object - Object AddTemplate(AddTemplateRequest addTemplateRequest, int operationIndex = 0); - - /// - /// Create template - /// - /// - /// Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object - ApiResponse AddTemplateWithHttpInfo(AddTemplateRequest addTemplateRequest, int operationIndex = 0); - /// - /// Remove template - /// - /// - /// Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetMe - SetMe RemoveTemplate(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0); - - /// - /// Remove template - /// - /// - /// Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetMe - ApiResponse RemoveTemplateWithHttpInfo(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0); - /// - /// Send Template Message - /// - /// - /// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - SendMessageStatus SendTemplate(SendTemplateRequest sendTemplateRequest, int operationIndex = 0); - - /// - /// Send Template Message - /// - /// - /// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - ApiResponse SendTemplateWithHttpInfo(SendTemplateRequest sendTemplateRequest, int operationIndex = 0); - /// - /// Get templates list - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetTemplates - GetTemplates TemplatesList(int operationIndex = 0); - - /// - /// Get templates list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetTemplates - ApiResponse TemplatesListWithHttpInfo(int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITemplatesApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Create template - /// - /// - /// Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Object - System.Threading.Tasks.Task AddTemplateAsync(AddTemplateRequest addTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Create template - /// - /// - /// Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Object) - System.Threading.Tasks.Task> AddTemplateWithHttpInfoAsync(AddTemplateRequest addTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Remove template - /// - /// - /// Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetMe - System.Threading.Tasks.Task RemoveTemplateAsync(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Remove template - /// - /// - /// Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetMe) - System.Threading.Tasks.Task> RemoveTemplateWithHttpInfoAsync(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send Template Message - /// - /// - /// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - System.Threading.Tasks.Task SendTemplateAsync(SendTemplateRequest sendTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send Template Message - /// - /// - /// Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - System.Threading.Tasks.Task> SendTemplateWithHttpInfoAsync(SendTemplateRequest sendTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get templates list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetTemplates - System.Threading.Tasks.Task TemplatesListAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get templates list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetTemplates) - System.Threading.Tasks.Task> TemplatesListWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITemplatesApi : ITemplatesApiSync, ITemplatesApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class TemplatesApi : ITemplatesApi - { - private OneMessage.io.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public TemplatesApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public TemplatesApi(string basePath) - { - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - new OneMessage.io.Client.Configuration { BasePath = basePath } - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public TemplatesApi(OneMessage.io.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public TemplatesApi(OneMessage.io.Client.ISynchronousClient client, OneMessage.io.Client.IAsynchronousClient asyncClient, OneMessage.io.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public OneMessage.io.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public OneMessage.io.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public OneMessage.io.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public OneMessage.io.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Create template Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Object - public Object AddTemplate(AddTemplateRequest addTemplateRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = AddTemplateWithHttpInfo(addTemplateRequest); - return localVarResponse.Data; - } - - /// - /// Create template Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object - public OneMessage.io.Client.ApiResponse AddTemplateWithHttpInfo(AddTemplateRequest addTemplateRequest, int operationIndex = 0) - { - // verify the required parameter 'addTemplateRequest' is set - if (addTemplateRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'addTemplateRequest' when calling TemplatesApi->AddTemplate"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = addTemplateRequest; - - localVarRequestOptions.Operation = "TemplatesApi.AddTemplate"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/addTemplate", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AddTemplate", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create template Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Object - public async System.Threading.Tasks.Task AddTemplateAsync(AddTemplateRequest addTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await AddTemplateWithHttpInfoAsync(addTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Create template Create new template for sending. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Object) - public async System.Threading.Tasks.Task> AddTemplateWithHttpInfoAsync(AddTemplateRequest addTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'addTemplateRequest' is set - if (addTemplateRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'addTemplateRequest' when calling TemplatesApi->AddTemplate"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = addTemplateRequest; - - localVarRequestOptions.Operation = "TemplatesApi.AddTemplate"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/addTemplate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AddTemplate", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Remove template Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetMe - public SetMe RemoveTemplate(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = RemoveTemplateWithHttpInfo(removeTemplateRequest); - return localVarResponse.Data; - } - - /// - /// Remove template Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetMe - public OneMessage.io.Client.ApiResponse RemoveTemplateWithHttpInfo(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0) - { - // verify the required parameter 'removeTemplateRequest' is set - if (removeTemplateRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'removeTemplateRequest' when calling TemplatesApi->RemoveTemplate"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = removeTemplateRequest; - - localVarRequestOptions.Operation = "TemplatesApi.RemoveTemplate"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/removeTemplate", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RemoveTemplate", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Remove template Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetMe - public async System.Threading.Tasks.Task RemoveTemplateAsync(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await RemoveTemplateWithHttpInfoAsync(removeTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Remove template Deleted template can not be restored. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetMe) - public async System.Threading.Tasks.Task> RemoveTemplateWithHttpInfoAsync(RemoveTemplateRequest removeTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'removeTemplateRequest' is set - if (removeTemplateRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'removeTemplateRequest' when calling TemplatesApi->RemoveTemplate"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = removeTemplateRequest; - - localVarRequestOptions.Operation = "TemplatesApi.RemoveTemplate"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/removeTemplate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RemoveTemplate", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send Template Message Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SendMessageStatus - public SendMessageStatus SendTemplate(SendTemplateRequest sendTemplateRequest, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SendTemplateWithHttpInfo(sendTemplateRequest); - return localVarResponse.Data; - } - - /// - /// Send Template Message Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SendMessageStatus - public OneMessage.io.Client.ApiResponse SendTemplateWithHttpInfo(SendTemplateRequest sendTemplateRequest, int operationIndex = 0) - { - // verify the required parameter 'sendTemplateRequest' is set - if (sendTemplateRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendTemplateRequest' when calling TemplatesApi->SendTemplate"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendTemplateRequest; - - localVarRequestOptions.Operation = "TemplatesApi.SendTemplate"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/sendTemplate", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendTemplate", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Send Template Message Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SendMessageStatus - public async System.Threading.Tasks.Task SendTemplateAsync(SendTemplateRequest sendTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SendTemplateWithHttpInfoAsync(sendTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Send Template Message Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SendMessageStatus) - public async System.Threading.Tasks.Task> SendTemplateWithHttpInfoAsync(SendTemplateRequest sendTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'sendTemplateRequest' is set - if (sendTemplateRequest == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'sendTemplateRequest' when calling TemplatesApi->SendTemplate"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = sendTemplateRequest; - - localVarRequestOptions.Operation = "TemplatesApi.SendTemplate"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/sendTemplate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SendTemplate", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get templates list - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// GetTemplates - public GetTemplates TemplatesList(int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = TemplatesListWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get templates list - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of GetTemplates - public OneMessage.io.Client.ApiResponse TemplatesListWithHttpInfo(int operationIndex = 0) - { - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TemplatesApi.TemplatesList"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/templates", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("TemplatesList", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get templates list - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetTemplates - public async System.Threading.Tasks.Task TemplatesListAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await TemplatesListWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get templates list - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetTemplates) - public async System.Threading.Tasks.Task> TemplatesListWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TemplatesApi.TemplatesList"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/templates", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("TemplatesList", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/csharp/src/OneMessage.io/Api/WebhooksApi.cs b/csharp/src/OneMessage.io/Api/WebhooksApi.cs deleted file mode 100644 index 0efba3d..0000000 --- a/csharp/src/OneMessage.io/Api/WebhooksApi.cs +++ /dev/null @@ -1,565 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace OneMessage.io.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWebhooksApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Check ACKs - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// GetAckInfo - GetAckInfo AckHookInfo(string messageId, int operationIndex = 0); - - /// - /// Check ACKs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// ApiResponse of GetAckInfo - ApiResponse AckHookInfoWithHttpInfo(string messageId, int operationIndex = 0); - /// - /// Set webhook - /// - /// - /// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetWebhookStatus - SetWebhookStatus SetWebhook(WebhookUrl webhookUrl, int operationIndex = 0); - - /// - /// Set webhook - /// - /// - /// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetWebhookStatus - ApiResponse SetWebhookWithHttpInfo(WebhookUrl webhookUrl, int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWebhooksApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Check ACKs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetAckInfo - System.Threading.Tasks.Task AckHookInfoAsync(string messageId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Check ACKs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetAckInfo) - System.Threading.Tasks.Task> AckHookInfoWithHttpInfoAsync(string messageId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Set webhook - /// - /// - /// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetWebhookStatus - System.Threading.Tasks.Task SetWebhookAsync(WebhookUrl webhookUrl, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Set webhook - /// - /// - /// Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetWebhookStatus) - System.Threading.Tasks.Task> SetWebhookWithHttpInfoAsync(WebhookUrl webhookUrl, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWebhooksApi : IWebhooksApiSync, IWebhooksApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class WebhooksApi : IWebhooksApi - { - private OneMessage.io.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public WebhooksApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public WebhooksApi(string basePath) - { - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - new OneMessage.io.Client.Configuration { BasePath = basePath } - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public WebhooksApi(OneMessage.io.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = OneMessage.io.Client.Configuration.MergeConfigurations( - OneMessage.io.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new OneMessage.io.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public WebhooksApi(OneMessage.io.Client.ISynchronousClient client, OneMessage.io.Client.IAsynchronousClient asyncClient, OneMessage.io.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = OneMessage.io.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public OneMessage.io.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public OneMessage.io.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public OneMessage.io.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public OneMessage.io.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Check ACKs - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// GetAckInfo - public GetAckInfo AckHookInfo(string messageId, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = AckHookInfoWithHttpInfo(messageId); - return localVarResponse.Data; - } - - /// - /// Check ACKs - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// ApiResponse of GetAckInfo - public OneMessage.io.Client.ApiResponse AckHookInfoWithHttpInfo(string messageId, int operationIndex = 0) - { - // verify the required parameter 'messageId' is set - if (messageId == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'messageId' when calling WebhooksApi->AckHookInfo"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "messageId", messageId)); - - localVarRequestOptions.Operation = "WebhooksApi.AckHookInfo"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/hookInfo", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AckHookInfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Check ACKs - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GetAckInfo - public async System.Threading.Tasks.Task AckHookInfoAsync(string messageId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await AckHookInfoWithHttpInfoAsync(messageId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Check ACKs - /// - /// Thrown when fails to make API call - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GetAckInfo) - public async System.Threading.Tasks.Task> AckHookInfoWithHttpInfoAsync(string messageId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'messageId' is set - if (messageId == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'messageId' when calling WebhooksApi->AckHookInfo"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "messageId", messageId)); - - localVarRequestOptions.Operation = "WebhooksApi.AckHookInfo"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/hookInfo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AckHookInfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Set webhook Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// SetWebhookStatus - public SetWebhookStatus SetWebhook(WebhookUrl webhookUrl, int operationIndex = 0) - { - OneMessage.io.Client.ApiResponse localVarResponse = SetWebhookWithHttpInfo(webhookUrl); - return localVarResponse.Data; - } - - /// - /// Set webhook Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of SetWebhookStatus - public OneMessage.io.Client.ApiResponse SetWebhookWithHttpInfo(WebhookUrl webhookUrl, int operationIndex = 0) - { - // verify the required parameter 'webhookUrl' is set - if (webhookUrl == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'webhookUrl' when calling WebhooksApi->SetWebhook"); - } - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = webhookUrl; - - localVarRequestOptions.Operation = "WebhooksApi.SetWebhook"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/webhook", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetWebhook", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Set webhook Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of SetWebhookStatus - public async System.Threading.Tasks.Task SetWebhookAsync(WebhookUrl webhookUrl, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneMessage.io.Client.ApiResponse localVarResponse = await SetWebhookWithHttpInfoAsync(webhookUrl, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Set webhook Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SetWebhookStatus) - public async System.Threading.Tasks.Task> SetWebhookWithHttpInfoAsync(WebhookUrl webhookUrl, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'webhookUrl' is set - if (webhookUrl == null) - { - throw new OneMessage.io.Client.ApiException(400, "Missing required parameter 'webhookUrl' when calling WebhooksApi->SetWebhook"); - } - - - OneMessage.io.Client.RequestOptions localVarRequestOptions = new OneMessage.io.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded", - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneMessage.io.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneMessage.io.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = webhookUrl; - - localVarRequestOptions.Operation = "WebhooksApi.SetWebhook"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (token) required - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarRequestOptions.QueryParameters.Add(OneMessage.io.Client.ClientUtils.ParameterToMultiMap("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/webhook", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("SetWebhook", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/csharp/src/OneMessage.io/Client/ApiClient.cs b/csharp/src/OneMessage.io/Client/ApiClient.cs deleted file mode 100644 index e7d6625..0000000 --- a/csharp/src/OneMessage.io/Client/ApiClient.cs +++ /dev/null @@ -1,833 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters; -using System.Text; -using System.Threading; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Web; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using RestSharp; -using RestSharp.Serializers; -using RestSharpMethod = RestSharp.Method; -using Polly; - -namespace OneMessage.io.Client -{ - /// - /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. - /// - internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer - { - private readonly IReadableConfiguration _configuration; - private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - public CustomJsonCodec(IReadableConfiguration configuration) - { - _configuration = configuration; - } - - public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) - { - _serializerSettings = serializerSettings; - _configuration = configuration; - } - - /// - /// Serialize the object into a JSON string. - /// - /// Object to be serialized. - /// A JSON string. - public string Serialize(object obj) - { - if (obj != null && obj is OneMessage.io.Model.AbstractOpenAPISchema) - { - // the object to be serialized is an oneOf/anyOf schema - return ((OneMessage.io.Model.AbstractOpenAPISchema)obj).ToJson(); - } - else - { - return JsonConvert.SerializeObject(obj, _serializerSettings); - } - } - - public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); - - public T Deserialize(RestResponse response) - { - var result = (T)Deserialize(response, typeof(T)); - return result; - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - internal object Deserialize(RestResponse response, Type type) - { - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - var bytes = response.RawBytes; - if (response.Headers != null) - { - var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) - ? Path.GetTempPath() - : _configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in response.Headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(bytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return Convert.ChangeType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - public ISerializer Serializer => this; - public IDeserializer Deserializer => this; - - public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept; - - public SupportsContentType SupportsContentType => contentType => - contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || - contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - - public ContentType ContentType { get; set; } = RestSharp.ContentType.Json; - - public DataFormat DataFormat => DataFormat.Json; - } - /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), - /// encapsulating general REST accessor use cases. - /// - public partial class ApiClient : ISynchronousClient, IAsynchronousClient - { - private readonly string _baseUrl; - - /// - /// Specifies the settings on a object. - /// These settings can be adjusted to accommodate custom serialization rules. - /// - public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(RestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(RestRequest request, RestResponse response); - - /// - /// Initializes a new instance of the , defaulting to the global configurations' base url. - /// - public ApiClient() - { - _baseUrl = OneMessage.io.Client.GlobalConfiguration.Instance.BasePath; - } - - /// - /// Initializes a new instance of the - /// - /// The target service's base path in URL format. - /// - public ApiClient(string basePath) - { - if (string.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - _baseUrl = basePath; - } - - /// - /// Constructs the RestSharp version of an http method - /// - /// Swagger Client Custom HttpMethod - /// RestSharp's HttpMethod instance. - /// - private RestSharpMethod Method(HttpMethod method) - { - RestSharpMethod other; - switch (method) - { - case HttpMethod.Get: - other = RestSharpMethod.Get; - break; - case HttpMethod.Post: - other = RestSharpMethod.Post; - break; - case HttpMethod.Put: - other = RestSharpMethod.Put; - break; - case HttpMethod.Delete: - other = RestSharpMethod.Delete; - break; - case HttpMethod.Head: - other = RestSharpMethod.Head; - break; - case HttpMethod.Options: - other = RestSharpMethod.Options; - break; - case HttpMethod.Patch: - other = RestSharpMethod.Patch; - break; - default: - throw new ArgumentOutOfRangeException("method", method, null); - } - - return other; - } - - /// - /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the RestSharp request. - /// - /// The http verb. - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// [private] A new RestRequest instance. - /// - private RestRequest NewRequest( - HttpMethod method, - string path, - RequestOptions options, - IReadableConfiguration configuration) - { - if (path == null) throw new ArgumentNullException("path"); - if (options == null) throw new ArgumentNullException("options"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - RestRequest request = new RestRequest(path, Method(method)); - - if (options.PathParameters != null) - { - foreach (var pathParam in options.PathParameters) - { - request.AddParameter(pathParam.Key, pathParam.Value, ParameterType.UrlSegment); - } - } - - if (options.QueryParameters != null) - { - foreach (var queryParam in options.QueryParameters) - { - foreach (var value in queryParam.Value) - { - request.AddQueryParameter(queryParam.Key, value); - } - } - } - - if (configuration.DefaultHeaders != null) - { - foreach (var headerParam in configuration.DefaultHeaders) - { - request.AddHeader(headerParam.Key, headerParam.Value); - } - } - - if (options.HeaderParameters != null) - { - foreach (var headerParam in options.HeaderParameters) - { - foreach (var value in headerParam.Value) - { - request.AddHeader(headerParam.Key, value); - } - } - } - - if (options.FormParameters != null) - { - foreach (var formParam in options.FormParameters) - { - request.AddParameter(formParam.Key, formParam.Value); - } - } - - if (options.Data != null) - { - if (options.Data is Stream stream) - { - var contentType = "application/octet-stream"; - if (options.HeaderParameters != null) - { - var contentTypes = options.HeaderParameters["Content-Type"]; - contentType = contentTypes[0]; - } - - var bytes = ClientUtils.ReadAsBytes(stream); - request.AddParameter(contentType, bytes, ParameterType.RequestBody); - } - else - { - if (options.HeaderParameters != null) - { - var contentTypes = options.HeaderParameters["Content-Type"]; - if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json"))) - { - request.RequestFormat = DataFormat.Json; - } - else - { - // TODO: Generated client user should add additional handlers. RestSharp only supports XML and JSON, with XML as default. - } - } - else - { - // Here, we'll assume JSON APIs are more common. XML can be forced by adding produces/consumes to openapi spec explicitly. - request.RequestFormat = DataFormat.Json; - } - - request.AddJsonBody(options.Data); - } - } - - if (options.FileParameters != null) - { - foreach (var fileParam in options.FileParameters) - { - foreach (var file in fileParam.Value) - { - var bytes = ClientUtils.ReadAsBytes(file); - var fileStream = file as FileStream; - if (fileStream != null) - request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); - else - request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); - } - } - } - - return request; - } - - private ApiResponse ToApiResponse(RestResponse response) - { - T result = response.Data; - string rawContent = response.Content; - - var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent) - { - ErrorText = response.ErrorMessage, - Cookies = new List() - }; - - if (response.Headers != null) - { - foreach (var responseHeader in response.Headers) - { - transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - if (response.ContentHeaders != null) - { - foreach (var responseHeader in response.ContentHeaders) - { - transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - if (response.Cookies != null) - { - foreach (var responseCookies in response.Cookies.Cast()) - { - transformed.Cookies.Add( - new Cookie( - responseCookies.Name, - responseCookies.Value, - responseCookies.Path, - responseCookies.Domain) - ); - } - } - - return transformed; - } - - private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) - { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var cookies = new CookieContainer(); - - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } - } - - var clientOptions = new RestClientOptions(baseUrl) - { - ClientCertificates = configuration.ClientCertificates, - CookieContainer = cookies, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent, - UseDefaultCredentials = configuration.UseDefaultCredentials, - RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback - }; - - using (RestClient client = new RestClient(clientOptions, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) - { - InterceptRequest(request); - - RestResponse response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) - { - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute(request); - } - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(OneMessage.io.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - catch (Exception ex) - { - throw ex.InnerException != null ? ex.InnerException : ex; - } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } - else if (typeof(T).Name == "String") // for string response - { - response.Data = (T)(object)response.Content; - } - - InterceptResponse(request, response); - - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } - - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) - { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); - } - } - return result; - } - } - - private async Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var clientOptions = new RestClientOptions(baseUrl) - { - ClientCertificates = configuration.ClientCertificates, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent, - UseDefaultCredentials = configuration.UseDefaultCredentials - }; - - using (RestClient client = new RestClient(clientOptions, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) - { - InterceptRequest(request); - - RestResponse response; - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) - { - ErrorException = policyResult.FinalException - }; - } - else - { - response = await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); - } - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(OneMessage.io.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } - - InterceptResponse(request, response); - - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } - - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) - { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); - } - } - return result; - } - } - - #region IAsynchronousClient - /// - /// Make a HTTP GET request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP POST request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP PUT request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP DELETE request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP HEAD request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP OPTION request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP PATCH request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); - } - #endregion IAsynchronousClient - - #region ISynchronousClient - /// - /// Make a HTTP GET request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); - } - - /// - /// Make a HTTP POST request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); - } - - /// - /// Make a HTTP PUT request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); - } - - /// - /// Make a HTTP DELETE request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); - } - - /// - /// Make a HTTP HEAD request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); - } - - /// - /// Make a HTTP OPTION request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); - } - - /// - /// Make a HTTP PATCH request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); - } - #endregion ISynchronousClient - } -} diff --git a/csharp/src/OneMessage.io/Client/ApiException.cs b/csharp/src/OneMessage.io/Client/ApiException.cs deleted file mode 100644 index e09cb20..0000000 --- a/csharp/src/OneMessage.io/Client/ApiException.cs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; - -namespace OneMessage.io.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public object ErrorContent { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public Multimap Headers { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() { } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - /// HTTP Headers. - public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - this.Headers = headers; - } - } - -} diff --git a/csharp/src/OneMessage.io/Client/ApiResponse.cs b/csharp/src/OneMessage.io/Client/ApiResponse.cs deleted file mode 100644 index 12969fd..0000000 --- a/csharp/src/OneMessage.io/Client/ApiResponse.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Net; - -namespace OneMessage.io.Client -{ - /// - /// Provides a non-generic contract for the ApiResponse wrapper. - /// - public interface IApiResponse - { - /// - /// The data type of - /// - Type ResponseType { get; } - - /// - /// The content of this response - /// - Object Content { get; } - - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - HttpStatusCode StatusCode { get; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - Multimap Headers { get; } - - /// - /// Gets or sets any error text defined by the calling client. - /// - string ErrorText { get; set; } - - /// - /// Gets or sets any cookies passed along on the response. - /// - List Cookies { get; set; } - - /// - /// The raw content of this response - /// - string RawContent { get; } - } - - /// - /// API Response - /// - public class ApiResponse : IApiResponse - { - #region Properties - - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public HttpStatusCode StatusCode { get; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public Multimap Headers { get; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; } - - /// - /// Gets or sets any error text defined by the calling client. - /// - public string ErrorText { get; set; } - - /// - /// Gets or sets any cookies passed along on the response. - /// - public List Cookies { get; set; } - - /// - /// The content of this response - /// - public Type ResponseType - { - get { return typeof(T); } - } - - /// - /// The data type of - /// - public object Content - { - get { return Data; } - } - - /// - /// The raw content - /// - public string RawContent { get; } - - #endregion Properties - - #region Constructors - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - /// Raw content. - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) - { - StatusCode = statusCode; - Headers = headers; - Data = data; - RawContent = rawContent; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Data (parsed HTTP body) - /// Raw content. - public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) - { - } - - #endregion Constructors - } -} diff --git a/csharp/src/OneMessage.io/Client/ClientUtils.cs b/csharp/src/OneMessage.io/Client/ClientUtils.cs deleted file mode 100644 index 0397ce8..0000000 --- a/csharp/src/OneMessage.io/Client/ClientUtils.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; - -namespace OneMessage.io.Client -{ - /// - /// Utility functions providing some benefit to API client consumers. - /// - public static class ClientUtils - { - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - return match.Success ? match.Groups[1].Value : filename; - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi - /// Key name. - /// Value object. - /// A multimap of keys with 1..n associated values. - public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) - { - var parameters = new Multimap(); - - if (value is ICollection collection && collectionFormat == "multi") - { - foreach (var item in collection) - { - parameters.Add(name, ParameterToString(item)); - } - } - else if (value is IDictionary dictionary) - { - if(collectionFormat == "deepObject") { - foreach (DictionaryEntry entry in dictionary) - { - parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); - } - } - else { - foreach (DictionaryEntry entry in dictionary) - { - parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); - } - } - } - else - { - parameters.Add(name, ParameterToString(value)); - } - - return parameters; - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// An optional configuration instance, providing formatting options used in processing. - /// Formatted string. - public static string ParameterToString(object obj, IReadableConfiguration configuration = null) - { - if (obj is DateTime dateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is DateTimeOffset dateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is bool boolean) - return boolean ? "true" : "false"; - if (obj is ICollection collection) { - List entries = new List(); - foreach (var entry in collection) - entries.Add(ParameterToString(entry, configuration)); - return string.Join(",", entries); - } - if (obj is Enum && HasEnumMemberAttrValue(obj)) - return GetEnumMemberAttrValue(obj); - - return Convert.ToString(obj, CultureInfo.InvariantCulture); - } - - /// - /// Serializes the given object when not null. Otherwise return null. - /// - /// The object to serialize. - /// Serialized string. - public static string Serialize(object obj) - { - return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; - } - - /// - /// Encode string in base64 format. - /// - /// string to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - using (var ms = new MemoryStream()) - { - inputStream.CopyTo(ms); - return ms.ToArray(); - } - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public static string SelectHeaderContentType(string[] contentTypes) - { - if (contentTypes.Length == 0) - return null; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType)) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public static string SelectHeaderAccept(string[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return string.Join(",", accepts); - } - - /// - /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. - /// - public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - - /// - /// Check if the given MIME is a JSON MIME. - /// JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public static bool IsJsonMime(string mime) - { - if (string.IsNullOrWhiteSpace(mime)) return false; - - return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); - } - - /// - /// Is the Enum decorated with EnumMember Attribute - /// - /// - /// true if found - private static bool HasEnumMemberAttrValue(object enumVal) - { - if (enumVal == null) - throw new ArgumentNullException(nameof(enumVal)); - var enumType = enumVal.GetType(); - var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); - var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) return true; - return false; - } - - /// - /// Get the EnumMember value - /// - /// - /// EnumMember value as string otherwise null - private static string GetEnumMemberAttrValue(object enumVal) - { - if (enumVal == null) - throw new ArgumentNullException(nameof(enumVal)); - var enumType = enumVal.GetType(); - var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); - var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) - { - return attr.Value; - } - return null; - } - } -} diff --git a/csharp/src/OneMessage.io/Client/Configuration.cs b/csharp/src/OneMessage.io/Client/Configuration.cs deleted file mode 100644 index efd0c6a..0000000 --- a/csharp/src/OneMessage.io/Client/Configuration.cs +++ /dev/null @@ -1,635 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Net.Http; -using System.Net.Security; - -namespace OneMessage.io.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.RawContent), - response.RawContent, response.Headers); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); - } - return null; - }; - - #endregion Static Members - - #region Private Members - - /// - /// Defines the base path of the target API server. - /// Example: http://localhost:3000/v1/ - /// - private string _basePath; - - private bool _useDefaultCredentials = false; - - /// - /// Gets or sets the API key based on the authentication name. - /// This is the key and value comprising the "secret" for accessing an API. - /// - /// The API key. - private IDictionary _apiKey; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - /// - /// Gets or sets the servers defined in the OpenAPI spec. - /// - /// The servers - private IList> _servers; - - /// - /// Gets or sets the operation servers defined in the OpenAPI spec. - /// - /// The operation servers - private IReadOnlyDictionary>> _operationServers; - - #endregion Private Members - - #region Constructors - - /// - /// Initializes a new instance of the class - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] - public Configuration() - { - Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp"); - BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - DefaultHeaders = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - Servers = new List>() - { - { - new Dictionary { - {"url", "{protocol}://api.1msg.io/{channelId}"}, - {"description", "New common server url"}, - { - "variables", new Dictionary { - { - "channelId", new Dictionary { - {"description", "Your channel number"}, - {"default_value", "YOUR_INSTANCE_NUMBER"}, - } - }, - { - "protocol", new Dictionary { - {"description", "No description provided"}, - {"default_value", "https"}, - { - "enum_values", new List() { - "http", - "https" - } - } - } - } - } - } - } - } - }; - OperationServers = new Dictionary>>() - { - }; - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] - public Configuration( - IDictionary defaultHeaders, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeaders == null) - throw new ArgumentNullException("defaultHeaders"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeaders) - { - DefaultHeaders.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - #endregion Constructors - - #region Properties - - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath - { - get { return _basePath; } - set { _basePath = value; } - } - - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - public virtual bool UseDefaultCredentials - { - get { return _useDefaultCredentials; } - set { _useDefaultCredentials = value; } - } - - /// - /// Gets or sets the default header. - /// - [Obsolete("Use DefaultHeaders instead.")] - public virtual IDictionary DefaultHeader - { - get - { - return DefaultHeaders; - } - set - { - DefaultHeaders = value; - } - } - - /// - /// Gets or sets the default headers. - /// - public virtual IDictionary DefaultHeaders { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout { get; set; } - - /// - /// Gets or sets the proxy - /// - /// Proxy. - public virtual WebProxy Proxy { get; set; } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - string apiKeyValue; - ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); - string apiKeyPrefix; - if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) - { - return apiKeyPrefix + " " + apiKeyValue; - } - - return apiKeyValue; - } - - /// - /// Gets or sets certificate collection to be sent with requests. - /// - /// X509 Certificate collection. - public X509CertificateCollection ClientCertificates { get; set; } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// This helper property simplifies code generation. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// Whatever you set here will be prepended to the value defined in AddApiKey. - /// - /// An example invocation here might be: - /// - /// ApiKeyPrefix["Authorization"] = "Bearer"; - /// - /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. - /// - /// - /// OAuth2 workflows should set tokens via AccessToken. - /// - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - /// - /// Gets or sets the servers. - /// - /// The servers. - public virtual IList> Servers - { - get { return _servers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Servers may not be null."); - } - _servers = value; - } - } - - /// - /// Gets or sets the operation servers. - /// - /// The operation servers. - public virtual IReadOnlyDictionary>> OperationServers - { - get { return _operationServers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Operation servers may not be null."); - } - _operationServers = value; - } - } - - /// - /// Returns URL based on server settings without providing values - /// for the variables - /// - /// Array index of the server settings. - /// The server URL. - public string GetServerUrl(int index) - { - return GetServerUrl(Servers, index, null); - } - - /// - /// Returns URL based on server settings. - /// - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - public string GetServerUrl(int index, Dictionary inputVariables) - { - return GetServerUrl(Servers, index, inputVariables); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index) - { - return GetOperationServerUrl(operation, index, null); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) - { - if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) - { - return GetServerUrl(operationServer, index, inputVariables); - } - - return null; - } - - /// - /// Returns URL based on server settings. - /// - /// Dictionary of server settings. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) - { - if (index < 0 || index >= servers.Count) - { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); - } - - if (inputVariables == null) - { - inputVariables = new Dictionary(); - } - - IReadOnlyDictionary server = servers[index]; - string url = (string)server["url"]; - - if (server.ContainsKey("variables")) - { - // go through each variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) - { - - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) - { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); - } - else - { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); - } - } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } - } - } - - return url; - } - - /// - /// Gets and Sets the RemoteCertificateValidationCallback - /// - public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } - - #endregion Properties - - #region Methods - - /// - /// Returns a string with essential information for debugging. - /// - public static string ToDebugReport() - { - string report = "C# SDK (OneMessage.io) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 2.39.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - - #region Static Members - /// - /// Merge configurations. - /// - /// First configuration. - /// Second configuration. - /// Merged configuration. - public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) - { - if (second == null) return first ?? GlobalConfiguration.Instance; - - Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - - foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; - foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; - foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; - - var config = new Configuration - { - ApiKey = apiKey, - ApiKeyPrefix = apiKeyPrefix, - DefaultHeaders = defaultHeaders, - BasePath = second.BasePath ?? first.BasePath, - Timeout = second.Timeout, - Proxy = second.Proxy ?? first.Proxy, - UserAgent = second.UserAgent ?? first.UserAgent, - Username = second.Username ?? first.Username, - Password = second.Password ?? first.Password, - AccessToken = second.AccessToken ?? first.AccessToken, - TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, - ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, - UseDefaultCredentials = second.UseDefaultCredentials, - RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, - }; - return config; - } - #endregion Static Members - } -} diff --git a/csharp/src/OneMessage.io/Client/ExceptionFactory.cs b/csharp/src/OneMessage.io/Client/ExceptionFactory.cs deleted file mode 100644 index 9bbaffb..0000000 --- a/csharp/src/OneMessage.io/Client/ExceptionFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; - -namespace OneMessage.io.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IApiResponse response); -} diff --git a/csharp/src/OneMessage.io/Client/GlobalConfiguration.cs b/csharp/src/OneMessage.io/Client/GlobalConfiguration.cs deleted file mode 100644 index 9ea99c8..0000000 --- a/csharp/src/OneMessage.io/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace OneMessage.io.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - #region Private Members - - private static readonly object GlobalConfigSync = new { }; - private static IReadableConfiguration _globalConfiguration; - - #endregion Private Members - - #region Constructors - - /// - private GlobalConfiguration() - { - } - - /// - public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) - { - } - - static GlobalConfiguration() - { - Instance = new GlobalConfiguration(); - } - - #endregion Constructors - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static IReadableConfiguration Instance - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - } -} diff --git a/csharp/src/OneMessage.io/Client/HttpMethod.cs b/csharp/src/OneMessage.io/Client/HttpMethod.cs deleted file mode 100644 index eb83c1d..0000000 --- a/csharp/src/OneMessage.io/Client/HttpMethod.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -namespace OneMessage.io.Client -{ - /// - /// Http methods supported by swagger - /// - public enum HttpMethod - { - /// HTTP GET request. - Get, - /// HTTP POST request. - Post, - /// HTTP PUT request. - Put, - /// HTTP DELETE request. - Delete, - /// HTTP HEAD request. - Head, - /// HTTP OPTIONS request. - Options, - /// HTTP PATCH request. - Patch - } -} diff --git a/csharp/src/OneMessage.io/Client/IApiAccessor.cs b/csharp/src/OneMessage.io/Client/IApiAccessor.cs deleted file mode 100644 index 2b47f53..0000000 --- a/csharp/src/OneMessage.io/Client/IApiAccessor.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; - -namespace OneMessage.io.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - IReadableConfiguration Configuration { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - string GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/csharp/src/OneMessage.io/Client/IAsynchronousClient.cs b/csharp/src/OneMessage.io/Client/IAsynchronousClient.cs deleted file mode 100644 index 57c6fa8..0000000 --- a/csharp/src/OneMessage.io/Client/IAsynchronousClient.cs +++ /dev/null @@ -1,101 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Threading.Tasks; - -namespace OneMessage.io.Client -{ - /// - /// Contract for Asynchronous RESTful API interactions. - /// - /// This interface allows consumers to provide a custom API accessor client. - /// - public interface IAsynchronousClient - { - /// - /// Executes a non-blocking call to some using the GET http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the POST http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the PUT http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the DELETE http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the HEAD http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the OPTIONS http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the PATCH http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - } -} diff --git a/csharp/src/OneMessage.io/Client/IReadableConfiguration.cs b/csharp/src/OneMessage.io/Client/IReadableConfiguration.cs deleted file mode 100644 index 53e6069..0000000 --- a/csharp/src/OneMessage.io/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Net; -using System.Net.Security; -using System.Security.Cryptography.X509Certificates; - -namespace OneMessage.io.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - [Obsolete("Use DefaultHeaders instead.")] - IDictionary DefaultHeader { get; } - - /// - /// Gets the default headers. - /// - /// Default headers. - IDictionary DefaultHeaders { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the proxy. - /// - /// Proxy. - WebProxy Proxy { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - bool UseDefaultCredentials { get; } - - /// - /// Get the servers associated with the operation. - /// - /// Operation servers. - IReadOnlyDictionary>> OperationServers { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - - /// - /// Gets the Operation server url at the provided index. - /// - /// Operation server name. - /// Index of the operation server settings. - /// - string GetOperationServerUrl(string operation, int index); - - /// - /// Gets certificate collection to be sent with requests. - /// - /// X509 Certificate collection. - X509CertificateCollection ClientCertificates { get; } - - /// - /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and - /// overriding certificate errors in the scope of a request. - /// - RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } - } -} diff --git a/csharp/src/OneMessage.io/Client/ISynchronousClient.cs b/csharp/src/OneMessage.io/Client/ISynchronousClient.cs deleted file mode 100644 index 8f6e051..0000000 --- a/csharp/src/OneMessage.io/Client/ISynchronousClient.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.IO; - -namespace OneMessage.io.Client -{ - /// - /// Contract for Synchronous RESTful API interactions. - /// - /// This interface allows consumers to provide a custom API accessor client. - /// - public interface ISynchronousClient - { - /// - /// Executes a blocking call to some using the GET http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the POST http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the PUT http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the DELETE http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the HEAD http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the OPTIONS http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the PATCH http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); - } -} diff --git a/csharp/src/OneMessage.io/Client/Multimap.cs b/csharp/src/OneMessage.io/Client/Multimap.cs deleted file mode 100644 index 1d127b3..0000000 --- a/csharp/src/OneMessage.io/Client/Multimap.cs +++ /dev/null @@ -1,296 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace OneMessage.io.Client -{ - /// - /// A dictionary in which one key has many associated values. - /// - /// The type of the key - /// The type of the value associated with the key. - public class Multimap : IDictionary> - { - #region Private Fields - - private readonly Dictionary> _dictionary; - - #endregion Private Fields - - #region Constructors - - /// - /// Empty Constructor. - /// - public Multimap() - { - _dictionary = new Dictionary>(); - } - - /// - /// Constructor with comparer. - /// - /// - public Multimap(IEqualityComparer comparer) - { - _dictionary = new Dictionary>(comparer); - } - - #endregion Constructors - - #region Enumerators - - /// - /// To get the enumerator. - /// - /// Enumerator - public IEnumerator>> GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - /// - /// To get the enumerator. - /// - /// Enumerator - IEnumerator IEnumerable.GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - #endregion Enumerators - - #region Public Members - /// - /// Add values to Multimap - /// - /// Key value pair - public void Add(KeyValuePair> item) - { - if (!TryAdd(item.Key, item.Value)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - - /// - /// Add Multimap to Multimap - /// - /// Multimap - public void Add(Multimap multimap) - { - foreach (var item in multimap) - { - if (!TryAdd(item.Key, item.Value)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - } - - /// - /// Clear Multimap - /// - public void Clear() - { - _dictionary.Clear(); - } - - /// - /// Determines whether Multimap contains the specified item. - /// - /// Key value pair - /// Method needs to be implemented - /// true if the Multimap contains the item; otherwise, false. - public bool Contains(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - /// - /// Copy items of the Multimap to an array, - /// starting at a particular array index. - /// - /// The array that is the destination of the items copied - /// from Multimap. The array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - /// Method needs to be implemented - public void CopyTo(KeyValuePair>[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - /// - /// Removes the specified item from the Multimap. - /// - /// Key value pair - /// true if the item is successfully removed; otherwise, false. - /// Method needs to be implemented - public bool Remove(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - /// - /// Gets the number of items contained in the Multimap. - /// - public int Count => _dictionary.Count; - - /// - /// Gets a value indicating whether the Multimap is read-only. - /// - public bool IsReadOnly => false; - - /// - /// Adds an item with the provided key and value to the Multimap. - /// - /// The object to use as the key of the item to add. - /// The object to use as the value of the item to add. - /// Thrown when couldn't add the value to Multimap. - public void Add(TKey key, IList value) - { - if (value != null && value.Count > 0) - { - if (_dictionary.TryGetValue(key, out var list)) - { - foreach (var k in value) list.Add(k); - } - else - { - list = new List(value); - if (!TryAdd(key, list)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - } - } - - /// - /// Determines whether the Multimap contains an item with the specified key. - /// - /// The key to locate in the Multimap. - /// true if the Multimap contains an item with - /// the key; otherwise, false. - public bool ContainsKey(TKey key) - { - return _dictionary.ContainsKey(key); - } - - /// - /// Removes item with the specified key from the Multimap. - /// - /// The key to locate in the Multimap. - /// true if the item is successfully removed; otherwise, false. - public bool Remove(TKey key) - { - return TryRemove(key, out var _); - } - - /// - /// Gets the value associated with the specified key. - /// - /// The key whose value to get. - /// When this method returns, the value associated with the specified key, if the - /// key is found; otherwise, the default value for the type of the value parameter. - /// This parameter is passed uninitialized. - /// true if the object that implements Multimap contains - /// an item with the specified key; otherwise, false. - public bool TryGetValue(TKey key, out IList value) - { - return _dictionary.TryGetValue(key, out value); - } - - /// - /// Gets or sets the item with the specified key. - /// - /// The key of the item to get or set. - /// The value of the specified key. - public IList this[TKey key] - { - get => _dictionary[key]; - set => _dictionary[key] = value; - } - - /// - /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. - /// - public ICollection Keys => _dictionary.Keys; - - /// - /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. - /// - public ICollection> Values => _dictionary.Values; - - /// - /// Copy the items of the Multimap to an System.Array, - /// starting at a particular System.Array index. - /// - /// The one-dimensional System.Array that is the destination of the items copied - /// from Multimap. The System.Array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - public void CopyTo(Array array, int index) - { - ((ICollection)_dictionary).CopyTo(array, index); - } - - /// - /// Adds an item with the provided key and value to the Multimap. - /// - /// The object to use as the key of the item to add. - /// The object to use as the value of the item to add. - /// Thrown when couldn't add value to Multimap. - public void Add(TKey key, TValue value) - { - if (value != null) - { - if (_dictionary.TryGetValue(key, out var list)) - { - list.Add(value); - } - else - { - list = new List { value }; - if (!TryAdd(key, list)) - throw new InvalidOperationException("Could not add value to Multimap."); - } - } - } - - #endregion Public Members - - #region Private Members - - /** - * Helper method to encapsulate generator differences between dictionary types. - */ - private bool TryRemove(TKey key, out IList value) - { - _dictionary.TryGetValue(key, out value); - return _dictionary.Remove(key); - } - - /** - * Helper method to encapsulate generator differences between dictionary types. - */ - private bool TryAdd(TKey key, IList value) - { - try - { - _dictionary.Add(key, value); - } - catch (ArgumentException) - { - return false; - } - - return true; - } - #endregion Private Members - } -} diff --git a/csharp/src/OneMessage.io/Client/OpenAPIDateConverter.cs b/csharp/src/OneMessage.io/Client/OpenAPIDateConverter.cs deleted file mode 100644 index 968df16..0000000 --- a/csharp/src/OneMessage.io/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace OneMessage.io.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/csharp/src/OneMessage.io/Client/RequestOptions.cs b/csharp/src/OneMessage.io/Client/RequestOptions.cs deleted file mode 100644 index 4e2670f..0000000 --- a/csharp/src/OneMessage.io/Client/RequestOptions.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; - -namespace OneMessage.io.Client -{ - /// - /// A container for generalized request inputs. This type allows consumers to extend the request functionality - /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). - /// - public class RequestOptions - { - /// - /// Parameters to be bound to path parts of the Request's URL - /// - public Dictionary PathParameters { get; set; } - - /// - /// Query parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap QueryParameters { get; set; } - - /// - /// Header parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap HeaderParameters { get; set; } - - /// - /// Form parameters to be sent along with the request. - /// - public Dictionary FormParameters { get; set; } - - /// - /// File parameters to be sent along with the request. - /// - public Multimap FileParameters { get; set; } - - /// - /// Cookies to be sent along with the request. - /// - public List Cookies { get; set; } - - /// - /// Operation associated with the request path. - /// - public string Operation { get; set; } - - /// - /// Index associated with the operation. - /// - public int OperationIndex { get; set; } - - /// - /// Any data associated with a request body. - /// - public Object Data { get; set; } - - /// - /// Constructs a new instance of - /// - public RequestOptions() - { - PathParameters = new Dictionary(); - QueryParameters = new Multimap(); - HeaderParameters = new Multimap(); - FormParameters = new Dictionary(); - FileParameters = new Multimap(); - Cookies = new List(); - } - } -} diff --git a/csharp/src/OneMessage.io/Client/RetryConfiguration.cs b/csharp/src/OneMessage.io/Client/RetryConfiguration.cs deleted file mode 100644 index 20f2220..0000000 --- a/csharp/src/OneMessage.io/Client/RetryConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Polly; -using RestSharp; - -namespace OneMessage.io.Client -{ - /// - /// Configuration class to set the polly retry policies to be applied to the requests. - /// - public static class RetryConfiguration - { - /// - /// Retry policy - /// - public static Policy RetryPolicy { get; set; } - - /// - /// Async retry policy - /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } - } -} diff --git a/csharp/src/OneMessage.io/Model/AbstractOpenAPISchema.cs b/csharp/src/OneMessage.io/Model/AbstractOpenAPISchema.cs deleted file mode 100644 index 0fdfd71..0000000 --- a/csharp/src/OneMessage.io/Model/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace OneMessage.io.Model -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Custom JSON serializer for objects with additional properties - /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - } -} diff --git a/csharp/src/OneMessage.io/Model/Ack.cs b/csharp/src/OneMessage.io/Model/Ack.cs deleted file mode 100644 index 0d8df5f..0000000 --- a/csharp/src/OneMessage.io/Model/Ack.cs +++ /dev/null @@ -1,193 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Ack - /// - [DataContract(Name = "Ack")] - public partial class Ack : IEquatable, IValidatableObject - { - /// - /// type of the message status - /// - /// type of the message status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 1, - - /// - /// Enum Viewed for value: viewed - /// - [EnumMember(Value = "viewed")] - Viewed = 2, - - /// - /// Enum Sent for value: sent - /// - [EnumMember(Value = "sent")] - Sent = 3 - } - - - /// - /// type of the message status - /// - /// type of the message status - /// viewed - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// unique id of message. - /// chat ID. - /// type of the message status. - public Ack(string id = default(string), string chatId = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.Id = id; - this.ChatId = chatId; - this.Status = status; - } - - /// - /// unique id of message - /// - /// unique id of message - /// true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// chat ID - /// - /// chat ID - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Ack {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Ack); - } - - /// - /// Returns true if Ack instances are equal - /// - /// Instance of Ack to be compared - /// Boolean - public bool Equals(Ack input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/AddTemplateRequest.cs b/csharp/src/OneMessage.io/Model/AddTemplateRequest.cs deleted file mode 100644 index d84dca0..0000000 --- a/csharp/src/OneMessage.io/Model/AddTemplateRequest.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// AddTemplateRequest - /// - [DataContract(Name = "AddTemplateRequest")] - public partial class AddTemplateRequest : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets Category - /// - [DataMember(Name = "category", EmitDefaultValue = false)] - public TemplateCategoryProp? Category { get; set; } - - /// - /// Gets or Sets Language - /// - [DataMember(Name = "language", EmitDefaultValue = false)] - public TemplateLanguageProp? Language { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Name of template. - /// category. - /// components. - /// language. - public AddTemplateRequest(string name = default(string), TemplateCategoryProp? category = default(TemplateCategoryProp?), TemplateComponentsProp components = default(TemplateComponentsProp), TemplateLanguageProp? language = default(TemplateLanguageProp?)) - { - this.Name = name; - this.Category = category; - this.Components = components; - this.Language = language; - } - - /// - /// Name of template - /// - /// Name of template - /// start - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets Components - /// - [DataMember(Name = "components", EmitDefaultValue = false)] - public TemplateComponentsProp Components { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AddTemplateRequest {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Components: ").Append(Components).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AddTemplateRequest); - } - - /// - /// Returns true if AddTemplateRequest instances are equal - /// - /// Instance of AddTemplateRequest to be compared - /// Boolean - public bool Equals(AddTemplateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Components == input.Components || - (this.Components != null && - this.Components.Equals(input.Components)) - ) && - ( - this.Language == input.Language || - this.Language.Equals(input.Language) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Components != null) - { - hashCode = (hashCode * 59) + this.Components.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ChannelExtendedStatistics.cs b/csharp/src/OneMessage.io/Model/ChannelExtendedStatistics.cs deleted file mode 100644 index 82481f8..0000000 --- a/csharp/src/OneMessage.io/Model/ChannelExtendedStatistics.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ChannelExtendedStatistics - /// - [DataContract(Name = "channelExtendedStatistics")] - public partial class ChannelExtendedStatistics : List, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public ChannelExtendedStatistics() : base() - { - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChannelExtendedStatistics {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChannelExtendedStatistics); - } - - /// - /// Returns true if ChannelExtendedStatistics instances are equal - /// - /// Instance of ChannelExtendedStatistics to be compared - /// Boolean - public bool Equals(ChannelExtendedStatistics input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ChannelExtendedStatisticsInner.cs b/csharp/src/OneMessage.io/Model/ChannelExtendedStatisticsInner.cs deleted file mode 100644 index 81254b8..0000000 --- a/csharp/src/OneMessage.io/Model/ChannelExtendedStatisticsInner.cs +++ /dev/null @@ -1,310 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ChannelExtendedStatisticsInner - /// - [DataContract(Name = "channelExtendedStatistics_inner")] - public partial class ChannelExtendedStatisticsInner : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// businessInitiatedPaidQuantity. - /// businessInitiatedPrice. - /// businessInitiatedQuantity. - /// freeEntryPoint. - /// freeQuantity. - /// freeTier. - /// paidQuantity. - /// periodDate. - /// quantity. - /// totalPrice. - /// userInitiatedPaidQuantity. - /// userInitiatedPrice. - /// userInitiatedQuantity. - public ChannelExtendedStatisticsInner(int businessInitiatedPaidQuantity = default(int), decimal businessInitiatedPrice = default(decimal), int businessInitiatedQuantity = default(int), int freeEntryPoint = default(int), int freeQuantity = default(int), int freeTier = default(int), int paidQuantity = default(int), string periodDate = default(string), decimal quantity = default(decimal), decimal totalPrice = default(decimal), int userInitiatedPaidQuantity = default(int), decimal userInitiatedPrice = default(decimal), int userInitiatedQuantity = default(int)) - { - this.BusinessInitiatedPaidQuantity = businessInitiatedPaidQuantity; - this.BusinessInitiatedPrice = businessInitiatedPrice; - this.BusinessInitiatedQuantity = businessInitiatedQuantity; - this.FreeEntryPoint = freeEntryPoint; - this.FreeQuantity = freeQuantity; - this.FreeTier = freeTier; - this.PaidQuantity = paidQuantity; - this.PeriodDate = periodDate; - this.Quantity = quantity; - this.TotalPrice = totalPrice; - this.UserInitiatedPaidQuantity = userInitiatedPaidQuantity; - this.UserInitiatedPrice = userInitiatedPrice; - this.UserInitiatedQuantity = userInitiatedQuantity; - } - - /// - /// Gets or Sets BusinessInitiatedPaidQuantity - /// - /// 1 - [DataMember(Name = "business_initiated_paid_quantity", EmitDefaultValue = false)] - public int BusinessInitiatedPaidQuantity { get; set; } - - /// - /// Gets or Sets BusinessInitiatedPrice - /// - /// 0.0691 - [DataMember(Name = "business_initiated_price", EmitDefaultValue = false)] - public decimal BusinessInitiatedPrice { get; set; } - - /// - /// Gets or Sets BusinessInitiatedQuantity - /// - /// 2 - [DataMember(Name = "business_initiated_quantity", EmitDefaultValue = false)] - public int BusinessInitiatedQuantity { get; set; } - - /// - /// Gets or Sets FreeEntryPoint - /// - /// 0 - [DataMember(Name = "free_entry_point", EmitDefaultValue = false)] - public int FreeEntryPoint { get; set; } - - /// - /// Gets or Sets FreeQuantity - /// - /// 1 - [DataMember(Name = "free_quantity", EmitDefaultValue = false)] - public int FreeQuantity { get; set; } - - /// - /// Gets or Sets FreeTier - /// - /// 1 - [DataMember(Name = "free_tier", EmitDefaultValue = false)] - public int FreeTier { get; set; } - - /// - /// Gets or Sets PaidQuantity - /// - /// 1 - [DataMember(Name = "paid_quantity", EmitDefaultValue = false)] - public int PaidQuantity { get; set; } - - /// - /// Gets or Sets PeriodDate - /// - /// 2022-11-01T00:00:00Z - [DataMember(Name = "period_date", EmitDefaultValue = false)] - public string PeriodDate { get; set; } - - /// - /// Gets or Sets Quantity - /// - /// 2 - [DataMember(Name = "quantity", EmitDefaultValue = false)] - public decimal Quantity { get; set; } - - /// - /// Gets or Sets TotalPrice - /// - /// 0.0691 - [DataMember(Name = "total_price", EmitDefaultValue = false)] - public decimal TotalPrice { get; set; } - - /// - /// Gets or Sets UserInitiatedPaidQuantity - /// - /// 1 - [DataMember(Name = "user_initiated_paid_quantity", EmitDefaultValue = false)] - public int UserInitiatedPaidQuantity { get; set; } - - /// - /// Gets or Sets UserInitiatedPrice - /// - /// 0.0691 - [DataMember(Name = "user_initiated_price", EmitDefaultValue = false)] - public decimal UserInitiatedPrice { get; set; } - - /// - /// Gets or Sets UserInitiatedQuantity - /// - /// 2 - [DataMember(Name = "user_initiated_quantity", EmitDefaultValue = false)] - public int UserInitiatedQuantity { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChannelExtendedStatisticsInner {\n"); - sb.Append(" BusinessInitiatedPaidQuantity: ").Append(BusinessInitiatedPaidQuantity).Append("\n"); - sb.Append(" BusinessInitiatedPrice: ").Append(BusinessInitiatedPrice).Append("\n"); - sb.Append(" BusinessInitiatedQuantity: ").Append(BusinessInitiatedQuantity).Append("\n"); - sb.Append(" FreeEntryPoint: ").Append(FreeEntryPoint).Append("\n"); - sb.Append(" FreeQuantity: ").Append(FreeQuantity).Append("\n"); - sb.Append(" FreeTier: ").Append(FreeTier).Append("\n"); - sb.Append(" PaidQuantity: ").Append(PaidQuantity).Append("\n"); - sb.Append(" PeriodDate: ").Append(PeriodDate).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" TotalPrice: ").Append(TotalPrice).Append("\n"); - sb.Append(" UserInitiatedPaidQuantity: ").Append(UserInitiatedPaidQuantity).Append("\n"); - sb.Append(" UserInitiatedPrice: ").Append(UserInitiatedPrice).Append("\n"); - sb.Append(" UserInitiatedQuantity: ").Append(UserInitiatedQuantity).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChannelExtendedStatisticsInner); - } - - /// - /// Returns true if ChannelExtendedStatisticsInner instances are equal - /// - /// Instance of ChannelExtendedStatisticsInner to be compared - /// Boolean - public bool Equals(ChannelExtendedStatisticsInner input) - { - if (input == null) - { - return false; - } - return - ( - this.BusinessInitiatedPaidQuantity == input.BusinessInitiatedPaidQuantity || - this.BusinessInitiatedPaidQuantity.Equals(input.BusinessInitiatedPaidQuantity) - ) && - ( - this.BusinessInitiatedPrice == input.BusinessInitiatedPrice || - this.BusinessInitiatedPrice.Equals(input.BusinessInitiatedPrice) - ) && - ( - this.BusinessInitiatedQuantity == input.BusinessInitiatedQuantity || - this.BusinessInitiatedQuantity.Equals(input.BusinessInitiatedQuantity) - ) && - ( - this.FreeEntryPoint == input.FreeEntryPoint || - this.FreeEntryPoint.Equals(input.FreeEntryPoint) - ) && - ( - this.FreeQuantity == input.FreeQuantity || - this.FreeQuantity.Equals(input.FreeQuantity) - ) && - ( - this.FreeTier == input.FreeTier || - this.FreeTier.Equals(input.FreeTier) - ) && - ( - this.PaidQuantity == input.PaidQuantity || - this.PaidQuantity.Equals(input.PaidQuantity) - ) && - ( - this.PeriodDate == input.PeriodDate || - (this.PeriodDate != null && - this.PeriodDate.Equals(input.PeriodDate)) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ) && - ( - this.TotalPrice == input.TotalPrice || - this.TotalPrice.Equals(input.TotalPrice) - ) && - ( - this.UserInitiatedPaidQuantity == input.UserInitiatedPaidQuantity || - this.UserInitiatedPaidQuantity.Equals(input.UserInitiatedPaidQuantity) - ) && - ( - this.UserInitiatedPrice == input.UserInitiatedPrice || - this.UserInitiatedPrice.Equals(input.UserInitiatedPrice) - ) && - ( - this.UserInitiatedQuantity == input.UserInitiatedQuantity || - this.UserInitiatedQuantity.Equals(input.UserInitiatedQuantity) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BusinessInitiatedPaidQuantity.GetHashCode(); - hashCode = (hashCode * 59) + this.BusinessInitiatedPrice.GetHashCode(); - hashCode = (hashCode * 59) + this.BusinessInitiatedQuantity.GetHashCode(); - hashCode = (hashCode * 59) + this.FreeEntryPoint.GetHashCode(); - hashCode = (hashCode * 59) + this.FreeQuantity.GetHashCode(); - hashCode = (hashCode * 59) + this.FreeTier.GetHashCode(); - hashCode = (hashCode * 59) + this.PaidQuantity.GetHashCode(); - if (this.PeriodDate != null) - { - hashCode = (hashCode * 59) + this.PeriodDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalPrice.GetHashCode(); - hashCode = (hashCode * 59) + this.UserInitiatedPaidQuantity.GetHashCode(); - hashCode = (hashCode * 59) + this.UserInitiatedPrice.GetHashCode(); - hashCode = (hashCode * 59) + this.UserInitiatedQuantity.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ChannelStatistics.cs b/csharp/src/OneMessage.io/Model/ChannelStatistics.cs deleted file mode 100644 index 6292f9e..0000000 --- a/csharp/src/OneMessage.io/Model/ChannelStatistics.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ChannelStatistics - /// - [DataContract(Name = "channelStatistics")] - public partial class ChannelStatistics : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// date. - /// templatesCost. - public ChannelStatistics(string date = default(string), decimal templatesCost = default(decimal)) - { - this.Date = date; - this.TemplatesCost = templatesCost; - } - - /// - /// Gets or Sets Date - /// - /// 03.2022 - [DataMember(Name = "date", EmitDefaultValue = false)] - public string Date { get; set; } - - /// - /// Gets or Sets TemplatesCost - /// - /// 400.0313 - [DataMember(Name = "templates_cost", EmitDefaultValue = false)] - public decimal TemplatesCost { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChannelStatistics {\n"); - sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" TemplatesCost: ").Append(TemplatesCost).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChannelStatistics); - } - - /// - /// Returns true if ChannelStatistics instances are equal - /// - /// Instance of ChannelStatistics to be compared - /// Boolean - public bool Equals(ChannelStatistics input) - { - if (input == null) - { - return false; - } - return - ( - this.Date == input.Date || - (this.Date != null && - this.Date.Equals(input.Date)) - ) && - ( - this.TemplatesCost == input.TemplatesCost || - this.TemplatesCost.Equals(input.TemplatesCost) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Date != null) - { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TemplatesCost.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ChannelStatus.cs b/csharp/src/OneMessage.io/Model/ChannelStatus.cs deleted file mode 100644 index bb18dce..0000000 --- a/csharp/src/OneMessage.io/Model/ChannelStatus.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ChannelStatus - /// - [DataContract(Name = "channelStatus")] - public partial class ChannelStatus : IEquatable, IValidatableObject - { - /// - /// channel Status - /// - /// channel Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Connected for value: connected - /// - [EnumMember(Value = "connected")] - Connected = 1, - - /// - /// Enum Connecting for value: connecting - /// - [EnumMember(Value = "connecting")] - Connecting = 2, - - /// - /// Enum Disconnected for value: disconnected - /// - [EnumMember(Value = "disconnected")] - Disconnected = 3, - - /// - /// Enum Uninitialized for value: uninitialized - /// - [EnumMember(Value = "uninitialized")] - Uninitialized = 4, - - /// - /// Enum Unregistered for value: unregistered - /// - [EnumMember(Value = "unregistered")] - Unregistered = 5 - } - - - /// - /// channel Status - /// - /// channel Status - /// connected - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// channel Status. - public ChannelStatus(StatusEnum? status = default(StatusEnum?)) - { - this.Status = status; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChannelStatus {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChannelStatus); - } - - /// - /// Returns true if ChannelStatus instances are equal - /// - /// Instance of ChannelStatus to be compared - /// Boolean - public bool Equals(ChannelStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ChatIdProp.cs b/csharp/src/OneMessage.io/Model/ChatIdProp.cs deleted file mode 100644 index 5199544..0000000 --- a/csharp/src/OneMessage.io/Model/ChatIdProp.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ChatIdProp - /// - [DataContract(Name = "ChatIdProp")] - public partial class ChatIdProp : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - public ChatIdProp(string chatId = default(string)) - { - this.ChatId = chatId; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChatIdProp {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChatIdProp); - } - - /// - /// Returns true if ChatIdProp instances are equal - /// - /// Instance of ChatIdProp to be compared - /// Boolean - public bool Equals(ChatIdProp input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/Commerce.cs b/csharp/src/OneMessage.io/Model/Commerce.cs deleted file mode 100644 index d9b688b..0000000 --- a/csharp/src/OneMessage.io/Model/Commerce.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Commerce - /// - [DataContract(Name = "Commerce")] - public partial class Commerce : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varParams. - public Commerce(CommerceParams varParams = default(CommerceParams)) - { - this.VarParams = varParams; - } - - /// - /// Gets or Sets VarParams - /// - [DataMember(Name = "params", EmitDefaultValue = false)] - public CommerceParams VarParams { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Commerce {\n"); - sb.Append(" VarParams: ").Append(VarParams).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Commerce); - } - - /// - /// Returns true if Commerce instances are equal - /// - /// Instance of Commerce to be compared - /// Boolean - public bool Equals(Commerce input) - { - if (input == null) - { - return false; - } - return - ( - this.VarParams == input.VarParams || - (this.VarParams != null && - this.VarParams.Equals(input.VarParams)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarParams != null) - { - hashCode = (hashCode * 59) + this.VarParams.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/CommerceParams.cs b/csharp/src/OneMessage.io/Model/CommerceParams.cs deleted file mode 100644 index d2f7511..0000000 --- a/csharp/src/OneMessage.io/Model/CommerceParams.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// CommerceParams - /// - [DataContract(Name = "Commerce_params")] - public partial class CommerceParams : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CommerceParams() { } - /// - /// Initializes a new instance of the class. - /// - /// isCartEnabled (required). - /// isCatalogVisible (required). - public CommerceParams(bool isCartEnabled = default(bool), bool isCatalogVisible = default(bool)) - { - this.IsCartEnabled = isCartEnabled; - this.IsCatalogVisible = isCatalogVisible; - } - - /// - /// Gets or Sets IsCartEnabled - /// - /// true - [DataMember(Name = "is_cart_enabled", IsRequired = true, EmitDefaultValue = true)] - public bool IsCartEnabled { get; set; } - - /// - /// Gets or Sets IsCatalogVisible - /// - /// true - [DataMember(Name = "is_catalog_visible", IsRequired = true, EmitDefaultValue = true)] - public bool IsCatalogVisible { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CommerceParams {\n"); - sb.Append(" IsCartEnabled: ").Append(IsCartEnabled).Append("\n"); - sb.Append(" IsCatalogVisible: ").Append(IsCatalogVisible).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CommerceParams); - } - - /// - /// Returns true if CommerceParams instances are equal - /// - /// Instance of CommerceParams to be compared - /// Boolean - public bool Equals(CommerceParams input) - { - if (input == null) - { - return false; - } - return - ( - this.IsCartEnabled == input.IsCartEnabled || - this.IsCartEnabled.Equals(input.IsCartEnabled) - ) && - ( - this.IsCatalogVisible == input.IsCatalogVisible || - this.IsCatalogVisible.Equals(input.IsCatalogVisible) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.IsCartEnabled.GetHashCode(); - hashCode = (hashCode * 59) + this.IsCatalogVisible.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/Contacts.cs b/csharp/src/OneMessage.io/Model/Contacts.cs deleted file mode 100644 index 1115994..0000000 --- a/csharp/src/OneMessage.io/Model/Contacts.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Contacts - /// - [DataContract(Name = "Contacts")] - public partial class Contacts : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of checked numbers. - public Contacts(List varContacts = default(List)) - { - this.VarContacts = varContacts; - } - - /// - /// List of checked numbers - /// - /// List of checked numbers - [DataMember(Name = "contacts", EmitDefaultValue = false)] - public List VarContacts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Contacts {\n"); - sb.Append(" VarContacts: ").Append(VarContacts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Contacts); - } - - /// - /// Returns true if Contacts instances are equal - /// - /// Instance of Contacts to be compared - /// Boolean - public bool Equals(Contacts input) - { - if (input == null) - { - return false; - } - return - ( - this.VarContacts == input.VarContacts || - this.VarContacts != null && - input.VarContacts != null && - this.VarContacts.SequenceEqual(input.VarContacts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarContacts != null) - { - hashCode = (hashCode * 59) + this.VarContacts.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ContactsContactsInner.cs b/csharp/src/OneMessage.io/Model/ContactsContactsInner.cs deleted file mode 100644 index 2d958e7..0000000 --- a/csharp/src/OneMessage.io/Model/ContactsContactsInner.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ContactsContactsInner - /// - [DataContract(Name = "Contacts_contacts_inner")] - public partial class ContactsContactsInner : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Sent value. - /// Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending. - /// Formatted contact phone. - public ContactsContactsInner(string input = default(string), string status = default(string), string waId = default(string)) - { - this.Input = input; - this.Status = status; - this.WaId = waId; - } - - /// - /// Sent value - /// - /// Sent value - /// 16315551000 - [DataMember(Name = "input", EmitDefaultValue = false)] - public string Input { get; set; } - - /// - /// Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending - /// - /// Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending - /// valid - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Formatted contact phone - /// - /// Formatted contact phone - /// 16315551000 - [DataMember(Name = "wa_id", EmitDefaultValue = false)] - public string WaId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ContactsContactsInner {\n"); - sb.Append(" Input: ").Append(Input).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" WaId: ").Append(WaId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ContactsContactsInner); - } - - /// - /// Returns true if ContactsContactsInner instances are equal - /// - /// Instance of ContactsContactsInner to be compared - /// Boolean - public bool Equals(ContactsContactsInner input) - { - if (input == null) - { - return false; - } - return - ( - this.Input == input.Input || - (this.Input != null && - this.Input.Equals(input.Input)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.WaId == input.WaId || - (this.WaId != null && - this.WaId.Equals(input.WaId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Input != null) - { - hashCode = (hashCode * 59) + this.Input.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.WaId != null) - { - hashCode = (hashCode * 59) + this.WaId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ContactsRequest.cs b/csharp/src/OneMessage.io/Model/ContactsRequest.cs deleted file mode 100644 index c646e41..0000000 --- a/csharp/src/OneMessage.io/Model/ContactsRequest.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ContactsRequest - /// - [DataContract(Name = "ContactsRequest")] - public partial class ContactsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ContactsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Operating mode: *wait* - synchronous *no_wait* - asynchronous (default). - /// Using cache: *true* - ignore cache *false* - use cache (default). - /// Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] (required). - public ContactsRequest(string blocking = default(string), bool forceCheck = default(bool), List contacts = default(List)) - { - // to ensure "contacts" is required (not null) - if (contacts == null) - { - throw new ArgumentNullException("contacts is a required property for ContactsRequest and cannot be null"); - } - this.Contacts = contacts; - this.Blocking = blocking; - this.ForceCheck = forceCheck; - } - - /// - /// Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) - /// - /// Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) - /// wait - [DataMember(Name = "blocking", EmitDefaultValue = false)] - public string Blocking { get; set; } - - /// - /// Using cache: *true* - ignore cache *false* - use cache (default) - /// - /// Using cache: *true* - ignore cache *false* - use cache (default) - /// true - [DataMember(Name = "force_check", EmitDefaultValue = true)] - public bool ForceCheck { get; set; } - - /// - /// Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] - /// - /// Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] - /// ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - [DataMember(Name = "contacts", IsRequired = true, EmitDefaultValue = true)] - public List Contacts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ContactsRequest {\n"); - sb.Append(" Blocking: ").Append(Blocking).Append("\n"); - sb.Append(" ForceCheck: ").Append(ForceCheck).Append("\n"); - sb.Append(" Contacts: ").Append(Contacts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ContactsRequest); - } - - /// - /// Returns true if ContactsRequest instances are equal - /// - /// Instance of ContactsRequest to be compared - /// Boolean - public bool Equals(ContactsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Blocking == input.Blocking || - (this.Blocking != null && - this.Blocking.Equals(input.Blocking)) - ) && - ( - this.ForceCheck == input.ForceCheck || - this.ForceCheck.Equals(input.ForceCheck) - ) && - ( - this.Contacts == input.Contacts || - this.Contacts != null && - input.Contacts != null && - this.Contacts.SequenceEqual(input.Contacts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Blocking != null) - { - hashCode = (hashCode * 59) + this.Blocking.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ForceCheck.GetHashCode(); - if (this.Contacts != null) - { - hashCode = (hashCode * 59) + this.Contacts.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetAckInfo.cs b/csharp/src/OneMessage.io/Model/GetAckInfo.cs deleted file mode 100644 index 2017448..0000000 --- a/csharp/src/OneMessage.io/Model/GetAckInfo.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetAckInfo - /// - [DataContract(Name = "GetAckInfo")] - public partial class GetAckInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// hooks. - public GetAckInfo(List hooks = default(List)) - { - this.Hooks = hooks; - } - - /// - /// Gets or Sets Hooks - /// - [DataMember(Name = "hooks", EmitDefaultValue = false)] - public List Hooks { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetAckInfo {\n"); - sb.Append(" Hooks: ").Append(Hooks).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetAckInfo); - } - - /// - /// Returns true if GetAckInfo instances are equal - /// - /// Instance of GetAckInfo to be compared - /// Boolean - public bool Equals(GetAckInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Hooks == input.Hooks || - this.Hooks != null && - input.Hooks != null && - this.Hooks.SequenceEqual(input.Hooks) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Hooks != null) - { - hashCode = (hashCode * 59) + this.Hooks.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetAckInfoHooksInner.cs b/csharp/src/OneMessage.io/Model/GetAckInfoHooksInner.cs deleted file mode 100644 index 0810586..0000000 --- a/csharp/src/OneMessage.io/Model/GetAckInfoHooksInner.cs +++ /dev/null @@ -1,244 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetAckInfoHooksInner - /// - [DataContract(Name = "GetAckInfo_hooks_inner")] - public partial class GetAckInfoHooksInner : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// type. - /// status. - /// pricing. - /// timestamp. - /// conversation. - /// recipientId. - public GetAckInfoHooksInner(string id = default(string), string type = default(string), string status = default(string), Object pricing = default(Object), string timestamp = default(string), Object conversation = default(Object), string recipientId = default(string)) - { - this.Id = id; - this.Type = type; - this.Status = status; - this.Pricing = pricing; - this.Timestamp = timestamp; - this.Conversation = conversation; - this.RecipientId = recipientId; - } - - /// - /// Gets or Sets Id - /// - /// gBGGeSaGViBfAgnlzOSHEwK9O6F - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Type - /// - /// message - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Gets or Sets Status - /// - /// sent - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Gets or Sets Pricing - /// - /// {"billable":true,"category":"business_initiated","pricing_model":"CBP"} - [DataMember(Name = "pricing", EmitDefaultValue = false)] - public Object Pricing { get; set; } - - /// - /// Gets or Sets Timestamp - /// - /// 1654864094 - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public string Timestamp { get; set; } - - /// - /// Gets or Sets Conversation - /// - /// {"id":"c1f5a3a1b9ff6f2e1c43fd31543137e0","origin":{"type":"business_initiated"},"expiration_timestamp":1654943940} - [DataMember(Name = "conversation", EmitDefaultValue = false)] - public Object Conversation { get; set; } - - /// - /// Gets or Sets RecipientId - /// - /// 556123122026 - [DataMember(Name = "recipient_id", EmitDefaultValue = false)] - public string RecipientId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetAckInfoHooksInner {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Pricing: ").Append(Pricing).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Conversation: ").Append(Conversation).Append("\n"); - sb.Append(" RecipientId: ").Append(RecipientId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetAckInfoHooksInner); - } - - /// - /// Returns true if GetAckInfoHooksInner instances are equal - /// - /// Instance of GetAckInfoHooksInner to be compared - /// Boolean - public bool Equals(GetAckInfoHooksInner input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Pricing == input.Pricing || - (this.Pricing != null && - this.Pricing.Equals(input.Pricing)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Conversation == input.Conversation || - (this.Conversation != null && - this.Conversation.Equals(input.Conversation)) - ) && - ( - this.RecipientId == input.RecipientId || - (this.RecipientId != null && - this.RecipientId.Equals(input.RecipientId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.Pricing != null) - { - hashCode = (hashCode * 59) + this.Pricing.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - if (this.Conversation != null) - { - hashCode = (hashCode * 59) + this.Conversation.GetHashCode(); - } - if (this.RecipientId != null) - { - hashCode = (hashCode * 59) + this.RecipientId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetCommerce.cs b/csharp/src/OneMessage.io/Model/GetCommerce.cs deleted file mode 100644 index f3f48e5..0000000 --- a/csharp/src/OneMessage.io/Model/GetCommerce.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetCommerce - /// - [DataContract(Name = "GetCommerce")] - public partial class GetCommerce : List, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public GetCommerce() : base() - { - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetCommerce {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetCommerce); - } - - /// - /// Returns true if GetCommerce instances are equal - /// - /// Instance of GetCommerce to be compared - /// Boolean - public bool Equals(GetCommerce input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetCommerceInner.cs b/csharp/src/OneMessage.io/Model/GetCommerceInner.cs deleted file mode 100644 index 178a550..0000000 --- a/csharp/src/OneMessage.io/Model/GetCommerceInner.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetCommerceInner - /// - [DataContract(Name = "GetCommerce_inner")] - public partial class GetCommerceInner : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// isCartEnabled. - /// isCatalogVisible. - public GetCommerceInner(string id = default(string), bool isCartEnabled = default(bool), bool isCatalogVisible = default(bool)) - { - this.Id = id; - this.IsCartEnabled = isCartEnabled; - this.IsCatalogVisible = isCatalogVisible; - } - - /// - /// Gets or Sets Id - /// - /// 789887292550821 - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets IsCartEnabled - /// - /// true - [DataMember(Name = "is_cart_enabled", EmitDefaultValue = true)] - public bool IsCartEnabled { get; set; } - - /// - /// Gets or Sets IsCatalogVisible - /// - /// true - [DataMember(Name = "is_catalog_visible", EmitDefaultValue = true)] - public bool IsCatalogVisible { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetCommerceInner {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IsCartEnabled: ").Append(IsCartEnabled).Append("\n"); - sb.Append(" IsCatalogVisible: ").Append(IsCatalogVisible).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetCommerceInner); - } - - /// - /// Returns true if GetCommerceInner instances are equal - /// - /// Instance of GetCommerceInner to be compared - /// Boolean - public bool Equals(GetCommerceInner input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IsCartEnabled == input.IsCartEnabled || - this.IsCartEnabled.Equals(input.IsCartEnabled) - ) && - ( - this.IsCatalogVisible == input.IsCatalogVisible || - this.IsCatalogVisible.Equals(input.IsCatalogVisible) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsCartEnabled.GetHashCode(); - hashCode = (hashCode * 59) + this.IsCatalogVisible.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetIP.cs b/csharp/src/OneMessage.io/Model/GetIP.cs deleted file mode 100644 index 6499a58..0000000 --- a/csharp/src/OneMessage.io/Model/GetIP.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetIP - /// - [DataContract(Name = "GetIP")] - public partial class GetIP : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// result. - public GetIP(string result = default(string)) - { - this.Result = result; - } - - /// - /// Gets or Sets Result - /// - /// 213.74.84.72 - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetIP {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetIP); - } - - /// - /// Returns true if GetIP instances are equal - /// - /// Instance of GetIP to be compared - /// Boolean - public bool Equals(GetIP input) - { - if (input == null) - { - return false; - } - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetMe.cs b/csharp/src/OneMessage.io/Model/GetMe.cs deleted file mode 100644 index edcbad8..0000000 --- a/csharp/src/OneMessage.io/Model/GetMe.cs +++ /dev/null @@ -1,362 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetMe - /// - [DataContract(Name = "GetMe")] - public partial class GetMe : IEquatable, IValidatableObject - { - /// - /// Industry of the business - /// - /// Industry of the business - [JsonConverter(typeof(StringEnumConverter))] - public enum VerticalEnum - { - /// - /// Enum Automotive for value: Automotive - /// - [EnumMember(Value = "Automotive")] - Automotive = 1, - - /// - /// Enum BeautySpaAndSalon for value: Beauty, Spa and Salon - /// - [EnumMember(Value = "Beauty, Spa and Salon")] - BeautySpaAndSalon = 2, - - /// - /// Enum ClothingAndApparel for value: Clothing and Apparel - /// - [EnumMember(Value = "Clothing and Apparel")] - ClothingAndApparel = 3, - - /// - /// Enum Education for value: Education - /// - [EnumMember(Value = "Education")] - Education = 4, - - /// - /// Enum Entertainment for value: Entertainment - /// - [EnumMember(Value = "Entertainment")] - Entertainment = 5, - - /// - /// Enum EventPlanningAndService for value: Event Planning and Service - /// - [EnumMember(Value = "Event Planning and Service")] - EventPlanningAndService = 6, - - /// - /// Enum FinanceAndBanking for value: Finance and Banking - /// - [EnumMember(Value = "Finance and Banking")] - FinanceAndBanking = 7, - - /// - /// Enum FoodAndGrocery for value: Food and Grocery - /// - [EnumMember(Value = "Food and Grocery")] - FoodAndGrocery = 8, - - /// - /// Enum PublicService for value: Public Service - /// - [EnumMember(Value = "Public Service")] - PublicService = 9, - - /// - /// Enum HotelAndLodging for value: Hotel and Lodging - /// - [EnumMember(Value = "Hotel and Lodging")] - HotelAndLodging = 10, - - /// - /// Enum MedicalAndHealth for value: Medical and Health - /// - [EnumMember(Value = "Medical and Health")] - MedicalAndHealth = 11, - - /// - /// Enum NonProfit for value: Non-profit - /// - [EnumMember(Value = "Non-profit")] - NonProfit = 12, - - /// - /// Enum ProfessionalServices for value: Professional Services - /// - [EnumMember(Value = "Professional Services")] - ProfessionalServices = 13, - - /// - /// Enum ShoppingAndRetail for value: Shopping and Retail - /// - [EnumMember(Value = "Shopping and Retail")] - ShoppingAndRetail = 14, - - /// - /// Enum TravelAndTransportation for value: Travel and Transportation - /// - [EnumMember(Value = "Travel and Transportation")] - TravelAndTransportation = 15, - - /// - /// Enum Restaurant for value: Restaurant - /// - [EnumMember(Value = "Restaurant")] - Restaurant = 16, - - /// - /// Enum Other for value: Other - /// - [EnumMember(Value = "Other")] - Other = 17, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 18 - } - - - /// - /// Industry of the business - /// - /// Industry of the business - /// Other - [DataMember(Name = "vertical", EmitDefaultValue = false)] - public VerticalEnum? Vertical { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Profile`s About section.. - /// Address of the business. - /// Description of the business. Max 256 characters. - /// Business email. - /// Linked phone number. - /// Industry of the business. - /// photo. - public GetMe(string about = default(string), string address = default(string), string description = default(string), string email = default(string), string phone = default(string), VerticalEnum? vertical = default(VerticalEnum?), string photo = default(string)) - { - this.About = about; - this.Address = address; - this.Description = description; - this.Email = email; - this.Phone = phone; - this.Vertical = vertical; - this.Photo = photo; - } - - /// - /// Profile`s About section. - /// - /// Profile`s About section. - /// Some about info - [DataMember(Name = "about", EmitDefaultValue = false)] - public string About { get; set; } - - /// - /// Address of the business - /// - /// Address of the business - /// Neverland, Unexpected st. - [DataMember(Name = "address", EmitDefaultValue = false)] - public string Address { get; set; } - - /// - /// Description of the business. Max 256 characters - /// - /// Description of the business. Max 256 characters - /// Some company description - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Business email - /// - /// Business email - /// john@neverland.play - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Linked phone number - /// - /// Linked phone number - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } - - /// - /// Gets or Sets Photo - /// - /// https://pps.whatsapp.net/sample.jpg - [DataMember(Name = "photo", EmitDefaultValue = false)] - public string Photo { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetMe {\n"); - sb.Append(" About: ").Append(About).Append("\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Vertical: ").Append(Vertical).Append("\n"); - sb.Append(" Photo: ").Append(Photo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetMe); - } - - /// - /// Returns true if GetMe instances are equal - /// - /// Instance of GetMe to be compared - /// Boolean - public bool Equals(GetMe input) - { - if (input == null) - { - return false; - } - return - ( - this.About == input.About || - (this.About != null && - this.About.Equals(input.About)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Vertical == input.Vertical || - this.Vertical.Equals(input.Vertical) - ) && - ( - this.Photo == input.Photo || - (this.Photo != null && - this.Photo.Equals(input.Photo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.About != null) - { - hashCode = (hashCode * 59) + this.About.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Vertical.GetHashCode(); - if (this.Photo != null) - { - hashCode = (hashCode * 59) + this.Photo.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetMe401Response.cs b/csharp/src/OneMessage.io/Model/GetMe401Response.cs deleted file mode 100644 index 35e8df9..0000000 --- a/csharp/src/OneMessage.io/Model/GetMe401Response.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetMe401Response - /// - [DataContract(Name = "getMe_401_response")] - public partial class GetMe401Response : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// error. - public GetMe401Response(string error = default(string)) - { - this.Error = error; - } - - /// - /// Gets or Sets Error - /// - /// Wrong token "xxx7i1crxjxpkxxx" for channel "123". Please provide token as a GET parameter. - [DataMember(Name = "error", EmitDefaultValue = false)] - public string Error { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetMe401Response {\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetMe401Response); - } - - /// - /// Returns true if GetMe401Response instances are equal - /// - /// Instance of GetMe401Response to be compared - /// Boolean - public bool Equals(GetMe401Response input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetMessages.cs b/csharp/src/OneMessage.io/Model/GetMessages.cs deleted file mode 100644 index 47fe8d5..0000000 --- a/csharp/src/OneMessage.io/Model/GetMessages.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetMessages - /// - [DataContract(Name = "GetMessages")] - public partial class GetMessages : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// messages. - public GetMessages(List messages = default(List)) - { - this.Messages = messages; - } - - /// - /// Gets or Sets Messages - /// - [DataMember(Name = "messages", EmitDefaultValue = false)] - public List Messages { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetMessages {\n"); - sb.Append(" Messages: ").Append(Messages).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetMessages); - } - - /// - /// Returns true if GetMessages instances are equal - /// - /// Instance of GetMessages to be compared - /// Boolean - public bool Equals(GetMessages input) - { - if (input == null) - { - return false; - } - return - ( - this.Messages == input.Messages || - this.Messages != null && - input.Messages != null && - this.Messages.SequenceEqual(input.Messages) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Messages != null) - { - hashCode = (hashCode * 59) + this.Messages.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetMessagesMessagesInner.cs b/csharp/src/OneMessage.io/Model/GetMessagesMessagesInner.cs deleted file mode 100644 index cd57b1c..0000000 --- a/csharp/src/OneMessage.io/Model/GetMessagesMessagesInner.cs +++ /dev/null @@ -1,374 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetMessagesMessagesInner - /// - [DataContract(Name = "GetMessages_messages_inner")] - public partial class GetMessagesMessagesInner : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// messageNumber. - /// id. - /// body. - /// fromMe. - /// self. - /// isForwarded. - /// author. - /// time. - /// chatId. - /// type. - /// senderName. - /// caption. - /// quotedMsgId. - /// metadata. - /// chatName. - public GetMessagesMessagesInner(int messageNumber = default(int), string id = default(string), string body = default(string), bool fromMe = default(bool), int self = default(int), int isForwarded = default(int), string author = default(string), int time = default(int), string chatId = default(string), string type = default(string), string senderName = default(string), string caption = default(string), string quotedMsgId = default(string), Object metadata = default(Object), string chatName = default(string)) - { - this.MessageNumber = messageNumber; - this.Id = id; - this.Body = body; - this.FromMe = fromMe; - this.Self = self; - this.IsForwarded = isForwarded; - this.Author = author; - this.Time = time; - this.ChatId = chatId; - this.Type = type; - this.SenderName = senderName; - this.Caption = caption; - this.QuotedMsgId = quotedMsgId; - this.Metadata = metadata; - this.ChatName = chatName; - } - - /// - /// Gets or Sets MessageNumber - /// - /// 1 - [DataMember(Name = "messageNumber", EmitDefaultValue = false)] - public int MessageNumber { get; set; } - - /// - /// Gets or Sets Id - /// - /// 0XzkmGNn4prUAQlzsHApGNRXQ0U - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Body - /// - /// Test message - [DataMember(Name = "body", EmitDefaultValue = false)] - public string Body { get; set; } - - /// - /// Gets or Sets FromMe - /// - /// true - [DataMember(Name = "fromMe", EmitDefaultValue = true)] - public bool FromMe { get; set; } - - /// - /// Gets or Sets Self - /// - /// 1 - [DataMember(Name = "self", EmitDefaultValue = false)] - public int Self { get; set; } - - /// - /// Gets or Sets IsForwarded - /// - /// 0 - [DataMember(Name = "isForwarded", EmitDefaultValue = false)] - public int IsForwarded { get; set; } - - /// - /// Gets or Sets Author - /// - /// 556123122026@c.us - [DataMember(Name = "author", EmitDefaultValue = false)] - public string Author { get; set; } - - /// - /// Gets or Sets Time - /// - /// 1665396610 - [DataMember(Name = "time", EmitDefaultValue = false)] - public int Time { get; set; } - - /// - /// Gets or Sets ChatId - /// - /// 556123122026@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// Gets or Sets Type - /// - /// chat - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Gets or Sets SenderName - /// - /// 780005553535@c.us - [DataMember(Name = "senderName", EmitDefaultValue = false)] - public string SenderName { get; set; } - - /// - /// Gets or Sets Caption - /// - [DataMember(Name = "caption", EmitDefaultValue = false)] - public string Caption { get; set; } - - /// - /// Gets or Sets QuotedMsgId - /// - [DataMember(Name = "quotedMsgId", EmitDefaultValue = false)] - public string QuotedMsgId { get; set; } - - /// - /// Gets or Sets Metadata - /// - /// {} - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Object Metadata { get; set; } - - /// - /// Gets or Sets ChatName - /// - /// 556123122026 - [DataMember(Name = "chatName", EmitDefaultValue = false)] - public string ChatName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetMessagesMessagesInner {\n"); - sb.Append(" MessageNumber: ").Append(MessageNumber).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append(" FromMe: ").Append(FromMe).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append(" IsForwarded: ").Append(IsForwarded).Append("\n"); - sb.Append(" Author: ").Append(Author).Append("\n"); - sb.Append(" Time: ").Append(Time).Append("\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" SenderName: ").Append(SenderName).Append("\n"); - sb.Append(" Caption: ").Append(Caption).Append("\n"); - sb.Append(" QuotedMsgId: ").Append(QuotedMsgId).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" ChatName: ").Append(ChatName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetMessagesMessagesInner); - } - - /// - /// Returns true if GetMessagesMessagesInner instances are equal - /// - /// Instance of GetMessagesMessagesInner to be compared - /// Boolean - public bool Equals(GetMessagesMessagesInner input) - { - if (input == null) - { - return false; - } - return - ( - this.MessageNumber == input.MessageNumber || - this.MessageNumber.Equals(input.MessageNumber) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.FromMe == input.FromMe || - this.FromMe.Equals(input.FromMe) - ) && - ( - this.Self == input.Self || - this.Self.Equals(input.Self) - ) && - ( - this.IsForwarded == input.IsForwarded || - this.IsForwarded.Equals(input.IsForwarded) - ) && - ( - this.Author == input.Author || - (this.Author != null && - this.Author.Equals(input.Author)) - ) && - ( - this.Time == input.Time || - this.Time.Equals(input.Time) - ) && - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.SenderName == input.SenderName || - (this.SenderName != null && - this.SenderName.Equals(input.SenderName)) - ) && - ( - this.Caption == input.Caption || - (this.Caption != null && - this.Caption.Equals(input.Caption)) - ) && - ( - this.QuotedMsgId == input.QuotedMsgId || - (this.QuotedMsgId != null && - this.QuotedMsgId.Equals(input.QuotedMsgId)) - ) && - ( - this.Metadata == input.Metadata || - (this.Metadata != null && - this.Metadata.Equals(input.Metadata)) - ) && - ( - this.ChatName == input.ChatName || - (this.ChatName != null && - this.ChatName.Equals(input.ChatName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.MessageNumber.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FromMe.GetHashCode(); - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - hashCode = (hashCode * 59) + this.IsForwarded.GetHashCode(); - if (this.Author != null) - { - hashCode = (hashCode * 59) + this.Author.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Time.GetHashCode(); - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.SenderName != null) - { - hashCode = (hashCode * 59) + this.SenderName.GetHashCode(); - } - if (this.Caption != null) - { - hashCode = (hashCode * 59) + this.Caption.GetHashCode(); - } - if (this.QuotedMsgId != null) - { - hashCode = (hashCode * 59) + this.QuotedMsgId.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.ChatName != null) - { - hashCode = (hashCode * 59) + this.ChatName.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetTemplates.cs b/csharp/src/OneMessage.io/Model/GetTemplates.cs deleted file mode 100644 index a6b151c..0000000 --- a/csharp/src/OneMessage.io/Model/GetTemplates.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetTemplates - /// - [DataContract(Name = "GetTemplates")] - public partial class GetTemplates : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// total. - /// templates. - public GetTemplates(int total = default(int), List templates = default(List)) - { - this.Total = total; - this.Templates = templates; - } - - /// - /// Gets or Sets Total - /// - /// 3 - [DataMember(Name = "total", EmitDefaultValue = false)] - public int Total { get; set; } - - /// - /// Gets or Sets Templates - /// - [DataMember(Name = "templates", EmitDefaultValue = false)] - public List Templates { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTemplates {\n"); - sb.Append(" Total: ").Append(Total).Append("\n"); - sb.Append(" Templates: ").Append(Templates).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTemplates); - } - - /// - /// Returns true if GetTemplates instances are equal - /// - /// Instance of GetTemplates to be compared - /// Boolean - public bool Equals(GetTemplates input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - this.Total.Equals(input.Total) - ) && - ( - this.Templates == input.Templates || - this.Templates != null && - input.Templates != null && - this.Templates.SequenceEqual(input.Templates) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - if (this.Templates != null) - { - hashCode = (hashCode * 59) + this.Templates.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/GetTemplatesTemplatesInner.cs b/csharp/src/OneMessage.io/Model/GetTemplatesTemplatesInner.cs deleted file mode 100644 index dac760b..0000000 --- a/csharp/src/OneMessage.io/Model/GetTemplatesTemplatesInner.cs +++ /dev/null @@ -1,234 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// GetTemplatesTemplatesInner - /// - [DataContract(Name = "GetTemplates_templates_inner")] - public partial class GetTemplatesTemplatesInner : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets Category - /// - [DataMember(Name = "category", EmitDefaultValue = false)] - public TemplateCategoryProp? Category { get; set; } - - /// - /// Gets or Sets Language - /// - [DataMember(Name = "language", EmitDefaultValue = false)] - public TemplateLanguageProp? Language { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// category. - /// components. - /// language. - /// name. - /// Can be found by method /templates. - /// rejectedReason. - /// status. - public GetTemplatesTemplatesInner(TemplateCategoryProp? category = default(TemplateCategoryProp?), TemplateComponentsProp components = default(TemplateComponentsProp), TemplateLanguageProp? language = default(TemplateLanguageProp?), string name = default(string), string varNamespace = default(string), string rejectedReason = default(string), string status = default(string)) - { - this.Category = category; - this.Components = components; - this.Language = language; - this.Name = name; - this.VarNamespace = varNamespace; - this.RejectedReason = rejectedReason; - this.Status = status; - } - - /// - /// Gets or Sets Components - /// - [DataMember(Name = "components", EmitDefaultValue = false)] - public TemplateComponentsProp Components { get; set; } - - /// - /// Gets or Sets Name - /// - /// start - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Can be found by method /templates - /// - /// Can be found by method /templates - /// ca300906_cfbc_410b_99fb_dcee8e13d578 - [DataMember(Name = "namespace", EmitDefaultValue = false)] - public string VarNamespace { get; set; } - - /// - /// Gets or Sets RejectedReason - /// - /// NONE - [DataMember(Name = "rejected_reason", EmitDefaultValue = false)] - public string RejectedReason { get; set; } - - /// - /// Gets or Sets Status - /// - /// approved - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTemplatesTemplatesInner {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Components: ").Append(Components).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" VarNamespace: ").Append(VarNamespace).Append("\n"); - sb.Append(" RejectedReason: ").Append(RejectedReason).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTemplatesTemplatesInner); - } - - /// - /// Returns true if GetTemplatesTemplatesInner instances are equal - /// - /// Instance of GetTemplatesTemplatesInner to be compared - /// Boolean - public bool Equals(GetTemplatesTemplatesInner input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Components == input.Components || - (this.Components != null && - this.Components.Equals(input.Components)) - ) && - ( - this.Language == input.Language || - this.Language.Equals(input.Language) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.VarNamespace == input.VarNamespace || - (this.VarNamespace != null && - this.VarNamespace.Equals(input.VarNamespace)) - ) && - ( - this.RejectedReason == input.RejectedReason || - (this.RejectedReason != null && - this.RejectedReason.Equals(input.RejectedReason)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Components != null) - { - hashCode = (hashCode * 59) + this.Components.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.VarNamespace != null) - { - hashCode = (hashCode * 59) + this.VarNamespace.GetHashCode(); - } - if (this.RejectedReason != null) - { - hashCode = (hashCode * 59) + this.RejectedReason.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/MeComponents.cs b/csharp/src/OneMessage.io/Model/MeComponents.cs deleted file mode 100644 index 3490765..0000000 --- a/csharp/src/OneMessage.io/Model/MeComponents.cs +++ /dev/null @@ -1,362 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// MeComponents - /// - [DataContract(Name = "MeComponents")] - public partial class MeComponents : IEquatable, IValidatableObject - { - /// - /// Industry of the business - /// - /// Industry of the business - [JsonConverter(typeof(StringEnumConverter))] - public enum VerticalEnum - { - /// - /// Enum Automotive for value: Automotive - /// - [EnumMember(Value = "Automotive")] - Automotive = 1, - - /// - /// Enum BeautySpaAndSalon for value: Beauty, Spa and Salon - /// - [EnumMember(Value = "Beauty, Spa and Salon")] - BeautySpaAndSalon = 2, - - /// - /// Enum ClothingAndApparel for value: Clothing and Apparel - /// - [EnumMember(Value = "Clothing and Apparel")] - ClothingAndApparel = 3, - - /// - /// Enum Education for value: Education - /// - [EnumMember(Value = "Education")] - Education = 4, - - /// - /// Enum Entertainment for value: Entertainment - /// - [EnumMember(Value = "Entertainment")] - Entertainment = 5, - - /// - /// Enum EventPlanningAndService for value: Event Planning and Service - /// - [EnumMember(Value = "Event Planning and Service")] - EventPlanningAndService = 6, - - /// - /// Enum FinanceAndBanking for value: Finance and Banking - /// - [EnumMember(Value = "Finance and Banking")] - FinanceAndBanking = 7, - - /// - /// Enum FoodAndGrocery for value: Food and Grocery - /// - [EnumMember(Value = "Food and Grocery")] - FoodAndGrocery = 8, - - /// - /// Enum PublicService for value: Public Service - /// - [EnumMember(Value = "Public Service")] - PublicService = 9, - - /// - /// Enum HotelAndLodging for value: Hotel and Lodging - /// - [EnumMember(Value = "Hotel and Lodging")] - HotelAndLodging = 10, - - /// - /// Enum MedicalAndHealth for value: Medical and Health - /// - [EnumMember(Value = "Medical and Health")] - MedicalAndHealth = 11, - - /// - /// Enum NonProfit for value: Non-profit - /// - [EnumMember(Value = "Non-profit")] - NonProfit = 12, - - /// - /// Enum ProfessionalServices for value: Professional Services - /// - [EnumMember(Value = "Professional Services")] - ProfessionalServices = 13, - - /// - /// Enum ShoppingAndRetail for value: Shopping and Retail - /// - [EnumMember(Value = "Shopping and Retail")] - ShoppingAndRetail = 14, - - /// - /// Enum TravelAndTransportation for value: Travel and Transportation - /// - [EnumMember(Value = "Travel and Transportation")] - TravelAndTransportation = 15, - - /// - /// Enum Restaurant for value: Restaurant - /// - [EnumMember(Value = "Restaurant")] - Restaurant = 16, - - /// - /// Enum Other for value: Other - /// - [EnumMember(Value = "Other")] - Other = 17, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 18 - } - - - /// - /// Industry of the business - /// - /// Industry of the business - /// Other - [DataMember(Name = "vertical", EmitDefaultValue = false)] - public VerticalEnum? Vertical { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Profile`s About section.. - /// Address of the business. - /// Description of the business. Max 256 characters. - /// Business email. - /// Linked phone number. - /// Industry of the business. - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field. - public MeComponents(string about = default(string), string address = default(string), string description = default(string), string email = default(string), string phone = default(string), VerticalEnum? vertical = default(VerticalEnum?), string photo = default(string)) - { - this.About = about; - this.Address = address; - this.Description = description; - this.Email = email; - this.Phone = phone; - this.Vertical = vertical; - this.Photo = photo; - } - - /// - /// Profile`s About section. - /// - /// Profile`s About section. - /// Some about info - [DataMember(Name = "about", EmitDefaultValue = false)] - public string About { get; set; } - - /// - /// Address of the business - /// - /// Address of the business - /// Neverland, Unexpected st. - [DataMember(Name = "address", EmitDefaultValue = false)] - public string Address { get; set; } - - /// - /// Description of the business. Max 256 characters - /// - /// Description of the business. Max 256 characters - /// Some company description - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Business email - /// - /// Business email - /// john@neverland.play - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Linked phone number - /// - /// Linked phone number - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - [DataMember(Name = "photo", EmitDefaultValue = false)] - public string Photo { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MeComponents {\n"); - sb.Append(" About: ").Append(About).Append("\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Vertical: ").Append(Vertical).Append("\n"); - sb.Append(" Photo: ").Append(Photo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MeComponents); - } - - /// - /// Returns true if MeComponents instances are equal - /// - /// Instance of MeComponents to be compared - /// Boolean - public bool Equals(MeComponents input) - { - if (input == null) - { - return false; - } - return - ( - this.About == input.About || - (this.About != null && - this.About.Equals(input.About)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Vertical == input.Vertical || - this.Vertical.Equals(input.Vertical) - ) && - ( - this.Photo == input.Photo || - (this.Photo != null && - this.Photo.Equals(input.Photo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.About != null) - { - hashCode = (hashCode * 59) + this.About.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Vertical.GetHashCode(); - if (this.Photo != null) - { - hashCode = (hashCode * 59) + this.Photo.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/MediaId.cs b/csharp/src/OneMessage.io/Model/MediaId.cs deleted file mode 100644 index e75a84e..0000000 --- a/csharp/src/OneMessage.io/Model/MediaId.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// MediaId - /// - [DataContract(Name = "MediaId")] - public partial class MediaId : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varMediaId. - public MediaId(string varMediaId = default(string)) - { - this.VarMediaId = varMediaId; - } - - /// - /// Gets or Sets VarMediaId - /// - /// ed2c7be7-b779-4ba8-a17c-6722f37be2a7 - [DataMember(Name = "mediaId", EmitDefaultValue = false)] - public string VarMediaId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MediaId {\n"); - sb.Append(" VarMediaId: ").Append(VarMediaId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MediaId); - } - - /// - /// Returns true if MediaId instances are equal - /// - /// Instance of MediaId to be compared - /// Boolean - public bool Equals(MediaId input) - { - if (input == null) - { - return false; - } - return - ( - this.VarMediaId == input.VarMediaId || - (this.VarMediaId != null && - this.VarMediaId.Equals(input.VarMediaId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarMediaId != null) - { - hashCode = (hashCode * 59) + this.VarMediaId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/Message.cs b/csharp/src/OneMessage.io/Model/Message.cs deleted file mode 100644 index d45a18a..0000000 --- a/csharp/src/OneMessage.io/Model/Message.cs +++ /dev/null @@ -1,387 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Message - /// - [DataContract(Name = "Message")] - public partial class Message : IEquatable, IValidatableObject - { - /// - /// type of the message - /// - /// type of the message - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Chat for value: chat - /// - [EnumMember(Value = "chat")] - Chat = 1, - - /// - /// Enum Interactive for value: interactive - /// - [EnumMember(Value = "interactive")] - Interactive = 2, - - /// - /// Enum Image for value: image - /// - [EnumMember(Value = "image")] - Image = 3, - - /// - /// Enum Video for value: video - /// - [EnumMember(Value = "video")] - Video = 4, - - /// - /// Enum Document for value: document - /// - [EnumMember(Value = "document")] - Document = 5, - - /// - /// Enum Audio for value: audio - /// - [EnumMember(Value = "audio")] - Audio = 6, - - /// - /// Enum Sticker for value: sticker - /// - [EnumMember(Value = "sticker")] - Sticker = 7, - - /// - /// Enum Voice for value: voice - /// - [EnumMember(Value = "voice")] - Voice = 8 - } - - - /// - /// type of the message - /// - /// type of the message - /// chat - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// unique id. - /// text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\". - /// true - outgoing, false - incoming. - /// 1 - generated by api, 0 - generated by app. - /// true - forwarded message, false - direct message. - /// Author ID of the message. - /// send time, unix timestamp. - /// chat ID. - /// type of the message. - /// Sender name. - /// File caption or filename. - /// ID of quoted message. - public Message(string id = default(string), string body = default(string), bool fromMe = default(bool), int self = default(int), bool isForwarded = default(bool), string author = default(string), int time = default(int), string chatId = default(string), TypeEnum? type = default(TypeEnum?), string senderName = default(string), string caption = default(string), string quotedMsgId = default(string)) - { - this.Id = id; - this.Body = body; - this.FromMe = fromMe; - this.Self = self; - this.IsForwarded = isForwarded; - this.Author = author; - this.Time = time; - this.ChatId = chatId; - this.Type = type; - this.SenderName = senderName; - this.Caption = caption; - this.QuotedMsgId = quotedMsgId; - } - - /// - /// unique id - /// - /// unique id - /// ABGHYoIXMAmY13IKOick9az6QYmt4R - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" - /// - /// text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" - /// Ok! - [DataMember(Name = "body", EmitDefaultValue = false)] - public string Body { get; set; } - - /// - /// true - outgoing, false - incoming - /// - /// true - outgoing, false - incoming - /// true - [DataMember(Name = "fromMe", EmitDefaultValue = true)] - public bool FromMe { get; set; } - - /// - /// 1 - generated by api, 0 - generated by app - /// - /// 1 - generated by api, 0 - generated by app - /// 0 - [DataMember(Name = "self", EmitDefaultValue = false)] - public int Self { get; set; } - - /// - /// true - forwarded message, false - direct message - /// - /// true - forwarded message, false - direct message - /// false - [DataMember(Name = "isForwarded", EmitDefaultValue = true)] - public bool IsForwarded { get; set; } - - /// - /// Author ID of the message - /// - /// Author ID of the message - /// 12020721369@c.us - [DataMember(Name = "author", EmitDefaultValue = false)] - public string Author { get; set; } - - /// - /// send time, unix timestamp - /// - /// send time, unix timestamp - /// 1665396610 - [DataMember(Name = "time", EmitDefaultValue = false)] - public int Time { get; set; } - - /// - /// chat ID - /// - /// chat ID - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// Sender name - /// - /// Sender name - /// John - [DataMember(Name = "senderName", EmitDefaultValue = false)] - public string SenderName { get; set; } - - /// - /// File caption or filename - /// - /// File caption or filename - /// photo.jpg - [DataMember(Name = "caption", EmitDefaultValue = false)] - public string Caption { get; set; } - - /// - /// ID of quoted message - /// - /// ID of quoted message - /// ABGHYoIXMAmYTwIKOick9az6QYmt4R - [DataMember(Name = "quotedMsgId", EmitDefaultValue = false)] - public string QuotedMsgId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Message {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append(" FromMe: ").Append(FromMe).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append(" IsForwarded: ").Append(IsForwarded).Append("\n"); - sb.Append(" Author: ").Append(Author).Append("\n"); - sb.Append(" Time: ").Append(Time).Append("\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" SenderName: ").Append(SenderName).Append("\n"); - sb.Append(" Caption: ").Append(Caption).Append("\n"); - sb.Append(" QuotedMsgId: ").Append(QuotedMsgId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Message); - } - - /// - /// Returns true if Message instances are equal - /// - /// Instance of Message to be compared - /// Boolean - public bool Equals(Message input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.FromMe == input.FromMe || - this.FromMe.Equals(input.FromMe) - ) && - ( - this.Self == input.Self || - this.Self.Equals(input.Self) - ) && - ( - this.IsForwarded == input.IsForwarded || - this.IsForwarded.Equals(input.IsForwarded) - ) && - ( - this.Author == input.Author || - (this.Author != null && - this.Author.Equals(input.Author)) - ) && - ( - this.Time == input.Time || - this.Time.Equals(input.Time) - ) && - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.SenderName == input.SenderName || - (this.SenderName != null && - this.SenderName.Equals(input.SenderName)) - ) && - ( - this.Caption == input.Caption || - (this.Caption != null && - this.Caption.Equals(input.Caption)) - ) && - ( - this.QuotedMsgId == input.QuotedMsgId || - (this.QuotedMsgId != null && - this.QuotedMsgId.Equals(input.QuotedMsgId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FromMe.GetHashCode(); - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - hashCode = (hashCode * 59) + this.IsForwarded.GetHashCode(); - if (this.Author != null) - { - hashCode = (hashCode * 59) + this.Author.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Time.GetHashCode(); - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.SenderName != null) - { - hashCode = (hashCode * 59) + this.SenderName.GetHashCode(); - } - if (this.Caption != null) - { - hashCode = (hashCode * 59) + this.Caption.GetHashCode(); - } - if (this.QuotedMsgId != null) - { - hashCode = (hashCode * 59) + this.QuotedMsgId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/MessageIdProp.cs b/csharp/src/OneMessage.io/Model/MessageIdProp.cs deleted file mode 100644 index fa28b1e..0000000 --- a/csharp/src/OneMessage.io/Model/MessageIdProp.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// MessageIdProp - /// - [DataContract(Name = "MessageIdProp")] - public partial class MessageIdProp : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U. - public MessageIdProp(string messageId = default(string)) - { - this.MessageId = messageId; - } - - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// 0XzkmGNn4prUAQlzsHApGNRXQ0U - [DataMember(Name = "messageId", EmitDefaultValue = false)] - public string MessageId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MessageIdProp {\n"); - sb.Append(" MessageId: ").Append(MessageId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessageIdProp); - } - - /// - /// Returns true if MessageIdProp instances are equal - /// - /// Instance of MessageIdProp to be compared - /// Boolean - public bool Equals(MessageIdProp input) - { - if (input == null) - { - return false; - } - return - ( - this.MessageId == input.MessageId || - (this.MessageId != null && - this.MessageId.Equals(input.MessageId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MessageId != null) - { - hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/PhoneProp.cs b/csharp/src/OneMessage.io/Model/PhoneProp.cs deleted file mode 100644 index 4413f82..0000000 --- a/csharp/src/OneMessage.io/Model/PhoneProp.cs +++ /dev/null @@ -1,127 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// PhoneProp - /// - [DataContract(Name = "PhoneProp")] - public partial class PhoneProp : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - public PhoneProp(int phone = default(int)) - { - this.Phone = phone; - } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PhoneProp {\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PhoneProp); - } - - /// - /// Returns true if PhoneProp instances are equal - /// - /// Instance of PhoneProp to be compared - /// Boolean - public bool Equals(PhoneProp input) - { - if (input == null) - { - return false; - } - return - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/ReadMessageRequest.cs b/csharp/src/OneMessage.io/Model/ReadMessageRequest.cs deleted file mode 100644 index 6aefbcd..0000000 --- a/csharp/src/OneMessage.io/Model/ReadMessageRequest.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// ReadMessageRequest - /// - [DataContract(Name = "ReadMessageRequest")] - public partial class ReadMessageRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U. - public ReadMessageRequest(string messageId = default(string)) - { - this.MessageId = messageId; - } - - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// - /// Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - /// 0XzkmGNn4prUAQlzsHApGNRXQ0U - [DataMember(Name = "messageId", EmitDefaultValue = false)] - public string MessageId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReadMessageRequest {\n"); - sb.Append(" MessageId: ").Append(MessageId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadMessageRequest); - } - - /// - /// Returns true if ReadMessageRequest instances are equal - /// - /// Instance of ReadMessageRequest to be compared - /// Boolean - public bool Equals(ReadMessageRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MessageId == input.MessageId || - (this.MessageId != null && - this.MessageId.Equals(input.MessageId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MessageId != null) - { - hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/RemoveTemplateRequest.cs b/csharp/src/OneMessage.io/Model/RemoveTemplateRequest.cs deleted file mode 100644 index 98c82fc..0000000 --- a/csharp/src/OneMessage.io/Model/RemoveTemplateRequest.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// RemoveTemplateRequest - /// - [DataContract(Name = "RemoveTemplateRequest")] - public partial class RemoveTemplateRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Template name. - public RemoveTemplateRequest(string name = default(string)) - { - this.Name = name; - } - - /// - /// Template name - /// - /// Template name - /// start - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RemoveTemplateRequest {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RemoveTemplateRequest); - } - - /// - /// Returns true if RemoveTemplateRequest instances are equal - /// - /// Instance of RemoveTemplateRequest to be compared - /// Boolean - public bool Equals(RemoveTemplateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendContactRequest.cs b/csharp/src/OneMessage.io/Model/SendContactRequest.cs deleted file mode 100644 index 76c01fa..0000000 --- a/csharp/src/OneMessage.io/Model/SendContactRequest.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendContactRequest - /// - [DataContract(Name = "SendContactRequest")] - public partial class SendContactRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}]. - public SendContactRequest(string chatId = default(string), int phone = default(int), List contacts = default(List)) - { - this.ChatId = chatId; - this.Phone = phone; - this.Contacts = contacts; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] - /// - /// Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] - /// [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - [DataMember(Name = "contacts", EmitDefaultValue = false)] - public List Contacts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendContactRequest {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Contacts: ").Append(Contacts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendContactRequest); - } - - /// - /// Returns true if SendContactRequest instances are equal - /// - /// Instance of SendContactRequest to be compared - /// Boolean - public bool Equals(SendContactRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Contacts == input.Contacts || - this.Contacts != null && - input.Contacts != null && - this.Contacts.SequenceEqual(input.Contacts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Contacts != null) - { - hashCode = (hashCode * 59) + this.Contacts.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendFileRequest.cs b/csharp/src/OneMessage.io/Model/SendFileRequest.cs deleted file mode 100644 index 896bf05..0000000 --- a/csharp/src/OneMessage.io/Model/SendFileRequest.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendFileRequest - /// - [DataContract(Name = "SendFileRequest")] - public partial class SendFileRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendFileRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field (required). - /// File name, for *example 1.jpg* or *hello.xlsx* (required). - /// Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026. - public SendFileRequest(string chatId = default(string), int phone = default(int), string body = default(string), string filename = default(string), string caption = default(string)) - { - // to ensure "body" is required (not null) - if (body == null) - { - throw new ArgumentNullException("body is a required property for SendFileRequest and cannot be null"); - } - this.Body = body; - // to ensure "filename" is required (not null) - if (filename == null) - { - throw new ArgumentNullException("filename is a required property for SendFileRequest and cannot be null"); - } - this.Filename = filename; - this.ChatId = chatId; - this.Phone = phone; - this.Caption = caption; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] - public string Body { get; set; } - - /// - /// File name, for *example 1.jpg* or *hello.xlsx* - /// - /// File name, for *example 1.jpg* or *hello.xlsx* - [DataMember(Name = "filename", IsRequired = true, EmitDefaultValue = true)] - public string Filename { get; set; } - - /// - /// Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - /// - /// Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - [DataMember(Name = "caption", EmitDefaultValue = false)] - public string Caption { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendFileRequest {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append(" Filename: ").Append(Filename).Append("\n"); - sb.Append(" Caption: ").Append(Caption).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendFileRequest); - } - - /// - /// Returns true if SendFileRequest instances are equal - /// - /// Instance of SendFileRequest to be compared - /// Boolean - public bool Equals(SendFileRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.Filename == input.Filename || - (this.Filename != null && - this.Filename.Equals(input.Filename)) - ) && - ( - this.Caption == input.Caption || - (this.Caption != null && - this.Caption.Equals(input.Caption)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - if (this.Filename != null) - { - hashCode = (hashCode * 59) + this.Filename.GetHashCode(); - } - if (this.Caption != null) - { - hashCode = (hashCode * 59) + this.Caption.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendListRequest.cs b/csharp/src/OneMessage.io/Model/SendListRequest.cs deleted file mode 100644 index 993a5a5..0000000 --- a/csharp/src/OneMessage.io/Model/SendListRequest.cs +++ /dev/null @@ -1,268 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendListRequest - /// - [DataContract(Name = "SendListRequest")] - public partial class SendListRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendListRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// Main message text (required). - /// Header will be located above message text. - /// Footer will be placed under message text. - /// Action for open list (required). - /// Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] (required). - public SendListRequest(string chatId = default(string), int phone = default(int), string body = default(string), string header = default(string), string footer = default(string), string action = default(string), List sections = default(List)) - { - // to ensure "body" is required (not null) - if (body == null) - { - throw new ArgumentNullException("body is a required property for SendListRequest and cannot be null"); - } - this.Body = body; - // to ensure "action" is required (not null) - if (action == null) - { - throw new ArgumentNullException("action is a required property for SendListRequest and cannot be null"); - } - this.Action = action; - // to ensure "sections" is required (not null) - if (sections == null) - { - throw new ArgumentNullException("sections is a required property for SendListRequest and cannot be null"); - } - this.Sections = sections; - this.ChatId = chatId; - this.Phone = phone; - this.Header = header; - this.Footer = footer; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Main message text - /// - /// Main message text - /// Please choose option - [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] - public string Body { get; set; } - - /// - /// Header will be located above message text - /// - /// Header will be located above message text - /// Some options - [DataMember(Name = "header", EmitDefaultValue = false)] - public string Header { get; set; } - - /// - /// Footer will be placed under message text - /// - /// Footer will be placed under message text - /// Thank you - [DataMember(Name = "footer", EmitDefaultValue = false)] - public string Footer { get; set; } - - /// - /// Action for open list - /// - /// Action for open list - /// List - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] - public string Action { get; set; } - - /// - /// Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] - /// - /// Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] - /// [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - [DataMember(Name = "sections", IsRequired = true, EmitDefaultValue = true)] - public List Sections { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendListRequest {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append(" Header: ").Append(Header).Append("\n"); - sb.Append(" Footer: ").Append(Footer).Append("\n"); - sb.Append(" Action: ").Append(Action).Append("\n"); - sb.Append(" Sections: ").Append(Sections).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendListRequest); - } - - /// - /// Returns true if SendListRequest instances are equal - /// - /// Instance of SendListRequest to be compared - /// Boolean - public bool Equals(SendListRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.Header == input.Header || - (this.Header != null && - this.Header.Equals(input.Header)) - ) && - ( - this.Footer == input.Footer || - (this.Footer != null && - this.Footer.Equals(input.Footer)) - ) && - ( - this.Action == input.Action || - (this.Action != null && - this.Action.Equals(input.Action)) - ) && - ( - this.Sections == input.Sections || - this.Sections != null && - input.Sections != null && - this.Sections.SequenceEqual(input.Sections) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - if (this.Header != null) - { - hashCode = (hashCode * 59) + this.Header.GetHashCode(); - } - if (this.Footer != null) - { - hashCode = (hashCode * 59) + this.Footer.GetHashCode(); - } - if (this.Action != null) - { - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - } - if (this.Sections != null) - { - hashCode = (hashCode * 59) + this.Sections.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendListRequestAllOfRows.cs b/csharp/src/OneMessage.io/Model/SendListRequestAllOfRows.cs deleted file mode 100644 index ff99bbb..0000000 --- a/csharp/src/OneMessage.io/Model/SendListRequestAllOfRows.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendListRequestAllOfRows - /// - [DataContract(Name = "SendListRequest_allOf_rows")] - public partial class SendListRequestAllOfRows : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendListRequestAllOfRows() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique id for option, up to 200 symbols (required). - /// Title of option, up to 24 symbols. (required). - /// Description of option, up to 72 symbols. - public SendListRequestAllOfRows(string id = default(string), string title = default(string), string description = default(string)) - { - // to ensure "id" is required (not null) - if (id == null) - { - throw new ArgumentNullException("id is a required property for SendListRequestAllOfRows and cannot be null"); - } - this.Id = id; - // to ensure "title" is required (not null) - if (title == null) - { - throw new ArgumentNullException("title is a required property for SendListRequestAllOfRows and cannot be null"); - } - this.Title = title; - this.Description = description; - } - - /// - /// Unique id for option, up to 200 symbols - /// - /// Unique id for option, up to 200 symbols - /// 1 - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public string Id { get; set; } - - /// - /// Title of option, up to 24 symbols. - /// - /// Title of option, up to 24 symbols. - /// Some option - [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)] - public string Title { get; set; } - - /// - /// Description of option, up to 72 symbols - /// - /// Description of option, up to 72 symbols - /// Some description - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendListRequestAllOfRows {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendListRequestAllOfRows); - } - - /// - /// Returns true if SendListRequestAllOfRows instances are equal - /// - /// Instance of SendListRequestAllOfRows to be compared - /// Boolean - public bool Equals(SendListRequestAllOfRows input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendListRequestAllOfSections.cs b/csharp/src/OneMessage.io/Model/SendListRequestAllOfSections.cs deleted file mode 100644 index dfaa36d..0000000 --- a/csharp/src/OneMessage.io/Model/SendListRequestAllOfSections.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendListRequestAllOfSections - /// - [DataContract(Name = "SendListRequest_allOf_sections")] - public partial class SendListRequestAllOfSections : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendListRequestAllOfSections() { } - /// - /// Initializes a new instance of the class. - /// - /// Title of section, up to 24 symbols. Required if there are more then 1 section. - /// rows (required). - public SendListRequestAllOfSections(string title = default(string), List rows = default(List)) - { - // to ensure "rows" is required (not null) - if (rows == null) - { - throw new ArgumentNullException("rows is a required property for SendListRequestAllOfSections and cannot be null"); - } - this.Rows = rows; - this.Title = title; - } - - /// - /// Title of section, up to 24 symbols. Required if there are more then 1 section - /// - /// Title of section, up to 24 symbols. Required if there are more then 1 section - /// Some title - [DataMember(Name = "title", EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// Gets or Sets Rows - /// - [DataMember(Name = "rows", IsRequired = true, EmitDefaultValue = true)] - public List Rows { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendListRequestAllOfSections {\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Rows: ").Append(Rows).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendListRequestAllOfSections); - } - - /// - /// Returns true if SendListRequestAllOfSections instances are equal - /// - /// Instance of SendListRequestAllOfSections to be compared - /// Boolean - public bool Equals(SendListRequestAllOfSections input) - { - if (input == null) - { - return false; - } - return - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Rows == input.Rows || - this.Rows != null && - input.Rows != null && - this.Rows.SequenceEqual(input.Rows) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Rows != null) - { - hashCode = (hashCode * 59) + this.Rows.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendLocationRequest.cs b/csharp/src/OneMessage.io/Model/SendLocationRequest.cs deleted file mode 100644 index 28a6c23..0000000 --- a/csharp/src/OneMessage.io/Model/SendLocationRequest.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendLocationRequest - /// - [DataContract(Name = "SendLocationRequest")] - public partial class SendLocationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendLocationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// Latitude of the location. Example: 45.018337 (required). - /// Longitude of the location. Example: -73.968285 (required). - /// Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024. - /// Name of the location. Example: Facebook HQ. - public SendLocationRequest(string chatId = default(string), int phone = default(int), string lat = default(string), string lng = default(string), string address = default(string), string name = default(string)) - { - // to ensure "lat" is required (not null) - if (lat == null) - { - throw new ArgumentNullException("lat is a required property for SendLocationRequest and cannot be null"); - } - this.Lat = lat; - // to ensure "lng" is required (not null) - if (lng == null) - { - throw new ArgumentNullException("lng is a required property for SendLocationRequest and cannot be null"); - } - this.Lng = lng; - this.ChatId = chatId; - this.Phone = phone; - this.Address = address; - this.Name = name; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Latitude of the location. Example: 45.018337 - /// - /// Latitude of the location. Example: 45.018337 - /// 45.018337 - [DataMember(Name = "lat", IsRequired = true, EmitDefaultValue = true)] - public string Lat { get; set; } - - /// - /// Longitude of the location. Example: -73.968285 - /// - /// Longitude of the location. Example: -73.968285 - /// -73.968285 - [DataMember(Name = "lng", IsRequired = true, EmitDefaultValue = true)] - public string Lng { get; set; } - - /// - /// Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - /// - /// Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - /// 9766 Valley View St., New York, NY 10024 - [DataMember(Name = "address", EmitDefaultValue = false)] - public string Address { get; set; } - - /// - /// Name of the location. Example: Facebook HQ - /// - /// Name of the location. Example: Facebook HQ - /// Facebook HQ - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendLocationRequest {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Lat: ").Append(Lat).Append("\n"); - sb.Append(" Lng: ").Append(Lng).Append("\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendLocationRequest); - } - - /// - /// Returns true if SendLocationRequest instances are equal - /// - /// Instance of SendLocationRequest to be compared - /// Boolean - public bool Equals(SendLocationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Lat == input.Lat || - (this.Lat != null && - this.Lat.Equals(input.Lat)) - ) && - ( - this.Lng == input.Lng || - (this.Lng != null && - this.Lng.Equals(input.Lng)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Lat != null) - { - hashCode = (hashCode * 59) + this.Lat.GetHashCode(); - } - if (this.Lng != null) - { - hashCode = (hashCode * 59) + this.Lng.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendMessageRequest.cs b/csharp/src/OneMessage.io/Model/SendMessageRequest.cs deleted file mode 100644 index 02f19ae..0000000 --- a/csharp/src/OneMessage.io/Model/SendMessageRequest.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendMessageRequest - /// - [DataContract(Name = "SendMessageRequest")] - public partial class SendMessageRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendMessageRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 (required). - public SendMessageRequest(string chatId = default(string), int phone = default(int), string body = default(string)) - { - // to ensure "body" is required (not null) - if (body == null) - { - throw new ArgumentNullException("body is a required property for SendMessageRequest and cannot be null"); - } - this.Body = body; - this.ChatId = chatId; - this.Phone = phone; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - /// - /// Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] - public string Body { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendMessageRequest {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendMessageRequest); - } - - /// - /// Returns true if SendMessageRequest instances are equal - /// - /// Instance of SendMessageRequest to be compared - /// Boolean - public bool Equals(SendMessageRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendMessageStatus.cs b/csharp/src/OneMessage.io/Model/SendMessageStatus.cs deleted file mode 100644 index 552d7b7..0000000 --- a/csharp/src/OneMessage.io/Model/SendMessageStatus.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendMessageStatus - /// - [DataContract(Name = "SendMessageStatus")] - public partial class SendMessageStatus : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// sent. - /// unique message id. - /// Posting status message. - /// Result description. - public SendMessageStatus(bool sent = default(bool), string id = default(string), string message = default(string), string description = default(string)) - { - this.Sent = sent; - this.Id = id; - this.Message = message; - this.Description = description; - } - - /// - /// Gets or Sets Sent - /// - /// true - [DataMember(Name = "sent", EmitDefaultValue = true)] - public bool Sent { get; set; } - - /// - /// unique message id - /// - /// unique message id - /// gBGGeRhGZTEfAgkJCh2wAz4ZH-8 - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Posting status message - /// - /// Posting status message - /// Sent to 556123122026@c.us - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Result description - /// - /// Result description - /// Message has been sent to the provider - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendMessageStatus {\n"); - sb.Append(" Sent: ").Append(Sent).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendMessageStatus); - } - - /// - /// Returns true if SendMessageStatus instances are equal - /// - /// Instance of SendMessageStatus to be compared - /// Boolean - public bool Equals(SendMessageStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Sent == input.Sent || - this.Sent.Equals(input.Sent) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Sent.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendProductRequest.cs b/csharp/src/OneMessage.io/Model/SendProductRequest.cs deleted file mode 100644 index 023ddbb..0000000 --- a/csharp/src/OneMessage.io/Model/SendProductRequest.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendProductRequest - /// - [DataContract(Name = "SendProductRequest")] - public partial class SendProductRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendProductRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// action (required). - /// Text of message. Example: Some text.. - /// Located under the message text. Example: Footer.. - /// Header of catalog. Example: Header. **Required when sending the catalog.**. - public SendProductRequest(string chatId = default(string), int phone = default(int), SendProductRequestAllOfAction action = default(SendProductRequestAllOfAction), string body = default(string), string footer = default(string), string header = default(string)) - { - // to ensure "action" is required (not null) - if (action == null) - { - throw new ArgumentNullException("action is a required property for SendProductRequest and cannot be null"); - } - this.Action = action; - this.ChatId = chatId; - this.Phone = phone; - this.Body = body; - this.Footer = footer; - this.Header = header; - } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Gets or Sets Action - /// - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] - public SendProductRequestAllOfAction Action { get; set; } - - /// - /// Text of message. Example: Some text. - /// - /// Text of message. Example: Some text. - /// Some text - [DataMember(Name = "body", EmitDefaultValue = false)] - public string Body { get; set; } - - /// - /// Located under the message text. Example: Footer. - /// - /// Located under the message text. Example: Footer. - /// Footer - [DataMember(Name = "footer", EmitDefaultValue = false)] - public string Footer { get; set; } - - /// - /// Header of catalog. Example: Header. **Required when sending the catalog.** - /// - /// Header of catalog. Example: Header. **Required when sending the catalog.** - /// Header - [DataMember(Name = "header", EmitDefaultValue = false)] - public string Header { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendProductRequest {\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Action: ").Append(Action).Append("\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append(" Footer: ").Append(Footer).Append("\n"); - sb.Append(" Header: ").Append(Header).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendProductRequest); - } - - /// - /// Returns true if SendProductRequest instances are equal - /// - /// Instance of SendProductRequest to be compared - /// Boolean - public bool Equals(SendProductRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Action == input.Action || - (this.Action != null && - this.Action.Equals(input.Action)) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.Footer == input.Footer || - (this.Footer != null && - this.Footer.Equals(input.Footer)) - ) && - ( - this.Header == input.Header || - (this.Header != null && - this.Header.Equals(input.Header)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Action != null) - { - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - } - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - if (this.Footer != null) - { - hashCode = (hashCode * 59) + this.Footer.GetHashCode(); - } - if (this.Header != null) - { - hashCode = (hashCode * 59) + this.Header.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendProductRequestAllOfAction.cs b/csharp/src/OneMessage.io/Model/SendProductRequestAllOfAction.cs deleted file mode 100644 index 380f6e3..0000000 --- a/csharp/src/OneMessage.io/Model/SendProductRequestAllOfAction.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - /// - [DataContract(Name = "SendProductRequest_allOf_action")] - public partial class SendProductRequestAllOfAction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id of the catalog. - /// id of the product. - /// sections. - public SendProductRequestAllOfAction(string catalogId = default(string), string productRetailerId = default(string), List sections = default(List)) - { - this.CatalogId = catalogId; - this.ProductRetailerId = productRetailerId; - this.Sections = sections; - } - - /// - /// id of the catalog - /// - /// id of the catalog - /// 407921857496983 - [DataMember(Name = "catalog_id", EmitDefaultValue = false)] - public string CatalogId { get; set; } - - /// - /// id of the product - /// - /// id of the product - /// product-1 - [DataMember(Name = "product_retailer_id", EmitDefaultValue = false)] - public string ProductRetailerId { get; set; } - - /// - /// Gets or Sets Sections - /// - [DataMember(Name = "sections", EmitDefaultValue = false)] - public List Sections { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendProductRequestAllOfAction {\n"); - sb.Append(" CatalogId: ").Append(CatalogId).Append("\n"); - sb.Append(" ProductRetailerId: ").Append(ProductRetailerId).Append("\n"); - sb.Append(" Sections: ").Append(Sections).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendProductRequestAllOfAction); - } - - /// - /// Returns true if SendProductRequestAllOfAction instances are equal - /// - /// Instance of SendProductRequestAllOfAction to be compared - /// Boolean - public bool Equals(SendProductRequestAllOfAction input) - { - if (input == null) - { - return false; - } - return - ( - this.CatalogId == input.CatalogId || - (this.CatalogId != null && - this.CatalogId.Equals(input.CatalogId)) - ) && - ( - this.ProductRetailerId == input.ProductRetailerId || - (this.ProductRetailerId != null && - this.ProductRetailerId.Equals(input.ProductRetailerId)) - ) && - ( - this.Sections == input.Sections || - this.Sections != null && - input.Sections != null && - this.Sections.SequenceEqual(input.Sections) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CatalogId != null) - { - hashCode = (hashCode * 59) + this.CatalogId.GetHashCode(); - } - if (this.ProductRetailerId != null) - { - hashCode = (hashCode * 59) + this.ProductRetailerId.GetHashCode(); - } - if (this.Sections != null) - { - hashCode = (hashCode * 59) + this.Sections.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionProductItems.cs b/csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionProductItems.cs deleted file mode 100644 index 7d7143c..0000000 --- a/csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionProductItems.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendProductRequestAllOfActionProductItems - /// - [DataContract(Name = "SendProductRequest_allOf_action_product_items")] - public partial class SendProductRequestAllOfActionProductItems : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id of the product. - public SendProductRequestAllOfActionProductItems(string productRetailerId = default(string)) - { - this.ProductRetailerId = productRetailerId; - } - - /// - /// id of the product - /// - /// id of the product - /// product-1 - [DataMember(Name = "product_retailer_id", EmitDefaultValue = false)] - public string ProductRetailerId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendProductRequestAllOfActionProductItems {\n"); - sb.Append(" ProductRetailerId: ").Append(ProductRetailerId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendProductRequestAllOfActionProductItems); - } - - /// - /// Returns true if SendProductRequestAllOfActionProductItems instances are equal - /// - /// Instance of SendProductRequestAllOfActionProductItems to be compared - /// Boolean - public bool Equals(SendProductRequestAllOfActionProductItems input) - { - if (input == null) - { - return false; - } - return - ( - this.ProductRetailerId == input.ProductRetailerId || - (this.ProductRetailerId != null && - this.ProductRetailerId.Equals(input.ProductRetailerId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ProductRetailerId != null) - { - hashCode = (hashCode * 59) + this.ProductRetailerId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionSections.cs b/csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionSections.cs deleted file mode 100644 index fc644fa..0000000 --- a/csharp/src/OneMessage.io/Model/SendProductRequestAllOfActionSections.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendProductRequestAllOfActionSections - /// - [DataContract(Name = "SendProductRequest_allOf_action_sections")] - public partial class SendProductRequestAllOfActionSections : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Title of the section. Example: the-section-title. - /// productItems. - public SendProductRequestAllOfActionSections(string title = default(string), List productItems = default(List)) - { - this.Title = title; - this.ProductItems = productItems; - } - - /// - /// Title of the section. Example: the-section-title - /// - /// Title of the section. Example: the-section-title - /// the-section-title - [DataMember(Name = "title", EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// Gets or Sets ProductItems - /// - [DataMember(Name = "product_items", EmitDefaultValue = false)] - public List ProductItems { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendProductRequestAllOfActionSections {\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" ProductItems: ").Append(ProductItems).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendProductRequestAllOfActionSections); - } - - /// - /// Returns true if SendProductRequestAllOfActionSections instances are equal - /// - /// Instance of SendProductRequestAllOfActionSections to be compared - /// Boolean - public bool Equals(SendProductRequestAllOfActionSections input) - { - if (input == null) - { - return false; - } - return - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.ProductItems == input.ProductItems || - this.ProductItems != null && - input.ProductItems != null && - this.ProductItems.SequenceEqual(input.ProductItems) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.ProductItems != null) - { - hashCode = (hashCode * 59) + this.ProductItems.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequest.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequest.cs deleted file mode 100644 index e0298bd..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequest.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendTemplateRequest - /// - [DataContract(Name = "SendTemplateRequest")] - public partial class SendTemplateRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendTemplateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Can be found by method /templates (required). - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.. - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.. - /// Name of template (required). - /// language (required). - /// Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template**. - public SendTemplateRequest(string varNamespace = default(string), string chatId = default(string), int phone = default(int), string template = default(string), SendTemplateRequestAllOfLanguage language = default(SendTemplateRequestAllOfLanguage), List varParams = default(List)) - { - // to ensure "varNamespace" is required (not null) - if (varNamespace == null) - { - throw new ArgumentNullException("varNamespace is a required property for SendTemplateRequest and cannot be null"); - } - this.VarNamespace = varNamespace; - // to ensure "template" is required (not null) - if (template == null) - { - throw new ArgumentNullException("template is a required property for SendTemplateRequest and cannot be null"); - } - this.Template = template; - // to ensure "language" is required (not null) - if (language == null) - { - throw new ArgumentNullException("language is a required property for SendTemplateRequest and cannot be null"); - } - this.Language = language; - this.ChatId = chatId; - this.Phone = phone; - this.VarParams = varParams; - } - - /// - /// Can be found by method /templates - /// - /// Can be found by method /templates - /// ca300906_cfbc_410b_99fb_dcee1t39d578 - [DataMember(Name = "namespace", IsRequired = true, EmitDefaultValue = true)] - public string VarNamespace { get; set; } - - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// - /// **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - /// 12020721369@c.us - [DataMember(Name = "chatId", EmitDefaultValue = false)] - public string ChatId { get; set; } - - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// - /// **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public int Phone { get; set; } - - /// - /// Name of template - /// - /// Name of template - /// start - [DataMember(Name = "template", IsRequired = true, EmitDefaultValue = true)] - public string Template { get; set; } - - /// - /// Gets or Sets Language - /// - [DataMember(Name = "language", IsRequired = true, EmitDefaultValue = true)] - public SendTemplateRequestAllOfLanguage Language { get; set; } - - /// - /// Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** - /// - /// Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** - [DataMember(Name = "params", EmitDefaultValue = false)] - public List VarParams { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequest {\n"); - sb.Append(" VarNamespace: ").Append(VarNamespace).Append("\n"); - sb.Append(" ChatId: ").Append(ChatId).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Template: ").Append(Template).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" VarParams: ").Append(VarParams).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequest); - } - - /// - /// Returns true if SendTemplateRequest instances are equal - /// - /// Instance of SendTemplateRequest to be compared - /// Boolean - public bool Equals(SendTemplateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.VarNamespace == input.VarNamespace || - (this.VarNamespace != null && - this.VarNamespace.Equals(input.VarNamespace)) - ) && - ( - this.ChatId == input.ChatId || - (this.ChatId != null && - this.ChatId.Equals(input.ChatId)) - ) && - ( - this.Phone == input.Phone || - this.Phone.Equals(input.Phone) - ) && - ( - this.Template == input.Template || - (this.Template != null && - this.Template.Equals(input.Template)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.VarParams == input.VarParams || - this.VarParams != null && - input.VarParams != null && - this.VarParams.SequenceEqual(input.VarParams) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarNamespace != null) - { - hashCode = (hashCode * 59) + this.VarNamespace.GetHashCode(); - } - if (this.ChatId != null) - { - hashCode = (hashCode * 59) + this.ChatId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - if (this.Template != null) - { - hashCode = (hashCode * 59) + this.Template.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.VarParams != null) - { - hashCode = (hashCode * 59) + this.VarParams.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfCurrency.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfCurrency.cs deleted file mode 100644 index 52b0325..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfCurrency.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendTemplateRequestAllOfCurrency - /// - [DataContract(Name = "SendTemplateRequest_allOf_currency")] - public partial class SendTemplateRequestAllOfCurrency : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// currencyCode. - /// amount1000. - public SendTemplateRequestAllOfCurrency(string currencyCode = default(string), int amount1000 = default(int)) - { - this.CurrencyCode = currencyCode; - this.Amount1000 = amount1000; - } - - /// - /// Gets or Sets CurrencyCode - /// - /// USD - [DataMember(Name = "currency_code", EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// Gets or Sets Amount1000 - /// - /// 100990 - [DataMember(Name = "amount_1000", EmitDefaultValue = false)] - public int Amount1000 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequestAllOfCurrency {\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" Amount1000: ").Append(Amount1000).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequestAllOfCurrency); - } - - /// - /// Returns true if SendTemplateRequestAllOfCurrency instances are equal - /// - /// Instance of SendTemplateRequestAllOfCurrency to be compared - /// Boolean - public bool Equals(SendTemplateRequestAllOfCurrency input) - { - if (input == null) - { - return false; - } - return - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.Amount1000 == input.Amount1000 || - this.Amount1000.Equals(input.Amount1000) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Amount1000.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTime.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTime.cs deleted file mode 100644 index d2b8b44..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTime.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendTemplateRequestAllOfDateTime - /// - [DataContract(Name = "SendTemplateRequest_allOf_date_time")] - public partial class SendTemplateRequestAllOfDateTime : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// component. - /// unixEpoch. - public SendTemplateRequestAllOfDateTime(SendTemplateRequestAllOfDateTimeComponent component = default(SendTemplateRequestAllOfDateTimeComponent), SendTemplateRequestAllOfDateTimeUnixEpoch unixEpoch = default(SendTemplateRequestAllOfDateTimeUnixEpoch)) - { - this.Component = component; - this.UnixEpoch = unixEpoch; - } - - /// - /// Gets or Sets Component - /// - [DataMember(Name = "component", EmitDefaultValue = false)] - public SendTemplateRequestAllOfDateTimeComponent Component { get; set; } - - /// - /// Gets or Sets UnixEpoch - /// - [DataMember(Name = "unix_epoch", EmitDefaultValue = false)] - public SendTemplateRequestAllOfDateTimeUnixEpoch UnixEpoch { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequestAllOfDateTime {\n"); - sb.Append(" Component: ").Append(Component).Append("\n"); - sb.Append(" UnixEpoch: ").Append(UnixEpoch).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequestAllOfDateTime); - } - - /// - /// Returns true if SendTemplateRequestAllOfDateTime instances are equal - /// - /// Instance of SendTemplateRequestAllOfDateTime to be compared - /// Boolean - public bool Equals(SendTemplateRequestAllOfDateTime input) - { - if (input == null) - { - return false; - } - return - ( - this.Component == input.Component || - (this.Component != null && - this.Component.Equals(input.Component)) - ) && - ( - this.UnixEpoch == input.UnixEpoch || - (this.UnixEpoch != null && - this.UnixEpoch.Equals(input.UnixEpoch)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Component != null) - { - hashCode = (hashCode * 59) + this.Component.GetHashCode(); - } - if (this.UnixEpoch != null) - { - hashCode = (hashCode * 59) + this.UnixEpoch.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeComponent.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeComponent.cs deleted file mode 100644 index 8ddf91d..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeComponent.cs +++ /dev/null @@ -1,326 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendTemplateRequestAllOfDateTimeComponent - /// - [DataContract(Name = "SendTemplateRequest_allOf_date_time_component")] - public partial class SendTemplateRequestAllOfDateTimeComponent : IEquatable, IValidatableObject - { - /// - /// Defines DayOfWeek - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DayOfWeekEnum - { - /// - /// Enum MONDAY for value: MONDAY - /// - [EnumMember(Value = "MONDAY")] - MONDAY = 1, - - /// - /// Enum TUESDAY for value: TUESDAY - /// - [EnumMember(Value = "TUESDAY")] - TUESDAY = 2, - - /// - /// Enum WEDNESDAY for value: WEDNESDAY - /// - [EnumMember(Value = "WEDNESDAY")] - WEDNESDAY = 3, - - /// - /// Enum THURSDAY for value: THURSDAY - /// - [EnumMember(Value = "THURSDAY")] - THURSDAY = 4, - - /// - /// Enum FRIDAY for value: FRIDAY - /// - [EnumMember(Value = "FRIDAY")] - FRIDAY = 5, - - /// - /// Enum SATURDAY for value: SATURDAY - /// - [EnumMember(Value = "SATURDAY")] - SATURDAY = 6, - - /// - /// Enum SUNDAY for value: SUNDAY - /// - [EnumMember(Value = "SUNDAY")] - SUNDAY = 7, - - /// - /// Enum _1 for value: 1 - /// - [EnumMember(Value = "1")] - _1 = 8, - - /// - /// Enum _2 for value: 2 - /// - [EnumMember(Value = "2")] - _2 = 9, - - /// - /// Enum _3 for value: 3 - /// - [EnumMember(Value = "3")] - _3 = 10, - - /// - /// Enum _4 for value: 4 - /// - [EnumMember(Value = "4")] - _4 = 11, - - /// - /// Enum _5 for value: 5 - /// - [EnumMember(Value = "5")] - _5 = 12, - - /// - /// Enum _6 for value: 6 - /// - [EnumMember(Value = "6")] - _6 = 13, - - /// - /// Enum _7 for value: 7 - /// - [EnumMember(Value = "7")] - _7 = 14 - } - - - /// - /// Gets or Sets DayOfWeek - /// - /// FRIDAY - [DataMember(Name = "day_of_week", EmitDefaultValue = false)] - public DayOfWeekEnum? DayOfWeek { get; set; } - /// - /// Defines Calendar - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CalendarEnum - { - /// - /// Enum GREGORIAN for value: GREGORIAN - /// - [EnumMember(Value = "GREGORIAN")] - GREGORIAN = 1, - - /// - /// Enum SOLARHIJRI for value: SOLAR_HIJRI - /// - [EnumMember(Value = "SOLAR_HIJRI")] - SOLARHIJRI = 2 - } - - - /// - /// Gets or Sets Calendar - /// - /// GREGORIAN - [DataMember(Name = "calendar", EmitDefaultValue = false)] - public CalendarEnum? Calendar { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// dayOfWeek. - /// year. - /// month. - /// dayOfMonth. - /// hour. - /// minute. - /// calendar. - public SendTemplateRequestAllOfDateTimeComponent(DayOfWeekEnum? dayOfWeek = default(DayOfWeekEnum?), int year = default(int), int month = default(int), int dayOfMonth = default(int), int hour = default(int), int minute = default(int), CalendarEnum? calendar = default(CalendarEnum?)) - { - this.DayOfWeek = dayOfWeek; - this.Year = year; - this.Month = month; - this.DayOfMonth = dayOfMonth; - this.Hour = hour; - this.Minute = minute; - this.Calendar = calendar; - } - - /// - /// Gets or Sets Year - /// - /// 2001 - [DataMember(Name = "year", EmitDefaultValue = false)] - public int Year { get; set; } - - /// - /// Gets or Sets Month - /// - /// 4 - [DataMember(Name = "month", EmitDefaultValue = false)] - public int Month { get; set; } - - /// - /// Gets or Sets DayOfMonth - /// - /// 13 - [DataMember(Name = "day_of_month", EmitDefaultValue = false)] - public int DayOfMonth { get; set; } - - /// - /// Gets or Sets Hour - /// - /// 17 - [DataMember(Name = "hour", EmitDefaultValue = false)] - public int Hour { get; set; } - - /// - /// Gets or Sets Minute - /// - /// 20 - [DataMember(Name = "minute", EmitDefaultValue = false)] - public int Minute { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequestAllOfDateTimeComponent {\n"); - sb.Append(" DayOfWeek: ").Append(DayOfWeek).Append("\n"); - sb.Append(" Year: ").Append(Year).Append("\n"); - sb.Append(" Month: ").Append(Month).Append("\n"); - sb.Append(" DayOfMonth: ").Append(DayOfMonth).Append("\n"); - sb.Append(" Hour: ").Append(Hour).Append("\n"); - sb.Append(" Minute: ").Append(Minute).Append("\n"); - sb.Append(" Calendar: ").Append(Calendar).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequestAllOfDateTimeComponent); - } - - /// - /// Returns true if SendTemplateRequestAllOfDateTimeComponent instances are equal - /// - /// Instance of SendTemplateRequestAllOfDateTimeComponent to be compared - /// Boolean - public bool Equals(SendTemplateRequestAllOfDateTimeComponent input) - { - if (input == null) - { - return false; - } - return - ( - this.DayOfWeek == input.DayOfWeek || - this.DayOfWeek.Equals(input.DayOfWeek) - ) && - ( - this.Year == input.Year || - this.Year.Equals(input.Year) - ) && - ( - this.Month == input.Month || - this.Month.Equals(input.Month) - ) && - ( - this.DayOfMonth == input.DayOfMonth || - this.DayOfMonth.Equals(input.DayOfMonth) - ) && - ( - this.Hour == input.Hour || - this.Hour.Equals(input.Hour) - ) && - ( - this.Minute == input.Minute || - this.Minute.Equals(input.Minute) - ) && - ( - this.Calendar == input.Calendar || - this.Calendar.Equals(input.Calendar) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.DayOfWeek.GetHashCode(); - hashCode = (hashCode * 59) + this.Year.GetHashCode(); - hashCode = (hashCode * 59) + this.Month.GetHashCode(); - hashCode = (hashCode * 59) + this.DayOfMonth.GetHashCode(); - hashCode = (hashCode * 59) + this.Hour.GetHashCode(); - hashCode = (hashCode * 59) + this.Minute.GetHashCode(); - hashCode = (hashCode * 59) + this.Calendar.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeUnixEpoch.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeUnixEpoch.cs deleted file mode 100644 index a394fa6..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfDateTimeUnixEpoch.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendTemplateRequestAllOfDateTimeUnixEpoch - /// - [DataContract(Name = "SendTemplateRequest_allOf_date_time_unix_epoch")] - public partial class SendTemplateRequestAllOfDateTimeUnixEpoch : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// timestamp. - public SendTemplateRequestAllOfDateTimeUnixEpoch(int timestamp = default(int)) - { - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Timestamp - /// - /// 987168000 - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public int Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequestAllOfDateTimeUnixEpoch {\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequestAllOfDateTimeUnixEpoch); - } - - /// - /// Returns true if SendTemplateRequestAllOfDateTimeUnixEpoch instances are equal - /// - /// Instance of SendTemplateRequestAllOfDateTimeUnixEpoch to be compared - /// Boolean - public bool Equals(SendTemplateRequestAllOfDateTimeUnixEpoch input) - { - if (input == null) - { - return false; - } - return - ( - this.Timestamp == input.Timestamp || - this.Timestamp.Equals(input.Timestamp) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfLanguage.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfLanguage.cs deleted file mode 100644 index 7f53d29..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfLanguage.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - /// - [DataContract(Name = "SendTemplateRequest_allOf_language")] - public partial class SendTemplateRequestAllOfLanguage : IEquatable, IValidatableObject - { - /// - /// Defines Policy - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PolicyEnum - { - /// - /// Enum Deterministic for value: deterministic - /// - [EnumMember(Value = "deterministic")] - Deterministic = 1 - } - - - /// - /// Gets or Sets Policy - /// - /// deterministic - [DataMember(Name = "policy", EmitDefaultValue = false)] - public PolicyEnum? Policy { get; set; } - - /// - /// Gets or Sets Code - /// - [DataMember(Name = "code", EmitDefaultValue = false)] - public TemplateLanguageProp? Code { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// policy. - /// code. - public SendTemplateRequestAllOfLanguage(PolicyEnum? policy = default(PolicyEnum?), TemplateLanguageProp? code = default(TemplateLanguageProp?)) - { - this.Policy = policy; - this.Code = code; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequestAllOfLanguage {\n"); - sb.Append(" Policy: ").Append(Policy).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequestAllOfLanguage); - } - - /// - /// Returns true if SendTemplateRequestAllOfLanguage instances are equal - /// - /// Instance of SendTemplateRequestAllOfLanguage to be compared - /// Boolean - public bool Equals(SendTemplateRequestAllOfLanguage input) - { - if (input == null) - { - return false; - } - return - ( - this.Policy == input.Policy || - this.Policy.Equals(input.Policy) - ) && - ( - this.Code == input.Code || - this.Code.Equals(input.Code) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Policy.GetHashCode(); - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfParams.cs b/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfParams.cs deleted file mode 100644 index c16e2dd..0000000 --- a/csharp/src/OneMessage.io/Model/SendTemplateRequestAllOfParams.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SendTemplateRequestAllOfParams - /// - [DataContract(Name = "SendTemplateRequest_allOf_params")] - public partial class SendTemplateRequestAllOfParams : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varDefault. - /// currency. - /// dateTime. - public SendTemplateRequestAllOfParams(string varDefault = default(string), SendTemplateRequestAllOfCurrency currency = default(SendTemplateRequestAllOfCurrency), SendTemplateRequestAllOfDateTime dateTime = default(SendTemplateRequestAllOfDateTime)) - { - this.VarDefault = varDefault; - this.Currency = currency; - this.DateTime = dateTime; - } - - /// - /// Gets or Sets VarDefault - /// - /// Some title - [DataMember(Name = "default", EmitDefaultValue = false)] - public string VarDefault { get; set; } - - /// - /// Gets or Sets Currency - /// - [DataMember(Name = "currency", EmitDefaultValue = false)] - public SendTemplateRequestAllOfCurrency Currency { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name = "date_time", EmitDefaultValue = false)] - public SendTemplateRequestAllOfDateTime DateTime { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendTemplateRequestAllOfParams {\n"); - sb.Append(" VarDefault: ").Append(VarDefault).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendTemplateRequestAllOfParams); - } - - /// - /// Returns true if SendTemplateRequestAllOfParams instances are equal - /// - /// Instance of SendTemplateRequestAllOfParams to be compared - /// Boolean - public bool Equals(SendTemplateRequestAllOfParams input) - { - if (input == null) - { - return false; - } - return - ( - this.VarDefault == input.VarDefault || - (this.VarDefault != null && - this.VarDefault.Equals(input.VarDefault)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarDefault != null) - { - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SetCommerce.cs b/csharp/src/OneMessage.io/Model/SetCommerce.cs deleted file mode 100644 index bed7fda..0000000 --- a/csharp/src/OneMessage.io/Model/SetCommerce.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SetCommerce - /// - [DataContract(Name = "SetCommerce")] - public partial class SetCommerce : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// success. - public SetCommerce(bool success = default(bool)) - { - this.Success = success; - } - - /// - /// Gets or Sets Success - /// - /// true - [DataMember(Name = "success", EmitDefaultValue = true)] - public bool Success { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetCommerce {\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetCommerce); - } - - /// - /// Returns true if SetCommerce instances are equal - /// - /// Instance of SetCommerce to be compared - /// Boolean - public bool Equals(SetCommerce input) - { - if (input == null) - { - return false; - } - return - ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SetMe.cs b/csharp/src/OneMessage.io/Model/SetMe.cs deleted file mode 100644 index 71150f7..0000000 --- a/csharp/src/OneMessage.io/Model/SetMe.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SetMe - /// - [DataContract(Name = "SetMe")] - public partial class SetMe : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// result. - public SetMe(string result = default(string)) - { - this.Result = result; - } - - /// - /// Gets or Sets Result - /// - /// success - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetMe {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetMe); - } - - /// - /// Returns true if SetMe instances are equal - /// - /// Instance of SetMe to be compared - /// Boolean - public bool Equals(SetMe input) - { - if (input == null) - { - return false; - } - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SetMeRequest.cs b/csharp/src/OneMessage.io/Model/SetMeRequest.cs deleted file mode 100644 index befb032..0000000 --- a/csharp/src/OneMessage.io/Model/SetMeRequest.cs +++ /dev/null @@ -1,362 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SetMeRequest - /// - [DataContract(Name = "SetMeRequest")] - public partial class SetMeRequest : IEquatable, IValidatableObject - { - /// - /// Industry of the business - /// - /// Industry of the business - [JsonConverter(typeof(StringEnumConverter))] - public enum VerticalEnum - { - /// - /// Enum Automotive for value: Automotive - /// - [EnumMember(Value = "Automotive")] - Automotive = 1, - - /// - /// Enum BeautySpaAndSalon for value: Beauty, Spa and Salon - /// - [EnumMember(Value = "Beauty, Spa and Salon")] - BeautySpaAndSalon = 2, - - /// - /// Enum ClothingAndApparel for value: Clothing and Apparel - /// - [EnumMember(Value = "Clothing and Apparel")] - ClothingAndApparel = 3, - - /// - /// Enum Education for value: Education - /// - [EnumMember(Value = "Education")] - Education = 4, - - /// - /// Enum Entertainment for value: Entertainment - /// - [EnumMember(Value = "Entertainment")] - Entertainment = 5, - - /// - /// Enum EventPlanningAndService for value: Event Planning and Service - /// - [EnumMember(Value = "Event Planning and Service")] - EventPlanningAndService = 6, - - /// - /// Enum FinanceAndBanking for value: Finance and Banking - /// - [EnumMember(Value = "Finance and Banking")] - FinanceAndBanking = 7, - - /// - /// Enum FoodAndGrocery for value: Food and Grocery - /// - [EnumMember(Value = "Food and Grocery")] - FoodAndGrocery = 8, - - /// - /// Enum PublicService for value: Public Service - /// - [EnumMember(Value = "Public Service")] - PublicService = 9, - - /// - /// Enum HotelAndLodging for value: Hotel and Lodging - /// - [EnumMember(Value = "Hotel and Lodging")] - HotelAndLodging = 10, - - /// - /// Enum MedicalAndHealth for value: Medical and Health - /// - [EnumMember(Value = "Medical and Health")] - MedicalAndHealth = 11, - - /// - /// Enum NonProfit for value: Non-profit - /// - [EnumMember(Value = "Non-profit")] - NonProfit = 12, - - /// - /// Enum ProfessionalServices for value: Professional Services - /// - [EnumMember(Value = "Professional Services")] - ProfessionalServices = 13, - - /// - /// Enum ShoppingAndRetail for value: Shopping and Retail - /// - [EnumMember(Value = "Shopping and Retail")] - ShoppingAndRetail = 14, - - /// - /// Enum TravelAndTransportation for value: Travel and Transportation - /// - [EnumMember(Value = "Travel and Transportation")] - TravelAndTransportation = 15, - - /// - /// Enum Restaurant for value: Restaurant - /// - [EnumMember(Value = "Restaurant")] - Restaurant = 16, - - /// - /// Enum Other for value: Other - /// - [EnumMember(Value = "Other")] - Other = 17, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 18 - } - - - /// - /// Industry of the business - /// - /// Industry of the business - /// Other - [DataMember(Name = "vertical", EmitDefaultValue = false)] - public VerticalEnum? Vertical { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Profile`s About section.. - /// Address of the business. - /// Description of the business. Max 256 characters. - /// Business email. - /// Linked phone number. - /// Industry of the business. - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field. - public SetMeRequest(string about = default(string), string address = default(string), string description = default(string), string email = default(string), string phone = default(string), VerticalEnum? vertical = default(VerticalEnum?), string photo = default(string)) - { - this.About = about; - this.Address = address; - this.Description = description; - this.Email = email; - this.Phone = phone; - this.Vertical = vertical; - this.Photo = photo; - } - - /// - /// Profile`s About section. - /// - /// Profile`s About section. - /// Some about info - [DataMember(Name = "about", EmitDefaultValue = false)] - public string About { get; set; } - - /// - /// Address of the business - /// - /// Address of the business - /// Neverland, Unexpected st. - [DataMember(Name = "address", EmitDefaultValue = false)] - public string Address { get; set; } - - /// - /// Description of the business. Max 256 characters - /// - /// Description of the business. Max 256 characters - /// Some company description - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Business email - /// - /// Business email - /// john@neverland.play - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Linked phone number - /// - /// Linked phone number - /// 12020721369 - [DataMember(Name = "phone", EmitDefaultValue = false)] - public string Phone { get; set; } - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - [DataMember(Name = "photo", EmitDefaultValue = false)] - public string Photo { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetMeRequest {\n"); - sb.Append(" About: ").Append(About).Append("\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" Vertical: ").Append(Vertical).Append("\n"); - sb.Append(" Photo: ").Append(Photo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetMeRequest); - } - - /// - /// Returns true if SetMeRequest instances are equal - /// - /// Instance of SetMeRequest to be compared - /// Boolean - public bool Equals(SetMeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.About == input.About || - (this.About != null && - this.About.Equals(input.About)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Vertical == input.Vertical || - this.Vertical.Equals(input.Vertical) - ) && - ( - this.Photo == input.Photo || - (this.Photo != null && - this.Photo.Equals(input.Photo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.About != null) - { - hashCode = (hashCode * 59) + this.About.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Vertical.GetHashCode(); - if (this.Photo != null) - { - hashCode = (hashCode * 59) + this.Photo.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SetSettings200Response.cs b/csharp/src/OneMessage.io/Model/SetSettings200Response.cs deleted file mode 100644 index c2d42dc..0000000 --- a/csharp/src/OneMessage.io/Model/SetSettings200Response.cs +++ /dev/null @@ -1,158 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SetSettings200Response - /// - [DataContract(Name = "setSettings_200_response")] - public partial class SetSettings200Response : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SetSettings200Response() { } - /// - /// Initializes a new instance of the class. - /// - /// webhookUrl. - /// update (required). - public SetSettings200Response(string webhookUrl = default(string), SetSettings200ResponseAllOfUpdate update = default(SetSettings200ResponseAllOfUpdate)) - { - // to ensure "update" is required (not null) - if (update == null) - { - throw new ArgumentNullException("update is a required property for SetSettings200Response and cannot be null"); - } - this.Update = update; - this.WebhookUrl = webhookUrl; - } - - /// - /// Gets or Sets WebhookUrl - /// - /// https://bin.1msg.io/1f9aj261 - [DataMember(Name = "webhookUrl", EmitDefaultValue = true)] - public string WebhookUrl { get; set; } - - /// - /// Gets or Sets Update - /// - [DataMember(Name = "update", IsRequired = true, EmitDefaultValue = true)] - public SetSettings200ResponseAllOfUpdate Update { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetSettings200Response {\n"); - sb.Append(" WebhookUrl: ").Append(WebhookUrl).Append("\n"); - sb.Append(" Update: ").Append(Update).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetSettings200Response); - } - - /// - /// Returns true if SetSettings200Response instances are equal - /// - /// Instance of SetSettings200Response to be compared - /// Boolean - public bool Equals(SetSettings200Response input) - { - if (input == null) - { - return false; - } - return - ( - this.WebhookUrl == input.WebhookUrl || - (this.WebhookUrl != null && - this.WebhookUrl.Equals(input.WebhookUrl)) - ) && - ( - this.Update == input.Update || - (this.Update != null && - this.Update.Equals(input.Update)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WebhookUrl != null) - { - hashCode = (hashCode * 59) + this.WebhookUrl.GetHashCode(); - } - if (this.Update != null) - { - hashCode = (hashCode * 59) + this.Update.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SetSettings200ResponseAllOfUpdate.cs b/csharp/src/OneMessage.io/Model/SetSettings200ResponseAllOfUpdate.cs deleted file mode 100644 index 18a0edd..0000000 --- a/csharp/src/OneMessage.io/Model/SetSettings200ResponseAllOfUpdate.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SetSettings200ResponseAllOfUpdate - /// - [DataContract(Name = "setSettings_200_response_allOf_update")] - public partial class SetSettings200ResponseAllOfUpdate : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// webhookUrl. - public SetSettings200ResponseAllOfUpdate(string webhookUrl = default(string)) - { - this.WebhookUrl = webhookUrl; - } - - /// - /// Gets or Sets WebhookUrl - /// - /// https://bin.1msg.io/1f9aj261 - [DataMember(Name = "webhookUrl", EmitDefaultValue = true)] - public string WebhookUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetSettings200ResponseAllOfUpdate {\n"); - sb.Append(" WebhookUrl: ").Append(WebhookUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetSettings200ResponseAllOfUpdate); - } - - /// - /// Returns true if SetSettings200ResponseAllOfUpdate instances are equal - /// - /// Instance of SetSettings200ResponseAllOfUpdate to be compared - /// Boolean - public bool Equals(SetSettings200ResponseAllOfUpdate input) - { - if (input == null) - { - return false; - } - return - ( - this.WebhookUrl == input.WebhookUrl || - (this.WebhookUrl != null && - this.WebhookUrl.Equals(input.WebhookUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WebhookUrl != null) - { - hashCode = (hashCode * 59) + this.WebhookUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/SetWebhookStatus.cs b/csharp/src/OneMessage.io/Model/SetWebhookStatus.cs deleted file mode 100644 index 7b60abc..0000000 --- a/csharp/src/OneMessage.io/Model/SetWebhookStatus.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// SetWebhookStatus - /// - [DataContract(Name = "SetWebhookStatus")] - public partial class SetWebhookStatus : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Flag indicating that the current request has changed webhook. - /// message. - public SetWebhookStatus(bool set = default(bool), string message = default(string)) - { - this.Set = set; - this.Message = message; - } - - /// - /// Flag indicating that the current request has changed webhook - /// - /// Flag indicating that the current request has changed webhook - /// true - [DataMember(Name = "set", EmitDefaultValue = true)] - public bool Set { get; set; } - - /// - /// Gets or Sets Message - /// - /// https://bin.1msg.io/1f9aj261 - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetWebhookStatus {\n"); - sb.Append(" Set: ").Append(Set).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetWebhookStatus); - } - - /// - /// Returns true if SetWebhookStatus instances are equal - /// - /// Instance of SetWebhookStatus to be compared - /// Boolean - public bool Equals(SetWebhookStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Set == input.Set || - this.Set.Equals(input.Set) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Set.GetHashCode(); - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/Settings.cs b/csharp/src/OneMessage.io/Model/Settings.cs deleted file mode 100644 index f81545f..0000000 --- a/csharp/src/OneMessage.io/Model/Settings.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Settings - /// - [DataContract(Name = "Settings")] - public partial class Settings : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// webhookUrl. - public Settings(string webhookUrl = default(string)) - { - this.WebhookUrl = webhookUrl; - } - - /// - /// Gets or Sets WebhookUrl - /// - /// https://bin.1msg.io/1f9aj261 - [DataMember(Name = "webhookUrl", EmitDefaultValue = true)] - public string WebhookUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Settings {\n"); - sb.Append(" WebhookUrl: ").Append(WebhookUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Settings); - } - - /// - /// Returns true if Settings instances are equal - /// - /// Instance of Settings to be compared - /// Boolean - public bool Equals(Settings input) - { - if (input == null) - { - return false; - } - return - ( - this.WebhookUrl == input.WebhookUrl || - (this.WebhookUrl != null && - this.WebhookUrl.Equals(input.WebhookUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WebhookUrl != null) - { - hashCode = (hashCode * 59) + this.WebhookUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/TemplateCategoryProp.cs b/csharp/src/OneMessage.io/Model/TemplateCategoryProp.cs deleted file mode 100644 index 8132fb5..0000000 --- a/csharp/src/OneMessage.io/Model/TemplateCategoryProp.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Template category - /// - /// Template category - [JsonConverter(typeof(StringEnumConverter))] - public enum TemplateCategoryProp - { - /// - /// Enum MARKETING for value: MARKETING - /// - [EnumMember(Value = "MARKETING")] - MARKETING = 1, - - /// - /// Enum TRANSACTIONAL for value: TRANSACTIONAL - /// - [EnumMember(Value = "TRANSACTIONAL")] - TRANSACTIONAL = 2, - - /// - /// Enum OTP for value: OTP - /// - [EnumMember(Value = "OTP")] - OTP = 3 - } - -} diff --git a/csharp/src/OneMessage.io/Model/TemplateComponentsProp.cs b/csharp/src/OneMessage.io/Model/TemplateComponentsProp.cs deleted file mode 100644 index d5db9bc..0000000 --- a/csharp/src/OneMessage.io/Model/TemplateComponentsProp.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Array of template components - /// - [DataContract(Name = "TemplateComponentsProp")] - public partial class TemplateComponentsProp : List, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public TemplateComponentsProp() : base() - { - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateComponentsProp {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateComponentsProp); - } - - /// - /// Returns true if TemplateComponentsProp instances are equal - /// - /// Instance of TemplateComponentsProp to be compared - /// Boolean - public bool Equals(TemplateComponentsProp input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/TemplateComponentsPropInner.cs b/csharp/src/OneMessage.io/Model/TemplateComponentsPropInner.cs deleted file mode 100644 index 59356ad..0000000 --- a/csharp/src/OneMessage.io/Model/TemplateComponentsPropInner.cs +++ /dev/null @@ -1,261 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// TemplateComponentsPropInner - /// - [DataContract(Name = "TemplateComponentsProp_inner")] - public partial class TemplateComponentsPropInner : IEquatable, IValidatableObject - { - /// - /// Defines Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BODY for value: BODY - /// - [EnumMember(Value = "BODY")] - BODY = 1, - - /// - /// Enum HEADER for value: HEADER - /// - [EnumMember(Value = "HEADER")] - HEADER = 2, - - /// - /// Enum FOOTER for value: FOOTER - /// - [EnumMember(Value = "FOOTER")] - FOOTER = 3, - - /// - /// Enum BUTTONS for value: BUTTONS - /// - [EnumMember(Value = "BUTTONS")] - BUTTONS = 4 - } - - - /// - /// Gets or Sets Type - /// - /// BODY - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Only for HEADER type - /// - /// Only for HEADER type - [JsonConverter(typeof(StringEnumConverter))] - public enum FormatEnum - { - /// - /// Enum TEXT for value: TEXT - /// - [EnumMember(Value = "TEXT")] - TEXT = 1, - - /// - /// Enum IMAGE for value: IMAGE - /// - [EnumMember(Value = "IMAGE")] - IMAGE = 2, - - /// - /// Enum DOCUMENT for value: DOCUMENT - /// - [EnumMember(Value = "DOCUMENT")] - DOCUMENT = 3, - - /// - /// Enum VIDEO for value: VIDEO - /// - [EnumMember(Value = "VIDEO")] - VIDEO = 4 - } - - - /// - /// Only for HEADER type - /// - /// Only for HEADER type - /// TEXT - [DataMember(Name = "format", EmitDefaultValue = false)] - public FormatEnum? Format { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// type. - /// Only for HEADER type. - /// text. - /// example. - /// buttons. - public TemplateComponentsPropInner(TypeEnum? type = default(TypeEnum?), FormatEnum? format = default(FormatEnum?), string text = default(string), Object example = default(Object), List buttons = default(List)) - { - this.Type = type; - this.Format = format; - this.Text = text; - this.Example = example; - this.Buttons = buttons; - } - - /// - /// Gets or Sets Text - /// - /// header text {{1}} - [DataMember(Name = "text", EmitDefaultValue = false)] - public string Text { get; set; } - - /// - /// Gets or Sets Example - /// - [DataMember(Name = "example", EmitDefaultValue = false)] - public Object Example { get; set; } - - /// - /// Gets or Sets Buttons - /// - [DataMember(Name = "buttons", EmitDefaultValue = false)] - public List Buttons { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateComponentsPropInner {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Format: ").Append(Format).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" Example: ").Append(Example).Append("\n"); - sb.Append(" Buttons: ").Append(Buttons).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateComponentsPropInner); - } - - /// - /// Returns true if TemplateComponentsPropInner instances are equal - /// - /// Instance of TemplateComponentsPropInner to be compared - /// Boolean - public bool Equals(TemplateComponentsPropInner input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Format == input.Format || - this.Format.Equals(input.Format) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.Example == input.Example || - (this.Example != null && - this.Example.Equals(input.Example)) - ) && - ( - this.Buttons == input.Buttons || - this.Buttons != null && - input.Buttons != null && - this.Buttons.SequenceEqual(input.Buttons) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.Format.GetHashCode(); - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.Example != null) - { - hashCode = (hashCode * 59) + this.Example.GetHashCode(); - } - if (this.Buttons != null) - { - hashCode = (hashCode * 59) + this.Buttons.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/TemplateComponentsPropInnerButtonsInner.cs b/csharp/src/OneMessage.io/Model/TemplateComponentsPropInnerButtonsInner.cs deleted file mode 100644 index bcbdb1e..0000000 --- a/csharp/src/OneMessage.io/Model/TemplateComponentsPropInnerButtonsInner.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// TemplateComponentsPropInnerButtonsInner - /// - [DataContract(Name = "TemplateComponentsProp_inner_buttons_inner")] - public partial class TemplateComponentsPropInnerButtonsInner : IEquatable, IValidatableObject - { - /// - /// Defines Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PHONENUMBER for value: PHONE_NUMBER - /// - [EnumMember(Value = "PHONE_NUMBER")] - PHONENUMBER = 1, - - /// - /// Enum URL for value: URL - /// - [EnumMember(Value = "URL")] - URL = 2, - - /// - /// Enum QUICKREPLY for value: QUICK_REPLY - /// - [EnumMember(Value = "QUICK_REPLY")] - QUICKREPLY = 3 - } - - - /// - /// Gets or Sets Type - /// - /// QUICK_REPLY - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// type. - /// text. - /// url. - /// phoneNumber. - /// example. - public TemplateComponentsPropInnerButtonsInner(TypeEnum? type = default(TypeEnum?), string text = default(string), string url = default(string), string phoneNumber = default(string), List example = default(List)) - { - this.Type = type; - this.Text = text; - this.Url = url; - this.PhoneNumber = phoneNumber; - this.Example = example; - } - - /// - /// Gets or Sets Text - /// - /// phone-button-text - [DataMember(Name = "text", EmitDefaultValue = false)] - public string Text { get; set; } - - /// - /// Gets or Sets Url - /// - /// https://www.website.com/{{1}} - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - /// +1(234) 235-5678 - [DataMember(Name = "phone_number", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Gets or Sets Example - /// - [DataMember(Name = "example", EmitDefaultValue = false)] - public List Example { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateComponentsPropInnerButtonsInner {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" Example: ").Append(Example).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateComponentsPropInnerButtonsInner); - } - - /// - /// Returns true if TemplateComponentsPropInnerButtonsInner instances are equal - /// - /// Instance of TemplateComponentsPropInnerButtonsInner to be compared - /// Boolean - public bool Equals(TemplateComponentsPropInnerButtonsInner input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Example == input.Example || - this.Example != null && - input.Example != null && - this.Example.SequenceEqual(input.Example) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Example != null) - { - hashCode = (hashCode * 59) + this.Example.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/TemplateLanguageProp.cs b/csharp/src/OneMessage.io/Model/TemplateLanguageProp.cs deleted file mode 100644 index 42bf06e..0000000 --- a/csharp/src/OneMessage.io/Model/TemplateLanguageProp.cs +++ /dev/null @@ -1,427 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// Template language - /// - /// Template language - [JsonConverter(typeof(StringEnumConverter))] - public enum TemplateLanguageProp - { - /// - /// Enum Af for value: af - /// - [EnumMember(Value = "af")] - Af = 1, - - /// - /// Enum Sq for value: sq - /// - [EnumMember(Value = "sq")] - Sq = 2, - - /// - /// Enum Ar for value: ar - /// - [EnumMember(Value = "ar")] - Ar = 3, - - /// - /// Enum Az for value: az - /// - [EnumMember(Value = "az")] - Az = 4, - - /// - /// Enum Bn for value: bn - /// - [EnumMember(Value = "bn")] - Bn = 5, - - /// - /// Enum Bg for value: bg - /// - [EnumMember(Value = "bg")] - Bg = 6, - - /// - /// Enum Ca for value: ca - /// - [EnumMember(Value = "ca")] - Ca = 7, - - /// - /// Enum ZhCN for value: zh_CN - /// - [EnumMember(Value = "zh_CN")] - ZhCN = 8, - - /// - /// Enum ZhHK for value: zh_HK - /// - [EnumMember(Value = "zh_HK")] - ZhHK = 9, - - /// - /// Enum ZhTW for value: zh_TW - /// - [EnumMember(Value = "zh_TW")] - ZhTW = 10, - - /// - /// Enum Hr for value: hr - /// - [EnumMember(Value = "hr")] - Hr = 11, - - /// - /// Enum Cs for value: cs - /// - [EnumMember(Value = "cs")] - Cs = 12, - - /// - /// Enum Da for value: da - /// - [EnumMember(Value = "da")] - Da = 13, - - /// - /// Enum Nl for value: nl - /// - [EnumMember(Value = "nl")] - Nl = 14, - - /// - /// Enum En for value: en - /// - [EnumMember(Value = "en")] - En = 15, - - /// - /// Enum EnGB for value: en_GB - /// - [EnumMember(Value = "en_GB")] - EnGB = 16, - - /// - /// Enum EnUS for value: en_US - /// - [EnumMember(Value = "en_US")] - EnUS = 17, - - /// - /// Enum Et for value: et - /// - [EnumMember(Value = "et")] - Et = 18, - - /// - /// Enum Fil for value: fil - /// - [EnumMember(Value = "fil")] - Fil = 19, - - /// - /// Enum Fi for value: fi - /// - [EnumMember(Value = "fi")] - Fi = 20, - - /// - /// Enum Fr for value: fr - /// - [EnumMember(Value = "fr")] - Fr = 21, - - /// - /// Enum De for value: de - /// - [EnumMember(Value = "de")] - De = 22, - - /// - /// Enum El for value: el - /// - [EnumMember(Value = "el")] - El = 23, - - /// - /// Enum Gu for value: gu - /// - [EnumMember(Value = "gu")] - Gu = 24, - - /// - /// Enum He for value: he - /// - [EnumMember(Value = "he")] - He = 25, - - /// - /// Enum Hi for value: hi - /// - [EnumMember(Value = "hi")] - Hi = 26, - - /// - /// Enum Hu for value: hu - /// - [EnumMember(Value = "hu")] - Hu = 27, - - /// - /// Enum Id for value: id - /// - [EnumMember(Value = "id")] - Id = 28, - - /// - /// Enum Ga for value: ga - /// - [EnumMember(Value = "ga")] - Ga = 29, - - /// - /// Enum It for value: it - /// - [EnumMember(Value = "it")] - It = 30, - - /// - /// Enum Ja for value: ja - /// - [EnumMember(Value = "ja")] - Ja = 31, - - /// - /// Enum Kn for value: kn - /// - [EnumMember(Value = "kn")] - Kn = 32, - - /// - /// Enum Kk for value: kk - /// - [EnumMember(Value = "kk")] - Kk = 33, - - /// - /// Enum Ko for value: ko - /// - [EnumMember(Value = "ko")] - Ko = 34, - - /// - /// Enum Lo for value: lo - /// - [EnumMember(Value = "lo")] - Lo = 35, - - /// - /// Enum Lv for value: lv - /// - [EnumMember(Value = "lv")] - Lv = 36, - - /// - /// Enum Lt for value: lt - /// - [EnumMember(Value = "lt")] - Lt = 37, - - /// - /// Enum Mk for value: mk - /// - [EnumMember(Value = "mk")] - Mk = 38, - - /// - /// Enum Ms for value: ms - /// - [EnumMember(Value = "ms")] - Ms = 39, - - /// - /// Enum Mr for value: mr - /// - [EnumMember(Value = "mr")] - Mr = 40, - - /// - /// Enum Nb for value: nb - /// - [EnumMember(Value = "nb")] - Nb = 41, - - /// - /// Enum Fa for value: fa - /// - [EnumMember(Value = "fa")] - Fa = 42, - - /// - /// Enum Pl for value: pl - /// - [EnumMember(Value = "pl")] - Pl = 43, - - /// - /// Enum PtBR for value: pt_BR - /// - [EnumMember(Value = "pt_BR")] - PtBR = 44, - - /// - /// Enum PtPT for value: pt_PT - /// - [EnumMember(Value = "pt_PT")] - PtPT = 45, - - /// - /// Enum Pa for value: pa - /// - [EnumMember(Value = "pa")] - Pa = 46, - - /// - /// Enum Ro for value: ro - /// - [EnumMember(Value = "ro")] - Ro = 47, - - /// - /// Enum Ru for value: ru - /// - [EnumMember(Value = "ru")] - Ru = 48, - - /// - /// Enum Sr for value: sr - /// - [EnumMember(Value = "sr")] - Sr = 49, - - /// - /// Enum Sk for value: sk - /// - [EnumMember(Value = "sk")] - Sk = 50, - - /// - /// Enum Sl for value: sl - /// - [EnumMember(Value = "sl")] - Sl = 51, - - /// - /// Enum Es for value: es - /// - [EnumMember(Value = "es")] - Es = 52, - - /// - /// Enum EsAR for value: es_AR - /// - [EnumMember(Value = "es_AR")] - EsAR = 53, - - /// - /// Enum EsES for value: es_ES - /// - [EnumMember(Value = "es_ES")] - EsES = 54, - - /// - /// Enum EsMX for value: es_MX - /// - [EnumMember(Value = "es_MX")] - EsMX = 55, - - /// - /// Enum Sw for value: sw - /// - [EnumMember(Value = "sw")] - Sw = 56, - - /// - /// Enum Sv for value: sv - /// - [EnumMember(Value = "sv")] - Sv = 57, - - /// - /// Enum Ta for value: ta - /// - [EnumMember(Value = "ta")] - Ta = 58, - - /// - /// Enum Te for value: te - /// - [EnumMember(Value = "te")] - Te = 59, - - /// - /// Enum Th for value: th - /// - [EnumMember(Value = "th")] - Th = 60, - - /// - /// Enum Tr for value: tr - /// - [EnumMember(Value = "tr")] - Tr = 61, - - /// - /// Enum Uk for value: uk - /// - [EnumMember(Value = "uk")] - Uk = 62, - - /// - /// Enum Ur for value: ur - /// - [EnumMember(Value = "ur")] - Ur = 63, - - /// - /// Enum Uz for value: uz - /// - [EnumMember(Value = "uz")] - Uz = 64, - - /// - /// Enum Vi for value: vi - /// - [EnumMember(Value = "vi")] - Vi = 65 - } - -} diff --git a/csharp/src/OneMessage.io/Model/TemplateNamespaceField.cs b/csharp/src/OneMessage.io/Model/TemplateNamespaceField.cs deleted file mode 100644 index 598d7bd..0000000 --- a/csharp/src/OneMessage.io/Model/TemplateNamespaceField.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// TemplateNamespaceField - /// - [DataContract(Name = "TemplateNamespaceField")] - public partial class TemplateNamespaceField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varNamespace. - public TemplateNamespaceField(string varNamespace = default(string)) - { - this.VarNamespace = varNamespace; - } - - /// - /// Gets or Sets VarNamespace - /// - /// ca300906_cfbc_410b_99fb_dcee8e13d578 - [DataMember(Name = "namespace", EmitDefaultValue = false)] - public string VarNamespace { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateNamespaceField {\n"); - sb.Append(" VarNamespace: ").Append(VarNamespace).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateNamespaceField); - } - - /// - /// Returns true if TemplateNamespaceField instances are equal - /// - /// Instance of TemplateNamespaceField to be compared - /// Boolean - public bool Equals(TemplateNamespaceField input) - { - if (input == null) - { - return false; - } - return - ( - this.VarNamespace == input.VarNamespace || - (this.VarNamespace != null && - this.VarNamespace.Equals(input.VarNamespace)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarNamespace != null) - { - hashCode = (hashCode * 59) + this.VarNamespace.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/UploadMedia.cs b/csharp/src/OneMessage.io/Model/UploadMedia.cs deleted file mode 100644 index ab2093f..0000000 --- a/csharp/src/OneMessage.io/Model/UploadMedia.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// UploadMedia - /// - [DataContract(Name = "UploadMedia")] - public partial class UploadMedia : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UploadMedia() { } - /// - /// Initializes a new instance of the class. - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field (required). - public UploadMedia(string body = default(string)) - { - // to ensure "body" is required (not null) - if (body == null) - { - throw new ArgumentNullException("body is a required property for UploadMedia and cannot be null"); - } - this.Body = body; - } - - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - /// - /// HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] - public string Body { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UploadMedia {\n"); - sb.Append(" Body: ").Append(Body).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UploadMedia); - } - - /// - /// Returns true if UploadMedia instances are equal - /// - /// Instance of UploadMedia to be compared - /// Boolean - public bool Equals(UploadMedia input) - { - if (input == null) - { - return false; - } - return - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/Model/WebhookUrl.cs b/csharp/src/OneMessage.io/Model/WebhookUrl.cs deleted file mode 100644 index beb7ad9..0000000 --- a/csharp/src/OneMessage.io/Model/WebhookUrl.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * one_msg_waba_sdk - * - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneMessage.io.Client.OpenAPIDateConverter; - -namespace OneMessage.io.Model -{ - /// - /// WebhookUrl - /// - [DataContract(Name = "WebhookUrl")] - public partial class WebhookUrl : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected WebhookUrl() { } - /// - /// Initializes a new instance of the class. - /// - /// Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). (required). - public WebhookUrl(string varWebhookUrl = default(string)) - { - // to ensure "varWebhookUrl" is required (not null) - if (varWebhookUrl == null) - { - throw new ArgumentNullException("varWebhookUrl is a required property for WebhookUrl and cannot be null"); - } - this.VarWebhookUrl = varWebhookUrl; - } - - /// - /// Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - /// - /// Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - [DataMember(Name = "webhookUrl", IsRequired = true, EmitDefaultValue = true)] - public string VarWebhookUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WebhookUrl {\n"); - sb.Append(" VarWebhookUrl: ").Append(VarWebhookUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookUrl); - } - - /// - /// Returns true if WebhookUrl instances are equal - /// - /// Instance of WebhookUrl to be compared - /// Boolean - public bool Equals(WebhookUrl input) - { - if (input == null) - { - return false; - } - return - ( - this.VarWebhookUrl == input.VarWebhookUrl || - (this.VarWebhookUrl != null && - this.VarWebhookUrl.Equals(input.VarWebhookUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarWebhookUrl != null) - { - hashCode = (hashCode * 59) + this.VarWebhookUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp/src/OneMessage.io/OneMessage.io.csproj b/csharp/src/OneMessage.io/OneMessage.io.csproj deleted file mode 100644 index 030729a..0000000 --- a/csharp/src/OneMessage.io/OneMessage.io.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - false - net7.0;net48 - OneMessage.io - OneMessage.io - Library - galdias - 1Message - OpenAPI Library - A library generated from a OpenAPI doc - Apache-2.0 - Apache-2.0 - OneMessage.io - 1.0.3 - bin\$(Configuration)\$(TargetFramework)\OneMessage.io.xml - https://github.com/1msg/1sdk.git - git - Updated README - WABA SDK Whatsapp OneMessage - README.md - - - - - - - - - - - - - - - - - - - - diff --git a/csharp/src/OneMessage.io/README.md b/csharp/src/OneMessage.io/README.md deleted file mode 100644 index 20baf73..0000000 --- a/csharp/src/OneMessage.io/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# OneMessage.io - the C# library for the one_msg_waba_sdk - -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 2.39.0 -- SDK version: 1.0.3 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported -.NET 7.0 .NET Framework 4.8 - -## Dependencies - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later - -## Installation -Please refer to the latest nuget installation description at the top of a page [NuGet link](https://www.nuget.org/packages/OneMessage.io) - - -## Usage - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneMessage.io.Api; -using OneMessage.io.Client; -using OneMessage.io.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration config = new Configuration(); - config.BasePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - // Configure API key authorization: token - config.ApiKey.Add("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.ApiKeyPrefix.Add("token", "Bearer"); - - var apiInstance = new ChannelApi(config); - - try - { - // GetMe - GetMe result = apiInstance.GetMe(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ChannelApi.GetMe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` -```csharp -Configuration c = new Configuration(); -System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/"); -webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; -c.Proxy = webProxy; -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ChannelApi* | [**GetCommerce**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getcommerce) | **GET** /commerce | Get Commerce Settings -*ChannelApi* | [**GetExtendedStatistics**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getextendedstatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -*ChannelApi* | [**GetMe**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getme) | **GET** /me | Get Profile Info -*ChannelApi* | [**GetSettings**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getsettings) | **GET** /settings | Get Settings -*ChannelApi* | [**GetStatistics**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getstatistics) | **GET** /statistics | Get Channel statistics -*ChannelApi* | [**GetStatus**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#getstatus) | **GET** /status | Get Status -*ChannelApi* | [**OutputIP**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#outputip) | **GET** /outputIP | Get channel server IP -*ChannelApi* | [**SetMe**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#setme) | **POST** /me | Change user info -*ChannelApi* | [**SetSettings**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelApi.md#setsettings) | **POST** /settings | Set settings -*MediaApi* | [**UploadMedia**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MediaApi.md#uploadmedia) | **POST** /uploadMedia | Upload media & get mediaId -*MessagingApi* | [**MessagesList**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#messageslist) | **GET** /messages | Get messages list -*MessagingApi* | [**ReadMessage**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#readmessage) | **POST** /readMessage | Mark message as read -*MessagingApi* | [**SendContact**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendcontact) | **POST** /sendContact | Send a Contact -*MessagingApi* | [**SendFile**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendfile) | **POST** /sendFile | Send a File -*MessagingApi* | [**SendList**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendlist) | **POST** /sendList | Send List Message -*MessagingApi* | [**SendLocation**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendlocation) | **POST** /sendLocation | Send a Location -*MessagingApi* | [**SendMessage**](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessagingApi.md#sendmessage) | **POST** /sendMessage | Send a Message -*ProductsCatalogsApi* | [**SendProduct**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ProductsCatalogsApi.md#sendproduct) | **POST** /sendProduct | Send a Product -*ProductsCatalogsApi* | [**SetCommerce**](https://github.com/1msg/1sdk/tree/main/csharp/docs/ProductsCatalogsApi.md#setcommerce) | **POST** /commerce | Set Commerce Settings -*TemplatesApi* | [**AddTemplate**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#addtemplate) | **POST** /addTemplate | Create template -*TemplatesApi* | [**RemoveTemplate**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#removetemplate) | **POST** /removeTemplate | Remove template -*TemplatesApi* | [**SendTemplate**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#sendtemplate) | **POST** /sendTemplate | Send Template Message -*TemplatesApi* | [**TemplatesList**](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplatesApi.md#templateslist) | **GET** /templates | Get templates list -*WebhooksApi* | [**AckHookInfo**](https://github.com/1msg/1sdk/tree/main/csharp/docs/WebhooksApi.md#ackhookinfo) | **GET** /hookInfo | Check ACKs -*WebhooksApi* | [**SetWebhook**](https://github.com/1msg/1sdk/tree/main/csharp/docs/WebhooksApi.md#setwebhook) | **POST** /webhook | Set webhook - - - -## Documentation for Models - - - [Model.Ack](https://github.com/1msg/1sdk/tree/main/csharp/docs/Ack.md) - - [Model.AddTemplateRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/AddTemplateRequest.md) - - [Model.ChannelExtendedStatistics](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelExtendedStatistics.md) - - [Model.ChannelExtendedStatisticsInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelExtendedStatisticsInner.md) - - [Model.ChannelStatistics](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelStatistics.md) - - [Model.ChannelStatus](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChannelStatus.md) - - [Model.ChatIdProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/ChatIdProp.md) - - [Model.Commerce](https://github.com/1msg/1sdk/tree/main/csharp/docs/Commerce.md) - - [Model.CommerceParams](https://github.com/1msg/1sdk/tree/main/csharp/docs/CommerceParams.md) - - [Model.Contacts](https://github.com/1msg/1sdk/tree/main/csharp/docs/Contacts.md) - - [Model.ContactsContactsInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/ContactsContactsInner.md) - - [Model.ContactsRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/ContactsRequest.md) - - [Model.GetAckInfo](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetAckInfo.md) - - [Model.GetAckInfoHooksInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetAckInfoHooksInner.md) - - [Model.GetCommerce](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetCommerce.md) - - [Model.GetCommerceInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetCommerceInner.md) - - [Model.GetIP](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetIP.md) - - [Model.GetMe](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMe.md) - - [Model.GetMe401Response](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMe401Response.md) - - [Model.GetMessages](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMessages.md) - - [Model.GetMessagesMessagesInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetMessagesMessagesInner.md) - - [Model.GetTemplates](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetTemplates.md) - - [Model.GetTemplatesTemplatesInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/GetTemplatesTemplatesInner.md) - - [Model.MeComponents](https://github.com/1msg/1sdk/tree/main/csharp/docs/MeComponents.md) - - [Model.MediaId](https://github.com/1msg/1sdk/tree/main/csharp/docs/MediaId.md) - - [Model.Message](https://github.com/1msg/1sdk/tree/main/csharp/docs/Message.md) - - [Model.MessageIdProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/MessageIdProp.md) - - [Model.PhoneProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/PhoneProp.md) - - [Model.ReadMessageRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/ReadMessageRequest.md) - - [Model.RemoveTemplateRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/RemoveTemplateRequest.md) - - [Model.SendContactRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendContactRequest.md) - - [Model.SendFileRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendFileRequest.md) - - [Model.SendListRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendListRequest.md) - - [Model.SendListRequestAllOfRows](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendListRequestAllOfRows.md) - - [Model.SendListRequestAllOfSections](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendListRequestAllOfSections.md) - - [Model.SendLocationRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendLocationRequest.md) - - [Model.SendMessageRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendMessageRequest.md) - - [Model.SendMessageStatus](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendMessageStatus.md) - - [Model.SendProductRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequest.md) - - [Model.SendProductRequestAllOfAction](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequestAllOfAction.md) - - [Model.SendProductRequestAllOfActionProductItems](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequestAllOfActionProductItems.md) - - [Model.SendProductRequestAllOfActionSections](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendProductRequestAllOfActionSections.md) - - [Model.SendTemplateRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequest.md) - - [Model.SendTemplateRequestAllOfCurrency](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfCurrency.md) - - [Model.SendTemplateRequestAllOfDateTime](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfDateTime.md) - - [Model.SendTemplateRequestAllOfDateTimeComponent](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfDateTimeComponent.md) - - [Model.SendTemplateRequestAllOfDateTimeUnixEpoch](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md) - - [Model.SendTemplateRequestAllOfLanguage](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfLanguage.md) - - [Model.SendTemplateRequestAllOfParams](https://github.com/1msg/1sdk/tree/main/csharp/docs/SendTemplateRequestAllOfParams.md) - - [Model.SetCommerce](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetCommerce.md) - - [Model.SetMe](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetMe.md) - - [Model.SetMeRequest](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetMeRequest.md) - - [Model.SetSettings200Response](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetSettings200Response.md) - - [Model.SetSettings200ResponseAllOfUpdate](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetSettings200ResponseAllOfUpdate.md) - - [Model.SetWebhookStatus](https://github.com/1msg/1sdk/tree/main/csharp/docs/SetWebhookStatus.md) - - [Model.Settings](https://github.com/1msg/1sdk/tree/main/csharp/docs/Settings.md) - - [Model.TemplateCategoryProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateCategoryProp.md) - - [Model.TemplateComponentsProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateComponentsProp.md) - - [Model.TemplateComponentsPropInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateComponentsPropInner.md) - - [Model.TemplateComponentsPropInnerButtonsInner](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateComponentsPropInnerButtonsInner.md) - - [Model.TemplateLanguageProp](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateLanguageProp.md) - - [Model.TemplateNamespaceField](https://github.com/1msg/1sdk/tree/main/csharp/docs/TemplateNamespaceField.md) - - [Model.UploadMedia](https://github.com/1msg/1sdk/tree/main/csharp/docs/UploadMedia.md) - - [Model.WebhookUrl](https://github.com/1msg/1sdk/tree/main/csharp/docs/WebhookUrl.md) - - -## Documentation for Authorization - - -Authentication schemes defined for the API: -### token - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - diff --git a/java/.github/workflows/maven.yml b/java/.github/workflows/maven.yml deleted file mode 100644 index 7b80866..0000000 --- a/java/.github/workflows/maven.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -# -# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) - -name: Java CI with Maven - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build: - name: Build one_msg_waba_sdk - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '8' ] - steps: - - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/java/.gitignore b/java/.gitignore deleted file mode 100644 index a530464..0000000 --- a/java/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/java/.openapi-generator-ignore b/java/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/java/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/java/.openapi-generator/FILES b/java/.openapi-generator/FILES deleted file mode 100644 index e19fb63..0000000 --- a/java/.openapi-generator/FILES +++ /dev/null @@ -1,174 +0,0 @@ -.github/workflows/maven.yml -.gitignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -docs/Ack.md -docs/AddTemplateRequest.md -docs/ChannelApi.md -docs/ChannelExtendedStatistics.md -docs/ChannelExtendedStatisticsInner.md -docs/ChannelStatistics.md -docs/ChannelStatus.md -docs/ChatIdProp.md -docs/Commerce.md -docs/CommerceParams.md -docs/Contacts.md -docs/ContactsContactsInner.md -docs/ContactsRequest.md -docs/GetAckInfo.md -docs/GetAckInfoHooksInner.md -docs/GetCommerce.md -docs/GetCommerceInner.md -docs/GetIP.md -docs/GetMe.md -docs/GetMe401Response.md -docs/GetMessages.md -docs/GetMessagesMessagesInner.md -docs/GetTemplates.md -docs/GetTemplatesTemplatesInner.md -docs/MeComponents.md -docs/MediaApi.md -docs/MediaId.md -docs/Message.md -docs/MessageIdProp.md -docs/MessagingApi.md -docs/PhoneProp.md -docs/ProductsCatalogsApi.md -docs/ReadMessageRequest.md -docs/RemoveTemplateRequest.md -docs/SendContactRequest.md -docs/SendFileRequest.md -docs/SendListRequest.md -docs/SendListRequestAllOfRows.md -docs/SendListRequestAllOfSections.md -docs/SendLocationRequest.md -docs/SendMessageRequest.md -docs/SendMessageStatus.md -docs/SendProductRequest.md -docs/SendProductRequestAllOfAction.md -docs/SendProductRequestAllOfActionProductItems.md -docs/SendProductRequestAllOfActionSections.md -docs/SendTemplateRequest.md -docs/SendTemplateRequestAllOfCurrency.md -docs/SendTemplateRequestAllOfDateTime.md -docs/SendTemplateRequestAllOfDateTimeComponent.md -docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md -docs/SendTemplateRequestAllOfLanguage.md -docs/SendTemplateRequestAllOfParams.md -docs/SetCommerce.md -docs/SetMe.md -docs/SetMeRequest.md -docs/SetSettings200Response.md -docs/SetSettings200ResponseAllOfUpdate.md -docs/SetWebhookStatus.md -docs/Settings.md -docs/TemplateCategoryProp.md -docs/TemplateComponentsProp.md -docs/TemplateComponentsPropInner.md -docs/TemplateComponentsPropInnerButtonsInner.md -docs/TemplateLanguageProp.md -docs/TemplateNamespaceField.md -docs/TemplatesApi.md -docs/UploadMedia.md -docs/WebhookUrl.md -docs/WebhooksApi.md -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/io/onemessage/ApiCallback.java -src/main/java/io/onemessage/ApiClient.java -src/main/java/io/onemessage/ApiException.java -src/main/java/io/onemessage/ApiResponse.java -src/main/java/io/onemessage/Configuration.java -src/main/java/io/onemessage/GzipRequestInterceptor.java -src/main/java/io/onemessage/JSON.java -src/main/java/io/onemessage/Pair.java -src/main/java/io/onemessage/ProgressRequestBody.java -src/main/java/io/onemessage/ProgressResponseBody.java -src/main/java/io/onemessage/ServerConfiguration.java -src/main/java/io/onemessage/ServerVariable.java -src/main/java/io/onemessage/StringUtil.java -src/main/java/io/onemessage/auth/ApiKeyAuth.java -src/main/java/io/onemessage/auth/Authentication.java -src/main/java/io/onemessage/auth/HttpBasicAuth.java -src/main/java/io/onemessage/auth/HttpBearerAuth.java -src/main/java/io/onemessage/client/ChannelApi.java -src/main/java/io/onemessage/client/MediaApi.java -src/main/java/io/onemessage/client/MessagingApi.java -src/main/java/io/onemessage/client/ProductsCatalogsApi.java -src/main/java/io/onemessage/client/TemplatesApi.java -src/main/java/io/onemessage/client/WebhooksApi.java -src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java -src/main/java/org/openapitools/client/model/Ack.java -src/main/java/org/openapitools/client/model/AddTemplateRequest.java -src/main/java/org/openapitools/client/model/ChannelExtendedStatistics.java -src/main/java/org/openapitools/client/model/ChannelExtendedStatisticsInner.java -src/main/java/org/openapitools/client/model/ChannelStatistics.java -src/main/java/org/openapitools/client/model/ChannelStatus.java -src/main/java/org/openapitools/client/model/ChatIdProp.java -src/main/java/org/openapitools/client/model/Commerce.java -src/main/java/org/openapitools/client/model/CommerceParams.java -src/main/java/org/openapitools/client/model/Contacts.java -src/main/java/org/openapitools/client/model/ContactsContactsInner.java -src/main/java/org/openapitools/client/model/ContactsRequest.java -src/main/java/org/openapitools/client/model/GetAckInfo.java -src/main/java/org/openapitools/client/model/GetAckInfoHooksInner.java -src/main/java/org/openapitools/client/model/GetCommerce.java -src/main/java/org/openapitools/client/model/GetCommerceInner.java -src/main/java/org/openapitools/client/model/GetIP.java -src/main/java/org/openapitools/client/model/GetMe.java -src/main/java/org/openapitools/client/model/GetMe401Response.java -src/main/java/org/openapitools/client/model/GetMessages.java -src/main/java/org/openapitools/client/model/GetMessagesMessagesInner.java -src/main/java/org/openapitools/client/model/GetTemplates.java -src/main/java/org/openapitools/client/model/GetTemplatesTemplatesInner.java -src/main/java/org/openapitools/client/model/MeComponents.java -src/main/java/org/openapitools/client/model/MediaId.java -src/main/java/org/openapitools/client/model/Message.java -src/main/java/org/openapitools/client/model/MessageIdProp.java -src/main/java/org/openapitools/client/model/PhoneProp.java -src/main/java/org/openapitools/client/model/ReadMessageRequest.java -src/main/java/org/openapitools/client/model/RemoveTemplateRequest.java -src/main/java/org/openapitools/client/model/SendContactRequest.java -src/main/java/org/openapitools/client/model/SendFileRequest.java -src/main/java/org/openapitools/client/model/SendListRequest.java -src/main/java/org/openapitools/client/model/SendListRequestAllOfRows.java -src/main/java/org/openapitools/client/model/SendListRequestAllOfSections.java -src/main/java/org/openapitools/client/model/SendLocationRequest.java -src/main/java/org/openapitools/client/model/SendMessageRequest.java -src/main/java/org/openapitools/client/model/SendMessageStatus.java -src/main/java/org/openapitools/client/model/SendProductRequest.java -src/main/java/org/openapitools/client/model/SendProductRequestAllOfAction.java -src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItems.java -src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionSections.java -src/main/java/org/openapitools/client/model/SendTemplateRequest.java -src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrency.java -src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTime.java -src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponent.java -src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpoch.java -src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguage.java -src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfParams.java -src/main/java/org/openapitools/client/model/SetCommerce.java -src/main/java/org/openapitools/client/model/SetMe.java -src/main/java/org/openapitools/client/model/SetMeRequest.java -src/main/java/org/openapitools/client/model/SetSettings200Response.java -src/main/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdate.java -src/main/java/org/openapitools/client/model/SetWebhookStatus.java -src/main/java/org/openapitools/client/model/Settings.java -src/main/java/org/openapitools/client/model/TemplateCategoryProp.java -src/main/java/org/openapitools/client/model/TemplateComponentsProp.java -src/main/java/org/openapitools/client/model/TemplateComponentsPropInner.java -src/main/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInner.java -src/main/java/org/openapitools/client/model/TemplateLanguageProp.java -src/main/java/org/openapitools/client/model/TemplateNamespaceField.java -src/main/java/org/openapitools/client/model/UploadMedia.java -src/main/java/org/openapitools/client/model/WebhookUrl.java diff --git a/java/.openapi-generator/VERSION b/java/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/java/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/java/.travis.yml b/java/.travis.yml deleted file mode 100644 index 1b6741c..0000000 --- a/java/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Generated by OpenAPI Generator: https://openapi-generator.tech -# -# Ref: https://docs.travis-ci.com/user/languages/java/ -# -language: java -jdk: - - openjdk12 - - openjdk11 - - openjdk10 - - openjdk9 - - openjdk8 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - #- mvn test - # test using gradle - - gradle test - # test using sbt - # - sbt test diff --git a/java/README.md b/java/README.md deleted file mode 100644 index 00fc764..0000000 --- a/java/README.md +++ /dev/null @@ -1,247 +0,0 @@ -# onemessage-java-client - -one_msg_waba_sdk -- API version: 2.39.0 - - Build date: 2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok] - -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - - -## Requirements - -Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - io.onemessage - onemessage-java-client - 2.39.0 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy - repositories { - mavenCentral() // Needed if the 'onemessage-java-client' jar has been published to maven central. - mavenLocal() // Needed if the 'onemessage-java-client' jar has been published to the local maven repo. - } - - dependencies { - implementation "io.onemessage:onemessage-java-client:2.39.0" - } -``` - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/onemessage-java-client-2.39.0.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java - -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - GetCommerce result = apiInstance.getCommerce(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getCommerce"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ChannelApi* | [**getCommerce**](docs/ChannelApi.md#getCommerce) | **GET** /commerce | Get Commerce Settings -*ChannelApi* | [**getExtendedStatistics**](docs/ChannelApi.md#getExtendedStatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -*ChannelApi* | [**getMe**](docs/ChannelApi.md#getMe) | **GET** /me | Get Profile Info -*ChannelApi* | [**getSettings**](docs/ChannelApi.md#getSettings) | **GET** /settings | Get Settings -*ChannelApi* | [**getStatistics**](docs/ChannelApi.md#getStatistics) | **GET** /statistics | Get Channel statistics -*ChannelApi* | [**getStatus**](docs/ChannelApi.md#getStatus) | **GET** /status | Get Status -*ChannelApi* | [**outputIP**](docs/ChannelApi.md#outputIP) | **GET** /outputIP | Get channel server IP -*ChannelApi* | [**setMe**](docs/ChannelApi.md#setMe) | **POST** /me | Change user info -*ChannelApi* | [**setSettings**](docs/ChannelApi.md#setSettings) | **POST** /settings | Set settings -*MediaApi* | [**uploadMedia**](docs/MediaApi.md#uploadMedia) | **POST** /uploadMedia | Upload media & get mediaId -*MessagingApi* | [**messagesList**](docs/MessagingApi.md#messagesList) | **GET** /messages | Get messages list -*MessagingApi* | [**readMessage**](docs/MessagingApi.md#readMessage) | **POST** /readMessage | Mark message as read -*MessagingApi* | [**sendContact**](docs/MessagingApi.md#sendContact) | **POST** /sendContact | Send a Contact -*MessagingApi* | [**sendFile**](docs/MessagingApi.md#sendFile) | **POST** /sendFile | Send a File -*MessagingApi* | [**sendList**](docs/MessagingApi.md#sendList) | **POST** /sendList | Send List Message -*MessagingApi* | [**sendLocation**](docs/MessagingApi.md#sendLocation) | **POST** /sendLocation | Send a Location -*MessagingApi* | [**sendMessage**](docs/MessagingApi.md#sendMessage) | **POST** /sendMessage | Send a Message -*ProductsCatalogsApi* | [**sendProduct**](docs/ProductsCatalogsApi.md#sendProduct) | **POST** /sendProduct | Send a Product -*ProductsCatalogsApi* | [**setCommerce**](docs/ProductsCatalogsApi.md#setCommerce) | **POST** /commerce | Set Commerce Settings -*TemplatesApi* | [**addTemplate**](docs/TemplatesApi.md#addTemplate) | **POST** /addTemplate | Create template -*TemplatesApi* | [**removeTemplate**](docs/TemplatesApi.md#removeTemplate) | **POST** /removeTemplate | Remove template -*TemplatesApi* | [**sendTemplate**](docs/TemplatesApi.md#sendTemplate) | **POST** /sendTemplate | Send Template Message -*TemplatesApi* | [**templatesList**](docs/TemplatesApi.md#templatesList) | **GET** /templates | Get templates list -*WebhooksApi* | [**ackHookInfo**](docs/WebhooksApi.md#ackHookInfo) | **GET** /hookInfo | Check ACKs -*WebhooksApi* | [**setWebhook**](docs/WebhooksApi.md#setWebhook) | **POST** /webhook | Set webhook - - -## Documentation for Models - - - [Ack](docs/Ack.md) - - [AddTemplateRequest](docs/AddTemplateRequest.md) - - [ChannelExtendedStatistics](docs/ChannelExtendedStatistics.md) - - [ChannelExtendedStatisticsInner](docs/ChannelExtendedStatisticsInner.md) - - [ChannelStatistics](docs/ChannelStatistics.md) - - [ChannelStatus](docs/ChannelStatus.md) - - [ChatIdProp](docs/ChatIdProp.md) - - [Commerce](docs/Commerce.md) - - [CommerceParams](docs/CommerceParams.md) - - [Contacts](docs/Contacts.md) - - [ContactsContactsInner](docs/ContactsContactsInner.md) - - [ContactsRequest](docs/ContactsRequest.md) - - [GetAckInfo](docs/GetAckInfo.md) - - [GetAckInfoHooksInner](docs/GetAckInfoHooksInner.md) - - [GetCommerce](docs/GetCommerce.md) - - [GetCommerceInner](docs/GetCommerceInner.md) - - [GetIP](docs/GetIP.md) - - [GetMe](docs/GetMe.md) - - [GetMe401Response](docs/GetMe401Response.md) - - [GetMessages](docs/GetMessages.md) - - [GetMessagesMessagesInner](docs/GetMessagesMessagesInner.md) - - [GetTemplates](docs/GetTemplates.md) - - [GetTemplatesTemplatesInner](docs/GetTemplatesTemplatesInner.md) - - [MeComponents](docs/MeComponents.md) - - [MediaId](docs/MediaId.md) - - [Message](docs/Message.md) - - [MessageIdProp](docs/MessageIdProp.md) - - [PhoneProp](docs/PhoneProp.md) - - [ReadMessageRequest](docs/ReadMessageRequest.md) - - [RemoveTemplateRequest](docs/RemoveTemplateRequest.md) - - [SendContactRequest](docs/SendContactRequest.md) - - [SendFileRequest](docs/SendFileRequest.md) - - [SendListRequest](docs/SendListRequest.md) - - [SendListRequestAllOfRows](docs/SendListRequestAllOfRows.md) - - [SendListRequestAllOfSections](docs/SendListRequestAllOfSections.md) - - [SendLocationRequest](docs/SendLocationRequest.md) - - [SendMessageRequest](docs/SendMessageRequest.md) - - [SendMessageStatus](docs/SendMessageStatus.md) - - [SendProductRequest](docs/SendProductRequest.md) - - [SendProductRequestAllOfAction](docs/SendProductRequestAllOfAction.md) - - [SendProductRequestAllOfActionProductItems](docs/SendProductRequestAllOfActionProductItems.md) - - [SendProductRequestAllOfActionSections](docs/SendProductRequestAllOfActionSections.md) - - [SendTemplateRequest](docs/SendTemplateRequest.md) - - [SendTemplateRequestAllOfCurrency](docs/SendTemplateRequestAllOfCurrency.md) - - [SendTemplateRequestAllOfDateTime](docs/SendTemplateRequestAllOfDateTime.md) - - [SendTemplateRequestAllOfDateTimeComponent](docs/SendTemplateRequestAllOfDateTimeComponent.md) - - [SendTemplateRequestAllOfDateTimeUnixEpoch](docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md) - - [SendTemplateRequestAllOfLanguage](docs/SendTemplateRequestAllOfLanguage.md) - - [SendTemplateRequestAllOfParams](docs/SendTemplateRequestAllOfParams.md) - - [SetCommerce](docs/SetCommerce.md) - - [SetMe](docs/SetMe.md) - - [SetMeRequest](docs/SetMeRequest.md) - - [SetSettings200Response](docs/SetSettings200Response.md) - - [SetSettings200ResponseAllOfUpdate](docs/SetSettings200ResponseAllOfUpdate.md) - - [SetWebhookStatus](docs/SetWebhookStatus.md) - - [Settings](docs/Settings.md) - - [TemplateCategoryProp](docs/TemplateCategoryProp.md) - - [TemplateComponentsProp](docs/TemplateComponentsProp.md) - - [TemplateComponentsPropInner](docs/TemplateComponentsPropInner.md) - - [TemplateComponentsPropInnerButtonsInner](docs/TemplateComponentsPropInnerButtonsInner.md) - - [TemplateLanguageProp](docs/TemplateLanguageProp.md) - - [TemplateNamespaceField](docs/TemplateNamespaceField.md) - - [UploadMedia](docs/UploadMedia.md) - - [WebhookUrl](docs/WebhookUrl.md) - - - -## Documentation for Authorization - - -Authentication schemes defined for the API: - -### token - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - -hello@1msg.io - diff --git a/java/api/openapi.yaml b/java/api/openapi.yaml deleted file mode 100644 index ecfc2a1..0000000 --- a/java/api/openapi.yaml +++ /dev/null @@ -1,2514 +0,0 @@ -openapi: 3.0.0 -info: - contact: - email: hello@1msg.io - description: "[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool\ - \ for your business. With us you get full access to the official Whatsapp API/webhooks.\n\ - \nEvery API request must contain an Authorize HTTP header with a token. \nThis\ - \ is your channel token, which can be found in your channel project on your profile\ - \ page.\nPlease do not give the token to anyone or post it publicly.\n\nThe authorization\ - \ token must be added to each request in the GET parameter 'token' and always\ - \ passed to query string (?token={your_token}).\nParameters in GET queries pass\ - \ query string. Parameters in POST requests — through the JSON-encoded request\ - \ body. \n\nAll 'send' methods (except /sendTemplate) will only work when the\ - \ dialog session with the user is open. Some of our solutions simplify and avoid\ - \ such limitations, but we urge you to pay more attention to this detail" - title: one_msg_waba_sdk - version: 2.39.0 -servers: -- description: New common server url - url: "{protocol}://api.1msg.io/{channelId}" - variables: - channelId: - default: YOUR_INSTANCE_NUMBER - description: Your channel number - protocol: - default: https - enum: - - http - - https -tags: -- description: Manage your WhatsApp Business API channel - name: Channel -- description: How to setup webhooks for the WhatsApp Business API - name: Webhooks -- description: This part of the documentation describes how to send and receive messages - using the WhatsApp Business API - name: Messaging -- description: Template messaging via WhatsApp Business API - name: Templates -- description: How to build and send messages with single and multiple products - name: Products & Catalogs -- description: "Use the media node to upload, retrieve, or delete media" - name: Media -paths: - /me: - get: - description: Use this edge to retrieve your profile's About info - operationId: getMe - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetMe' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get Profile Info - tags: - - Channel - x-accepts: application/json - post: - description: Change user info - operationId: setMe - requestBody: - $ref: '#/components/requestBodies/SetMe' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Change user info - tags: - - Channel - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /statistics: - get: - description: Get channel usage statistics - operationId: getStatistics - parameters: - - description: Month and year in format mm.YYYY. - example: "03.2022" - explode: true - in: query - name: date - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatistics' - description: Server response example - security: - - token: [] - summary: Get Channel statistics - tags: - - Channel - x-accepts: application/json - /extendedStatistics: - get: - description: Get channel usage extended statistics - operationId: getExtendedStatistics - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/channelExtendedStatistics' - description: Server response example - security: - - token: [] - summary: Get Extended Channel statistics - tags: - - Channel - x-accepts: application/json - /status: - get: - description: |- - Returns the status of your WhatsApp Business API client. Channel statuses: - - **connected**/**connecting** - everything is ok. - - **disconnected** - The Coreapp is not connected to the WhatsApp servers. - - **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. - - **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - operationId: getStatus - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatus' - description: Server response example - security: - - token: [] - summary: ' Get Status' - tags: - - Channel - x-accepts: application/json - /settings: - get: - description: '**webhookUrl** - Http or https URL for receiving notifications.' - operationId: getSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Settings' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get Settings - tags: - - Channel - x-accepts: application/json - post: - description: '**webhookUrl** - Http or https URL for receiving notifications.' - operationId: setSettings - requestBody: - $ref: '#/components/requestBodies/UpdateSettings' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/setSettings_200_response' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Set settings - tags: - - Channel - x-content-type: application/json - x-accepts: application/json - /commerce: - get: - description: |- - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. - **is_cart_enabled** - Set to true to enable cart or false to disable it. - operationId: getCommerce - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetCommerce' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get Commerce Settings - tags: - - Channel - x-accepts: application/json - post: - description: |- - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. - **is_cart_enabled** - Set to true to enable cart or false to disable it. - operationId: setCommerce - requestBody: - $ref: '#/components/requestBodies/UpdateCommerce' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetCommerce' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Set Commerce Settings - tags: - - Products & Catalogs - x-content-type: application/json - x-accepts: application/json - /webhook: - post: - callbacks: - messages: - $ref: '#/components/callbacks/Messages' - ack: - $ref: '#/components/callbacks/Ack' - description: |- - Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). - - **API responses in "Callbacks" tab** - operationId: setWebhook - requestBody: - $ref: '#/components/requestBodies/SetWebhook' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetWebhookStatus' - description: Server response example - security: - - token: [] - summary: Set webhook - tags: - - Webhooks - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendList: - post: - description: Send Interactive List Message to an existing chat. (Only if the - dialogue has an Open Session). Only one of two parameters is needed to determine - the destination - chatId or phone. - operationId: sendList - requestBody: - $ref: '#/components/requestBodies/SendList' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send List Message - tags: - - Messaging - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendFile: - post: - description: Send a file to an existing chat. (Only if the dialogue has an Open - Session). Only one of two parameters is needed to determine the destination - - chatId or phone. - operationId: sendFile - requestBody: - $ref: '#/components/requestBodies/SendFile' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a File - tags: - - Messaging - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendTemplate: - post: - description: |- - Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. - - Example: - - {"template":"template_name","language":{"policy":"deterministic","code":"en"},"namespace":"namespace_id","params":[{"type":"header","parameters":[{"type":"image","image": {"link":"https://..."}}]},{"type":"body","parameters":[{"type":"text","text":"test"}]}],"phone":"556123122026"} - operationId: sendTemplate - requestBody: - $ref: '#/components/requestBodies/SendTemplate' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send Template Message - tags: - - Templates - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendMessage: - post: - description: |- - Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. - - Only one of two parameters is needed to determine the destination - chatId or phone. - operationId: sendMessage - requestBody: - $ref: '#/components/requestBodies/SendMessage' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Message - tags: - - Messaging - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendLocation: - post: - description: Send a location to an existing chat. (Only if the dialogue has - an Open Session). Only one of two parameters is needed to determine the destination - - chatId or phone. - operationId: sendLocation - requestBody: - $ref: '#/components/requestBodies/SendLocation' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Location - tags: - - Messaging - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendContact: - post: - description: Send a contact to an existing chat. (Only if the dialogue has an - Open Session). Only one of two parameters is needed to determine the destination - - chatId or phone. - operationId: sendContact - requestBody: - $ref: '#/components/requestBodies/SendContact' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Contact - tags: - - Messaging - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /sendProduct: - post: - description: |- - Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - - First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. - - **You can not send products to Business WhatsApp clients.** - operationId: sendProduct - requestBody: - $ref: '#/components/requestBodies/SendProduct' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - security: - - token: [] - summary: Send a Product - tags: - - Products & Catalogs - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /addTemplate: - post: - description: Create new template for sending. - operationId: addTemplate - requestBody: - $ref: '#/components/requestBodies/AddTemplate' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AddTemplate' - description: Server response example - security: - - token: [] - summary: Create template - tags: - - Templates - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /removeTemplate: - post: - description: Deleted template can not be restored. - operationId: removeTemplate - requestBody: - $ref: '#/components/requestBodies/RemoveTemplate' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - security: - - token: [] - summary: Remove template - tags: - - Templates - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /templates: - get: - description: "" - operationId: templatesList - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetTemplates' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get templates list - tags: - - Templates - x-accepts: application/json - /uploadMedia: - post: - description: Upload media and get mediaId. Uploaded media can be sent in template - operationId: uploadMedia - requestBody: - $ref: '#/components/requestBodies/UploadMedia' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MediaId' - description: Server response example - security: - - token: [] - summary: Upload media & get mediaId - tags: - - Media - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /messages: - get: - description: "" - operationId: messagesList - parameters: - - description: "Displays the last messages. If this parameter is passed, then\ - \ lastMessageNumber is ignored." - example: true - explode: true - in: query - name: last - required: false - schema: - type: boolean - style: form - - description: "The lastMessageNumber parameter from the last response. Example:\ - \ 100" - example: 100 - explode: true - in: query - name: lastMessageNumber - required: false - schema: - type: integer - style: form - - description: "The firstMessageNumber parameter from the last response. Example:\ - \ 1" - example: 1 - explode: true - in: query - name: firstMessageNumber - required: false - schema: - type: integer - style: form - - description: Sets length of the message list. Default 100. With value 0 returns - all messages. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: |- - Filter messages by chatId - - Chat ID from the message list. Example: 556123122026@c.us - example: 556123122026@c.us - explode: true - in: query - name: chatId - required: false - schema: - type: string - style: form - - description: "Filter messages received after specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: min_time - required: false - schema: - type: integer - style: form - - description: "Filter messages received before specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: max_time - required: false - schema: - type: integer - style: form - - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: msgId - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetMessages' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get messages list - tags: - - Messaging - x-accepts: application/json - /hookInfo: - get: - description: "" - operationId: ackHookInfo - parameters: - - allowEmptyValue: false - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: messageId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetAckInfo' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Check ACKs - tags: - - Webhooks - x-accepts: application/json - /outputIP: - get: - description: "" - operationId: outputIP - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetIP' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Get channel server IP - tags: - - Channel - x-accepts: application/json - /readMessage: - post: - description: "" - operationId: readMessage - requestBody: - $ref: '#/components/requestBodies/ReadMessage' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - security: - - token: [] - summary: Mark message as read - tags: - - Messaging - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json -components: - callbacks: - Messages: - '{$request.body#/webhookUrl}': - post: - description: Sent on every new incoming or outgoing message to the URL specified - in the settings in the field **webhookUrl** - operationId: webhookMessages - requestBody: - $ref: '#/components/requestBodies/Messages' - responses: - "200": - description: OK - summary: New message notification - tags: - - Webhooks - Ack: - '{$request.body#/webhookUrl}': - post: - description: "Sent on outgoing message status updates (delivered, read)\ - \ to the address set in **webhookUrl** in settings \n\nIt works only if\ - \ the settings **webhookUrl** and **ackNotificationsOn**" - operationId: webhookAck - requestBody: - $ref: '#/components/requestBodies/Ack' - responses: - "200": - description: OK - summary: Message delivery status notification - tags: - - Webhooks - parameters: - messageId: - allowEmptyValue: false - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: messageId - required: true - schema: - type: string - style: form - msgId: - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - explode: true - in: query - name: msgId - required: false - schema: - type: string - style: form - phone: - description: "Phone number. Example: 556123122026" - example: 556123122026 - explode: true - in: query - name: phone - required: true - schema: - type: integer - style: form - date: - description: Month and year in format mm.YYYY. - example: "03.2022" - explode: true - in: query - name: date - required: false - schema: - type: string - style: form - lastMessageNumber: - description: "The lastMessageNumber parameter from the last response. Example:\ - \ 100" - example: 100 - explode: true - in: query - name: lastMessageNumber - required: false - schema: - type: integer - style: form - last: - description: "Displays the last messages. If this parameter is passed, then\ - \ lastMessageNumber is ignored." - example: true - explode: true - in: query - name: last - required: false - schema: - type: boolean - style: form - firstMessageNumber: - description: "The firstMessageNumber parameter from the last response. Example:\ - \ 1" - example: 1 - explode: true - in: query - name: firstMessageNumber - required: false - schema: - type: integer - style: form - limit: - description: Sets length of the message list. Default 100. With value 0 returns - all messages. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form - chatId: - description: |- - Filter messages by chatId - - Chat ID from the message list. Example: 556123122026@c.us - example: 556123122026@c.us - explode: true - in: query - name: chatId - required: false - schema: - type: string - style: form - min_time: - description: "Filter messages received after specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: min_time - required: false - schema: - type: integer - style: form - max_time: - description: "Filter messages received before specified time. Example: 1665396610" - example: 1665396610 - explode: true - in: query - name: max_time - required: false - schema: - type: integer - style: form - requestBodies: - Ack: - content: - application/json: - schema: - properties: - ack: - items: - $ref: '#/components/schemas/Ack' - type: array - type: object - AddTemplate: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AddTemplateRequest' - application/json: - schema: - $ref: '#/components/schemas/AddTemplateRequest' - required: true - Messages: - content: - application/json: - schema: - properties: - messages: - items: - $ref: '#/components/schemas/Message' - type: array - type: object - UpdateSettings: - content: - application/json: - schema: - $ref: '#/components/schemas/Settings' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/Settings' - required: true - UpdateCommerce: - content: - application/json: - schema: - $ref: '#/components/schemas/Commerce' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/Commerce' - required: true - RemoveTemplate: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoveTemplateRequest' - application/json: - schema: - $ref: '#/components/schemas/RemoveTemplateRequest' - required: true - SendMessage: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendMessageRequest' - application/json: - schema: - $ref: '#/components/schemas/SendMessageRequest' - required: true - SendLocation: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendLocationRequest' - application/json: - schema: - $ref: '#/components/schemas/SendLocationRequest' - required: true - SendContact: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendContactRequest' - application/json: - schema: - $ref: '#/components/schemas/SendContactRequest' - required: true - SendTemplate: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendTemplateRequest' - application/json: - schema: - $ref: '#/components/schemas/SendTemplateRequest' - required: true - SendFile: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendFileRequest' - application/json: - schema: - $ref: '#/components/schemas/SendFileRequest' - required: true - SendList: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendListRequest' - application/json: - schema: - $ref: '#/components/schemas/SendListRequest' - required: true - SendProduct: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SendProductRequest' - application/json: - schema: - $ref: '#/components/schemas/SendProductRequest' - required: true - SetMe: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SetMeRequest' - application/json: - schema: - $ref: '#/components/schemas/SetMeRequest' - required: true - SetWebhook: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookUrl' - application/json: - schema: - $ref: '#/components/schemas/WebhookUrl' - required: true - UploadMedia: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/UploadMedia' - application/json: - schema: - $ref: '#/components/schemas/UploadMedia' - required: true - ReadMessage: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ReadMessageRequest' - application/json: - schema: - $ref: '#/components/schemas/ReadMessageRequest' - responses: - AddTemplate: - content: - application/json: - schema: - $ref: '#/components/schemas/AddTemplate' - description: Server response example - channelStatistics: - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatistics' - description: Server response example - channelExtendedStatistics: - content: - application/json: - schema: - $ref: '#/components/schemas/channelExtendedStatistics' - description: Server response example - channelStatus: - content: - application/json: - schema: - $ref: '#/components/schemas/channelStatus' - description: Server response example - GetMe: - content: - application/json: - schema: - $ref: '#/components/schemas/GetMe' - description: Server response example - GetTemplates: - content: - application/json: - schema: - $ref: '#/components/schemas/GetTemplates' - description: Server response example - RemoveTemplate: - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - SendMessageStatus: - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - SendTemplate: - content: - application/json: - schema: - $ref: '#/components/schemas/SendMessageStatus' - description: Server response example - SetMe: - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - Settings: - content: - application/json: - schema: - $ref: '#/components/schemas/Settings' - description: Server response example - GetCommerce: - content: - application/json: - schema: - $ref: '#/components/schemas/GetCommerce' - description: Server response example - SetCommerce: - content: - application/json: - schema: - $ref: '#/components/schemas/SetCommerce' - description: Server response example - SetWebhookStatus: - content: - application/json: - schema: - $ref: '#/components/schemas/SetWebhookStatus' - description: Server response example - Unauthorized: - content: - application/json: - schema: - $ref: '#/components/schemas/getMe_401_response' - description: Invalid token - UpdateSettings: - content: - application/json: - schema: - $ref: '#/components/schemas/setSettings_200_response' - description: Server response example - UploadMedia: - content: - application/json: - schema: - $ref: '#/components/schemas/MediaId' - description: Server response example - GetMessages: - content: - application/json: - schema: - $ref: '#/components/schemas/GetMessages' - description: Server response example - GetAckInfo: - content: - application/json: - schema: - $ref: '#/components/schemas/GetAckInfo' - description: Server response example - GetIP: - content: - application/json: - schema: - $ref: '#/components/schemas/GetIP' - description: Server response example - ReadMessage: - content: - application/json: - schema: - $ref: '#/components/schemas/SetMe' - description: Server response example - schemas: - AddTemplate: - properties: {} - type: object - TemplateCategoryProp: - description: Template category - enum: - - MARKETING - - TRANSACTIONAL - - OTP - example: MARKETING - type: string - TemplateComponentsProp: - description: Array of template components - items: - $ref: '#/components/schemas/TemplateComponentsProp_inner' - type: array - TemplateLanguageProp: - description: Template language - enum: - - af - - sq - - ar - - az - - bn - - bg - - ca - - zh_CN - - zh_HK - - zh_TW - - hr - - cs - - da - - nl - - en - - en_GB - - en_US - - et - - fil - - fi - - fr - - de - - el - - gu - - he - - hi - - hu - - id - - ga - - it - - ja - - kn - - kk - - ko - - lo - - lv - - lt - - mk - - ms - - mr - - nb - - fa - - pl - - pt_BR - - pt_PT - - pa - - ro - - ru - - sr - - sk - - sl - - es - - es_AR - - es_ES - - es_MX - - sw - - sv - - ta - - te - - th - - tr - - uk - - ur - - uz - - vi - example: en - type: string - TemplateNamespaceProp: - description: Can be found by method /templates - example: ca300906_cfbc_410b_99fb_dcee8e13d578 - type: string - TemplateNamespaceField: - properties: - namespace: - example: ca300906_cfbc_410b_99fb_dcee8e13d578 - type: string - type: object - Ack: - properties: - id: - description: unique id of message - example: true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F - type: string - chatId: - description: chat ID - example: 12020721369@c.us - type: string - status: - description: type of the message status - enum: - - delivered - - viewed - - sent - example: viewed - type: string - type: object - AddTemplateRequest: - example: - components: null - name: start - language: en - category: MARKETING - properties: - name: - description: Name of template - example: start - type: string - category: - $ref: '#/components/schemas/TemplateCategoryProp' - components: - $ref: '#/components/schemas/TemplateComponentsProp' - language: - $ref: '#/components/schemas/TemplateLanguageProp' - type: object - ChatIdProp: - properties: - chatId: - description: |- - **Required if phone is not set** - - Chat ID from the message list. Examples: 12020721369@c.us - . Used instead of the phone parameter. - example: 12020721369@c.us - type: string - type: object - PhoneProp: - properties: - phone: - description: "**Required if chatId is not set**\n\nA phone number starting\ - \ with the country code. You do not\nneed to add your number. \n\nUSA\ - \ example: 12020721369." - example: 12020721369 - type: integer - type: object - MessageIdProp: - properties: - messageId: - description: "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U" - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - type: string - type: object - Message: - properties: - id: - description: unique id - example: ABGHYoIXMAmY13IKOick9az6QYmt4R - type: string - body: - description: "text message for type \"chat\", or link to download the file\ - \ for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude\ - \ and longitude for \"location\", or message \"[Call]\" for \"call_log\"" - example: Ok! - type: string - fromMe: - description: "true - outgoing, false - incoming" - example: true - type: boolean - self: - description: "1 - generated by api, 0 - generated by app" - example: 0 - type: integer - isForwarded: - description: "true - forwarded message, false - direct message" - example: false - type: boolean - author: - description: Author ID of the message - example: 12020721369@c.us - type: string - time: - description: "send time, unix timestamp" - example: 1665396610 - type: integer - chatId: - description: chat ID - example: 12020721369@c.us - type: string - type: - description: type of the message - enum: - - chat - - interactive - - image - - video - - document - - audio - - sticker - - voice - example: chat - type: string - senderName: - description: Sender name - example: John - type: string - caption: - description: File caption or filename - example: photo.jpg - type: string - quotedMsgId: - description: ID of quoted message - example: ABGHYoIXMAmYTwIKOick9az6QYmt4R - type: string - type: object - SetMe: - example: - result: success - properties: - result: - example: success - nullable: false - type: string - type: object - SetMeRequest: - allOf: - - $ref: '#/components/schemas/MeComponents' - MeComponents: - properties: - about: - description: Profile`s About section. - example: Some about info - type: string - address: - description: Address of the business - example: "Neverland, Unexpected st." - type: string - description: - description: Description of the business. Max 256 characters - example: Some company description - type: string - email: - description: Business email - example: john@neverland.play - type: string - phone: - description: Linked phone number - example: "12020721369" - type: string - vertical: - description: Industry of the business - enum: - - Automotive - - "Beauty, Spa and Salon" - - Clothing and Apparel - - Education - - Entertainment - - Event Planning and Service - - Finance and Banking - - Food and Grocery - - Public Service - - Hotel and Lodging - - Medical and Health - - Non-profit - - Professional Services - - Shopping and Retail - - Travel and Transportation - - Restaurant - - Other - - "" - example: Other - type: string - photo: - description: "HTTP link\n*https://...*\n\nOr base64-encoded file with mime\ - \ data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* \n\ - \nFile in form-data input field" - type: string - type: object - GetMe: - allOf: - - $ref: '#/components/schemas/MeComponents' - - properties: - photo: - example: https://pps.whatsapp.net/sample.jpg - nullable: false - type: string - type: object - GetIP: - example: - result: 213.74.84.72 - properties: - result: - example: 213.74.84.72 - nullable: false - type: string - type: object - GetTemplates: - example: - total: 3 - templates: - - components: null - rejected_reason: NONE - name: start - namespace: ca300906_cfbc_410b_99fb_dcee8e13d578 - language: en - category: MARKETING - status: approved - - components: null - rejected_reason: NONE - name: start - namespace: ca300906_cfbc_410b_99fb_dcee8e13d578 - language: en - category: MARKETING - status: approved - properties: - total: - example: 3 - nullable: false - type: integer - templates: - items: - $ref: '#/components/schemas/GetTemplates_templates_inner' - type: array - type: object - channelStatistics: - example: - date: "03.2022" - templates_cost: 400.0313 - properties: - date: - example: "03.2022" - type: string - templates_cost: - example: 400.0313 - type: number - type: object - channelExtendedStatistics: - items: - $ref: '#/components/schemas/channelExtendedStatistics_inner' - type: array - channelStatus: - example: - status: connected - properties: - status: - description: channel Status - enum: - - connected - - connecting - - disconnected - - uninitialized - - unregistered - example: connected - type: string - type: object - RemoveTemplateRequest: - example: - name: start - properties: - name: - description: Template name - example: start - type: string - type: object - SendFileRequest: - allOf: - - properties: - body: - description: "HTTP link\n*https://...*\n\nOr base64-encoded file with\ - \ mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...*\ - \ \n\nFile in form-data input field" - type: string - filename: - description: "File name, for *example 1.jpg* or *hello.xlsx*" - type: string - caption: - description: "Text under the file. When sending an image сan be used with\ - \ mentionedPhones, example: this image for @556123122026" - type: string - required: - - body - - filename - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendListRequest: - allOf: - - properties: - body: - description: Main message text - example: Please choose option - type: string - header: - description: Header will be located above message text - example: Some options - type: string - footer: - description: Footer will be placed under message text - example: Thank you - type: string - action: - description: Action for open list - example: List - type: string - sections: - description: |- - Up to 10 sections from which the client can choose. - - Each section is object with fields: - - *title* - Title of section, up to 24 symbols. Required if there are more then 1 section - - *rows* - available options. Required - - - - Each option is object with fields: - - *id* - Unique id for option, up to 200 symbols. Required - - *title* - Title of option, up to 24 symbols. Required - - *description* - Description of option, up to 72 symbols - - - - Example: - - [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - example: - - title: Section 1 - rows: - - id: "1" - title: Option 1 - description: Description 1 - - title: Section 2 - rows: - - id: "2" - title: Option 2 - description: Description 2 - items: - $ref: '#/components/schemas/SendListRequest_allOf_sections' - type: array - required: - - action - - body - - sections - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendMessageRequest: - allOf: - - properties: - body: - description: "Message text, UTF-8 or UTF-16 string with emoji 🍏. Can\ - \ be used with mentionedPhones, example: this text for @556123122026" - type: string - required: - - body - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendLocationRequest: - allOf: - - properties: - lat: - description: "Latitude of the location. Example: 45.018337" - example: "45.018337" - type: string - lng: - description: "Longitude of the location. Example: -73.968285" - example: "-73.968285" - type: string - address: - description: "Address of the location. Only displayed if name is present.\ - \ Example: 9766 Valley View St., New York, NY 10024" - example: "9766 Valley View St., New York, NY 10024" - type: string - name: - description: "Name of the location. Example: Facebook HQ" - example: Facebook HQ - type: string - required: - - lat - - lng - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendContactRequest: - allOf: - - properties: - contacts: - description: |- - Array containing contact objects. - - Contact object parameters: - - **name** - full contact name. Required. Object with properties: - - * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) - - * first_name - First name. Example: Adam - - * last_name - Last name. Example: Smith - - * middle_name - Middle name. Example: John - - * suffix - Name suffix. Example: Junior - - * prefix - Name prefix. Example: Lord - - **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 - - **addresses** - array containing address objects with parameters: - - * street - Street number and name. Example: 1 Hacker Way - - * city - City name. Example: Menlo Park - - * state - State abbreviation. Example: CA - - * zip - ZIP code. Example: 94025 - - * country - Full country name. Example: United States - - * country_code - Two-letter country abbreviation. Example: us - - * type - Standard Values: HOME, WORK. Example: HOME - - **emails** - array containing email objects with parameters: - - * email - Email address. Example: test@fb.com - - * type - Standard Values: HOME, WORK. Example: WORK - - **org** - object containing parameters: - - * company - Name of the contact's company. Example: WhatsApp - - * department - Name of the contact's department. Example: Design - - * title - Contact's business title. Example: Manager - - **phones** - array containing phone objects with parameters: - - * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 - - * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME - - * wa_id - WhatsApp ID. Example: 19405551234 - - **urls** - array containing url objects with parameters: - - * url - URL. Example: https://www.facebook.com - - * type - Standard Values: HOME, WORK. Example: WORK - - Example: [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - example: "[{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United\ - \ States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker\ - \ Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\"\ - ,\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"\ - CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"\ - }],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\"\ - ,\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"\ - }],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\"\ - ,\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\"\ - :\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940)\ - \ 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"\ - type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\"\ - ,\"type\":\"WORK\"}]}]" - items: - type: object - type: array - required: - - body - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendMessageStatus: - example: - description: Message has been sent to the provider - id: gBGGeRhGZTEfAgkJCh2wAz4ZH-8 - message: Sent to 556123122026@c.us - sent: true - properties: - sent: - example: true - type: boolean - id: - description: unique message id - example: gBGGeRhGZTEfAgkJCh2wAz4ZH-8 - type: string - message: - description: Posting status message - example: Sent to 556123122026@c.us - type: string - description: - description: Result description - example: Message has been sent to the provider - type: string - type: object - SendTemplateRequest: - allOf: - - properties: - namespace: - description: Can be found by method /templates - example: ca300906_cfbc_410b_99fb_dcee1t39d578 - type: string - template: - description: Name of template - example: start - type: string - language: - $ref: '#/components/schemas/SendTemplateRequest_allOf_language' - params: - description: "Array of localizable parameters to be substituted into the\ - \ template. Each parameter is object contains the following field:\n\ - \n**type** - section of parameters - header, body, footer, button\n\n\ - **parameters** - variables for section.\n\nEach variable is an object\ - \ that can contain the following fields:\n\n**type** - can be text,\ - \ currency, date_time, image, document or video\n\n**video**- id (mediaId)\n\ - \n**document** \n\n* id (mediaId)\n\n* filename(optional)\n\n**image**\ - \ - object with field link (image url)\n\n**currency** - object containing\ - \ parameters currency_code and amount_1000.\n\n* *currency_code* - Currency\ - \ code as defined in ISO 4217.\n\n* *amount_1000* - Amount multiplied\ - \ by 1000.\n\n* *fallback_value* - Default text if localization fails.\n\ - \n**date_time** - If the date_time object is used, further definition\ - \ of the date and time is required.\n\n* *component* - The time is assembled\ - \ from components (i.e., day of the week, month, hour, etc.) The time\ - \ specified will be the same, regardless of the time zone the client\ - \ is in.\n\n* *unix_epoch* - The time to be displayed is dependent on\ - \ the time zone the client is in.\n\n* *fallback_value* - Default text\ - \ if localization fails.\n\n**button** - if button has parameter \n\n\ - * sub_type (url/quick_reply)\n\n* parameters (array to fill button variable)\n\ - \n* index - button position.\n\n**The number of parameters passed must\ - \ match the number of parameters in the template**" - items: - $ref: '#/components/schemas/SendTemplateRequest_allOf_params' - type: array - required: - - language - - namespace - - template - type: object - - $ref: '#/components/schemas/TemplateNamespaceField' - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - SendProductRequest: - allOf: - - properties: - action: - $ref: '#/components/schemas/SendProductRequest_allOf_action' - body: - description: "Text of message. Example: Some text." - example: Some text - type: string - footer: - description: "Located under the message text. Example: Footer." - example: Footer - type: string - header: - description: |- - Header of catalog. Example: Header. - - **Required when sending the catalog.** - example: Header - type: string - required: - - action - type: object - - $ref: '#/components/schemas/ChatIdProp' - - $ref: '#/components/schemas/PhoneProp' - Settings: - example: - webhookUrl: https://bin.1msg.io/1f9aj261 - properties: - webhookUrl: - example: https://bin.1msg.io/1f9aj261 - nullable: true - type: string - type: object - Commerce: - example: - params: - is_catalog_visible: true - is_cart_enabled: true - properties: - params: - $ref: '#/components/schemas/Commerce_params' - type: object - GetCommerce: - items: - $ref: '#/components/schemas/GetCommerce_inner' - type: array - SetCommerce: - example: - success: true - properties: - success: - example: true - type: boolean - type: object - SetWebhookStatus: - example: - set: true - message: https://bin.1msg.io/1f9aj261 - properties: - set: - description: Flag indicating that the current request has changed webhook - example: true - type: boolean - message: - example: https://bin.1msg.io/1f9aj261 - type: string - type: object - WebhookUrl: - example: - webhookUrl: webhookUrl - properties: - webhookUrl: - description: "Http or https URL for receiving notifications. For testing,\ - \ we recommend using [our RequestBin](http://bin.1msg.io)." - type: string - required: - - webhookUrl - type: object - Contacts: - properties: - contacts: - description: List of checked numbers - items: - $ref: '#/components/schemas/Contacts_contacts_inner' - type: array - type: object - ContactsRequest: - properties: - blocking: - description: |- - Operating mode: - - *wait* - synchronous - - *no_wait* - asynchronous (default) - example: wait - type: string - force_check: - description: |- - Using cache: - - *true* - ignore cache - - *false* - use cache (default) - example: true - type: boolean - contacts: - description: |- - Array of contact numbers for checking. Recommended format is +16315551001 - - Example: - - ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - example: - - "16315551000" - - +1 631 555 1001 - - "6315551002" - - +1 (631) 555-1004 - - 1-631-555-1005 - items: - type: string - type: array - required: - - contacts - type: object - ReadMessageRequest: - allOf: - - $ref: '#/components/schemas/MessageIdProp' - UploadMedia: - allOf: - - properties: - body: - description: "HTTP link\n*https://...*\n\nOr base64-encoded file with\ - \ mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...*\ - \ \n\nFile in form-data input field" - type: string - required: - - body - type: object - MediaId: - example: - mediaId: ed2c7be7-b779-4ba8-a17c-6722f37be2a7 - properties: - mediaId: - example: ed2c7be7-b779-4ba8-a17c-6722f37be2a7 - type: string - type: object - GetMessages: - example: - messages: - - metadata: {} - messageNumber: 1 - chatId: 556123122026@c.us - author: 556123122026@c.us - caption: caption - chatName: "556123122026" - fromMe: true - body: Test message - type: chat - quotedMsgId: quotedMsgId - senderName: 780005553535@c.us - self: 1 - id: 0XzkmGNn4prUAQlzsHApGNRXQ0U - time: 1665396610 - isForwarded: 0 - - metadata: {} - messageNumber: 1 - chatId: 556123122026@c.us - author: 556123122026@c.us - caption: caption - chatName: "556123122026" - fromMe: true - body: Test message - type: chat - quotedMsgId: quotedMsgId - senderName: 780005553535@c.us - self: 1 - id: 0XzkmGNn4prUAQlzsHApGNRXQ0U - time: 1665396610 - isForwarded: 0 - properties: - messages: - items: - $ref: '#/components/schemas/GetMessages_messages_inner' - type: array - type: object - GetAckInfo: - example: - hooks: - - id: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: message - pricing: - billable: true - category: business_initiated - pricing_model: CBP - conversation: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - status: sent - timestamp: "1654864094" - recipient_id: "556123122026" - - id: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: message - pricing: - billable: true - category: business_initiated - pricing_model: CBP - conversation: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - status: sent - timestamp: "1654864094" - recipient_id: "556123122026" - properties: - hooks: - items: - $ref: '#/components/schemas/GetAckInfo_hooks_inner' - type: array - type: object - getMe_401_response: - properties: - error: - example: Wrong token "xxx7i1crxjxpkxxx" for channel "123". Please provide - token as a GET parameter. - type: string - type: object - setSettings_200_response_allOf_update: - allOf: - - $ref: '#/components/schemas/Settings' - - description: An object that lists the fields changed in the request - setSettings_200_response: - allOf: - - $ref: '#/components/schemas/Settings' - - properties: - update: - $ref: '#/components/schemas/setSettings_200_response_allOf_update' - required: - - update - type: object - TemplateComponentsProp_inner_buttons_inner: - properties: - type: - enum: - - PHONE_NUMBER - - URL - - QUICK_REPLY - example: QUICK_REPLY - type: string - text: - example: phone-button-text - type: string - url: - example: "https://www.website.com/{{1}}" - type: string - phone_number: - example: +1(234) 235-5678 - type: string - example: - items: {} - type: array - type: object - TemplateComponentsProp_inner: - properties: - type: - enum: - - BODY - - HEADER - - FOOTER - - BUTTONS - example: BODY - type: string - format: - description: Only for HEADER type - enum: - - TEXT - - IMAGE - - DOCUMENT - - VIDEO - example: TEXT - type: string - text: - example: "header text {{1}}" - type: string - example: - type: object - buttons: - items: - $ref: '#/components/schemas/TemplateComponentsProp_inner_buttons_inner' - type: array - type: object - GetTemplates_templates_inner: - example: - components: null - rejected_reason: NONE - name: start - namespace: ca300906_cfbc_410b_99fb_dcee8e13d578 - language: en - category: MARKETING - status: approved - properties: - category: - $ref: '#/components/schemas/TemplateCategoryProp' - components: - $ref: '#/components/schemas/TemplateComponentsProp' - language: - $ref: '#/components/schemas/TemplateLanguageProp' - name: - example: start - type: string - namespace: - description: Can be found by method /templates - example: ca300906_cfbc_410b_99fb_dcee8e13d578 - type: string - rejected_reason: - example: NONE - type: string - status: - example: approved - type: string - type: object - channelExtendedStatistics_inner: - properties: - business_initiated_paid_quantity: - example: 1 - type: integer - business_initiated_price: - example: 0.0691 - type: number - business_initiated_quantity: - example: 2 - type: integer - free_entry_point: - example: 0 - type: integer - free_quantity: - example: 1 - type: integer - free_tier: - example: 1 - type: integer - paid_quantity: - example: 1 - type: integer - period_date: - example: 2022-11-01T00:00:00Z - type: string - quantity: - example: 2 - type: number - total_price: - example: 0.0691 - type: number - user_initiated_paid_quantity: - example: 1 - type: integer - user_initiated_price: - example: 0.0691 - type: number - user_initiated_quantity: - example: 2 - type: integer - type: object - SendListRequest_allOf_rows: - properties: - id: - description: "Unique id for option, up to 200 symbols" - example: "1" - type: string - title: - description: "Title of option, up to 24 symbols." - example: Some option - type: string - description: - description: "Description of option, up to 72 symbols" - example: Some description - type: string - required: - - id - - title - type: object - example: null - SendListRequest_allOf_sections: - properties: - title: - description: "Title of section, up to 24 symbols. Required if there are\ - \ more then 1 section" - example: Some title - type: string - rows: - items: - $ref: '#/components/schemas/SendListRequest_allOf_rows' - type: array - required: - - rows - type: object - example: null - SendTemplateRequest_allOf_language: - description: |- - Object, containing fields "policy" and "code". - - **policy** - now "deterministic" is only available option; - - **code** - one of supported language codes - properties: - policy: - enum: - - deterministic - example: deterministic - type: string - code: - $ref: '#/components/schemas/TemplateLanguageProp' - type: object - example: null - SendTemplateRequest_allOf_currency: - properties: - currency_code: - example: USD - type: string - amount_1000: - example: 100990 - type: integer - type: object - example: null - SendTemplateRequest_allOf_date_time_component: - properties: - day_of_week: - enum: - - MONDAY - - TUESDAY - - WEDNESDAY - - THURSDAY - - FRIDAY - - SATURDAY - - SUNDAY - - "1" - - "2" - - "3" - - "4" - - "5" - - "6" - - "7" - example: FRIDAY - type: string - year: - example: 2001 - type: integer - month: - example: 4 - type: integer - day_of_month: - example: 13 - type: integer - hour: - example: 17 - type: integer - minute: - example: 20 - type: integer - calendar: - enum: - - GREGORIAN - - SOLAR_HIJRI - example: GREGORIAN - type: string - type: object - example: null - SendTemplateRequest_allOf_date_time_unix_epoch: - properties: - timestamp: - example: 987168000 - type: integer - type: object - example: null - SendTemplateRequest_allOf_date_time: - properties: - component: - $ref: '#/components/schemas/SendTemplateRequest_allOf_date_time_component' - unix_epoch: - $ref: '#/components/schemas/SendTemplateRequest_allOf_date_time_unix_epoch' - type: object - example: null - SendTemplateRequest_allOf_params: - properties: - default: - example: Some title - type: string - currency: - $ref: '#/components/schemas/SendTemplateRequest_allOf_currency' - date_time: - $ref: '#/components/schemas/SendTemplateRequest_allOf_date_time' - type: object - example: null - SendProductRequest_allOf_action_product_items: - properties: - product_retailer_id: - description: id of the product - example: product-1 - type: string - type: object - example: null - SendProductRequest_allOf_action_sections: - properties: - title: - description: "Title of the section. Example: the-section-title" - example: the-section-title - type: string - product_items: - items: - $ref: '#/components/schemas/SendProductRequest_allOf_action_product_items' - type: array - type: object - example: null - SendProductRequest_allOf_action: - description: |- - Object containing info about product or catalog. Can contain the following fields: - - **catalog_id** - id of catalog - - **product_retailer_id** - id of product. Only for sending single product. - - **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. - - Example: {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]} - example: "{\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\"\ - ,\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\"\ - :\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"\ - product_retailer_id\":\"{{SKU-1}}\"}]}]}" - properties: - catalog_id: - description: id of the catalog - example: "407921857496983" - type: string - product_retailer_id: - description: id of the product - example: product-1 - type: string - sections: - items: - $ref: '#/components/schemas/SendProductRequest_allOf_action_sections' - type: array - type: object - Commerce_params: - example: - is_catalog_visible: true - is_cart_enabled: true - properties: - is_cart_enabled: - example: true - type: boolean - is_catalog_visible: - example: true - type: boolean - required: - - is_cart_enabled - - is_catalog_visible - type: object - GetCommerce_inner: - properties: - id: - example: "789887292550821" - type: string - is_cart_enabled: - example: true - type: boolean - is_catalog_visible: - example: true - type: boolean - type: object - Contacts_contacts_inner: - properties: - input: - description: Sent value - example: "16315551000" - type: string - status: - description: "Contacts status: \n\n*failed* - got error on processing\n\n\ - *processing* - still not detected\n\n*invalid* - unavailable for sending\n\ - \n*valid* - available for sending" - example: valid - type: string - wa_id: - description: Formatted contact phone - example: "16315551000" - type: string - type: object - GetMessages_messages_inner: - example: - metadata: {} - messageNumber: 1 - chatId: 556123122026@c.us - author: 556123122026@c.us - caption: caption - chatName: "556123122026" - fromMe: true - body: Test message - type: chat - quotedMsgId: quotedMsgId - senderName: 780005553535@c.us - self: 1 - id: 0XzkmGNn4prUAQlzsHApGNRXQ0U - time: 1665396610 - isForwarded: 0 - properties: - messageNumber: - example: 1 - type: integer - id: - example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - type: string - body: - example: Test message - type: string - fromMe: - example: true - type: boolean - self: - example: 1 - type: integer - isForwarded: - example: 0 - type: integer - author: - example: 556123122026@c.us - type: string - time: - example: 1665396610 - type: integer - chatId: - example: 556123122026@c.us - type: string - type: - example: chat - type: string - senderName: - example: 780005553535@c.us - type: string - caption: - type: string - example: null - quotedMsgId: - type: string - example: null - metadata: - example: {} - type: object - chatName: - example: "556123122026" - type: string - type: object - GetAckInfo_hooks_inner: - example: - id: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: message - pricing: - billable: true - category: business_initiated - pricing_model: CBP - conversation: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - status: sent - timestamp: "1654864094" - recipient_id: "556123122026" - properties: - id: - example: gBGGeSaGViBfAgnlzOSHEwK9O6F - type: string - type: - example: message - type: string - status: - example: sent - type: string - pricing: - example: - billable: true - category: business_initiated - pricing_model: CBP - type: object - timestamp: - example: "1654864094" - type: string - conversation: - example: - id: c1f5a3a1b9ff6f2e1c43fd31543137e0 - origin: - type: business_initiated - expiration_timestamp: 1654943940 - type: object - recipient_id: - example: "556123122026" - type: string - type: object - securitySchemes: - token: - in: query - name: token - type: apiKey - diff --git a/java/build.gradle b/java/build.gradle deleted file mode 100644 index 5744df6..0000000 --- a/java/build.gradle +++ /dev/null @@ -1,168 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' -apply plugin: 'java' -apply plugin: 'com.diffplug.spotless' - -group = 'io.onemessage' -version = '2.39.0' - -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' - } -} - -repositories { - mavenCentral() -} -sourceSets { - main.java.srcDirs = ['src/main/java'] -} - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task) - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven-publish' - - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - publishing { - publications { - maven(MavenPublication) { - artifactId = 'onemessage-java-client' - from components.java - } - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - jakarta_annotation_version = "1.3.5" -} - -dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' - implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' - implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.8.5' - implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' - implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' - testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' -} - -javadoc { - options.tags = [ "http.response.details:a:Http Response Details" ] -} - -// Use spotless plugin to automatically format code, remove unused import, etc -// To apply changes directly to the file, run `gradlew spotlessApply` -// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle -spotless { - // comment out below to run spotless as part of the `check` task - enforceCheck false - - format 'misc', { - // define the files (e.g. '*.gradle', '*.md') to apply `misc` to - target '.gitignore' - - // define the steps to apply to those files - trimTrailingWhitespace() - indentWithSpaces() // Takes an integer argument if you don't like 4 - endWithNewline() - } - java { - // don't need to set target, it is inferred from java - - // apply a specific flavor of google-java-format - googleJavaFormat('1.8').aosp().reflowLongStrings() - - removeUnusedImports() - importOrder() - } -} - -test { - // Enable JUnit 5 (Gradle 4.6+). - useJUnitPlatform() - - // Always run tests, even when nothing changed. - dependsOn 'cleanTest' - - // Show test results. - testLogging { - events "passed", "skipped", "failed" - } - -} diff --git a/java/build.sbt b/java/build.sbt deleted file mode 100644 index 7031844..0000000 --- a/java/build.sbt +++ /dev/null @@ -1,28 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "io.onemessage", - name := "onemessage-java-client", - version := "2.39.0", - scalaVersion := "2.11.4", - scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, - resolvers += Resolver.mavenLocal, - libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", - "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", - "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.6", - "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", - "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test", - "org.mockito" % "mockito-core" % "3.12.4" % "test" - ) - ) diff --git a/java/docs/Ack.md b/java/docs/Ack.md deleted file mode 100644 index 76bb48c..0000000 --- a/java/docs/Ack.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# Ack - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | unique id of message | [optional] | -|**chatId** | **String** | chat ID | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | type of the message status | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| DELIVERED | "delivered" | -| VIEWED | "viewed" | -| SENT | "sent" | - - - diff --git a/java/docs/AddTemplateRequest.md b/java/docs/AddTemplateRequest.md deleted file mode 100644 index 3b440b4..0000000 --- a/java/docs/AddTemplateRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AddTemplateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of template | [optional] | -|**category** | **TemplateCategoryProp** | | [optional] | -|**components** | **TemplateComponentsProp** | | [optional] | -|**language** | **TemplateLanguageProp** | | [optional] | - - - diff --git a/java/docs/ChannelApi.md b/java/docs/ChannelApi.md deleted file mode 100644 index 92ccba2..0000000 --- a/java/docs/ChannelApi.md +++ /dev/null @@ -1,620 +0,0 @@ -# ChannelApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getCommerce**](ChannelApi.md#getCommerce) | **GET** /commerce | Get Commerce Settings | -| [**getExtendedStatistics**](ChannelApi.md#getExtendedStatistics) | **GET** /extendedStatistics | Get Extended Channel statistics | -| [**getMe**](ChannelApi.md#getMe) | **GET** /me | Get Profile Info | -| [**getSettings**](ChannelApi.md#getSettings) | **GET** /settings | Get Settings | -| [**getStatistics**](ChannelApi.md#getStatistics) | **GET** /statistics | Get Channel statistics | -| [**getStatus**](ChannelApi.md#getStatus) | **GET** /status | Get Status | -| [**outputIP**](ChannelApi.md#outputIP) | **GET** /outputIP | Get channel server IP | -| [**setMe**](ChannelApi.md#setMe) | **POST** /me | Change user info | -| [**setSettings**](ChannelApi.md#setSettings) | **POST** /settings | Set settings | - - - -# **getCommerce** -> GetCommerce getCommerce() - -Get Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - GetCommerce result = apiInstance.getCommerce(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getCommerce"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetCommerce**](GetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **getExtendedStatistics** -> ChannelExtendedStatistics getExtendedStatistics() - -Get Extended Channel statistics - -Get channel usage extended statistics - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - ChannelExtendedStatistics result = apiInstance.getExtendedStatistics(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getExtendedStatistics"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ChannelExtendedStatistics**](ChannelExtendedStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **getMe** -> GetMe getMe() - -Get Profile Info - -Use this edge to retrieve your profile's About info - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - GetMe result = apiInstance.getMe(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getMe"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetMe**](GetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **getSettings** -> Settings getSettings() - -Get Settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - Settings result = apiInstance.getSettings(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getSettings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Settings**](Settings.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **getStatistics** -> ChannelStatistics getStatistics(date) - -Get Channel statistics - -Get channel usage statistics - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - String date = "03.2022"; // String | Month and year in format mm.YYYY. - try { - ChannelStatistics result = apiInstance.getStatistics(date); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getStatistics"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **date** | **String**| Month and year in format mm.YYYY. | [optional] | - -### Return type - -[**ChannelStatistics**](ChannelStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **getStatus** -> ChannelStatus getStatus() - - Get Status - -Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - ChannelStatus result = apiInstance.getStatus(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#getStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ChannelStatus**](ChannelStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **outputIP** -> GetIP outputIP() - -Get channel server IP - - - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - try { - GetIP result = apiInstance.outputIP(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#outputIP"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetIP**](GetIP.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **setMe** -> SetMe setMe(setMeRequest) - -Change user info - -Change user info - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - SetMeRequest setMeRequest = new SetMeRequest(); // SetMeRequest | - try { - SetMe result = apiInstance.setMe(setMeRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#setMe"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **setMeRequest** | [**SetMeRequest**](SetMeRequest.md)| | | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **setSettings** -> SetSettings200Response setSettings(settings) - -Set settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ChannelApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ChannelApi apiInstance = new ChannelApi(defaultClient); - Settings settings = new Settings(); // Settings | - try { - SetSettings200Response result = apiInstance.setSettings(settings); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ChannelApi#setSettings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **settings** | [**Settings**](Settings.md)| | | - -### Return type - -[**SetSettings200Response**](SetSettings200Response.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - diff --git a/java/docs/ChannelExtendedStatistics.md b/java/docs/ChannelExtendedStatistics.md deleted file mode 100644 index 7dcdc42..0000000 --- a/java/docs/ChannelExtendedStatistics.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# ChannelExtendedStatistics - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/java/docs/ChannelExtendedStatisticsInner.md b/java/docs/ChannelExtendedStatisticsInner.md deleted file mode 100644 index 7ad35c3..0000000 --- a/java/docs/ChannelExtendedStatisticsInner.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# ChannelExtendedStatisticsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**businessInitiatedPaidQuantity** | **Integer** | | [optional] | -|**businessInitiatedPrice** | **BigDecimal** | | [optional] | -|**businessInitiatedQuantity** | **Integer** | | [optional] | -|**freeEntryPoint** | **Integer** | | [optional] | -|**freeQuantity** | **Integer** | | [optional] | -|**freeTier** | **Integer** | | [optional] | -|**paidQuantity** | **Integer** | | [optional] | -|**periodDate** | **String** | | [optional] | -|**quantity** | **BigDecimal** | | [optional] | -|**totalPrice** | **BigDecimal** | | [optional] | -|**userInitiatedPaidQuantity** | **Integer** | | [optional] | -|**userInitiatedPrice** | **BigDecimal** | | [optional] | -|**userInitiatedQuantity** | **Integer** | | [optional] | - - - diff --git a/java/docs/ChannelStatistics.md b/java/docs/ChannelStatistics.md deleted file mode 100644 index d145cc9..0000000 --- a/java/docs/ChannelStatistics.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ChannelStatistics - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**date** | **String** | | [optional] | -|**templatesCost** | **BigDecimal** | | [optional] | - - - diff --git a/java/docs/ChannelStatus.md b/java/docs/ChannelStatus.md deleted file mode 100644 index e7e9953..0000000 --- a/java/docs/ChannelStatus.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# ChannelStatus - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | channel Status | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| CONNECTED | "connected" | -| CONNECTING | "connecting" | -| DISCONNECTED | "disconnected" | -| UNINITIALIZED | "uninitialized" | -| UNREGISTERED | "unregistered" | - - - diff --git a/java/docs/ChatIdProp.md b/java/docs/ChatIdProp.md deleted file mode 100644 index d655552..0000000 --- a/java/docs/ChatIdProp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ChatIdProp - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | - - - diff --git a/java/docs/Commerce.md b/java/docs/Commerce.md deleted file mode 100644 index f708ed2..0000000 --- a/java/docs/Commerce.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Commerce - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**params** | [**CommerceParams**](CommerceParams.md) | | [optional] | - - - diff --git a/java/docs/CommerceParams.md b/java/docs/CommerceParams.md deleted file mode 100644 index 7371b2b..0000000 --- a/java/docs/CommerceParams.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CommerceParams - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**isCartEnabled** | **Boolean** | | | -|**isCatalogVisible** | **Boolean** | | | - - - diff --git a/java/docs/Contacts.md b/java/docs/Contacts.md deleted file mode 100644 index f1cc6b3..0000000 --- a/java/docs/Contacts.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Contacts - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**contacts** | [**List<ContactsContactsInner>**](ContactsContactsInner.md) | List of checked numbers | [optional] | - - - diff --git a/java/docs/ContactsContactsInner.md b/java/docs/ContactsContactsInner.md deleted file mode 100644 index ce9071e..0000000 --- a/java/docs/ContactsContactsInner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ContactsContactsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**input** | **String** | Sent value | [optional] | -|**status** | **String** | Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending | [optional] | -|**waId** | **String** | Formatted contact phone | [optional] | - - - diff --git a/java/docs/ContactsRequest.md b/java/docs/ContactsRequest.md deleted file mode 100644 index a028b2c..0000000 --- a/java/docs/ContactsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ContactsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**blocking** | **String** | Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) | [optional] | -|**forceCheck** | **Boolean** | Using cache: *true* - ignore cache *false* - use cache (default) | [optional] | -|**contacts** | **List<String>** | Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] | | - - - diff --git a/java/docs/GetAckInfo.md b/java/docs/GetAckInfo.md deleted file mode 100644 index 0b9596c..0000000 --- a/java/docs/GetAckInfo.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# GetAckInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hooks** | [**List<GetAckInfoHooksInner>**](GetAckInfoHooksInner.md) | | [optional] | - - - diff --git a/java/docs/GetAckInfoHooksInner.md b/java/docs/GetAckInfoHooksInner.md deleted file mode 100644 index fa2fb51..0000000 --- a/java/docs/GetAckInfoHooksInner.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# GetAckInfoHooksInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**pricing** | **Object** | | [optional] | -|**timestamp** | **String** | | [optional] | -|**conversation** | **Object** | | [optional] | -|**recipientId** | **String** | | [optional] | - - - diff --git a/java/docs/GetCommerce.md b/java/docs/GetCommerce.md deleted file mode 100644 index cde0dfc..0000000 --- a/java/docs/GetCommerce.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# GetCommerce - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/java/docs/GetCommerceInner.md b/java/docs/GetCommerceInner.md deleted file mode 100644 index e7b4e31..0000000 --- a/java/docs/GetCommerceInner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# GetCommerceInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**isCartEnabled** | **Boolean** | | [optional] | -|**isCatalogVisible** | **Boolean** | | [optional] | - - - diff --git a/java/docs/GetIP.md b/java/docs/GetIP.md deleted file mode 100644 index 641af6b..0000000 --- a/java/docs/GetIP.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# GetIP - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**result** | **String** | | [optional] | - - - diff --git a/java/docs/GetMe.md b/java/docs/GetMe.md deleted file mode 100644 index 1014186..0000000 --- a/java/docs/GetMe.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# GetMe - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**about** | **String** | Profile`s About section. | [optional] | -|**address** | **String** | Address of the business | [optional] | -|**description** | **String** | Description of the business. Max 256 characters | [optional] | -|**email** | **String** | Business email | [optional] | -|**phone** | **String** | Linked phone number | [optional] | -|**vertical** | [**VerticalEnum**](#VerticalEnum) | Industry of the business | [optional] | -|**photo** | **String** | | [optional] | - - - -## Enum: VerticalEnum - -| Name | Value | -|---- | -----| -| AUTOMOTIVE | "Automotive" | -| BEAUTY_SPA_AND_SALON | "Beauty, Spa and Salon" | -| CLOTHING_AND_APPAREL | "Clothing and Apparel" | -| EDUCATION | "Education" | -| ENTERTAINMENT | "Entertainment" | -| EVENT_PLANNING_AND_SERVICE | "Event Planning and Service" | -| FINANCE_AND_BANKING | "Finance and Banking" | -| FOOD_AND_GROCERY | "Food and Grocery" | -| PUBLIC_SERVICE | "Public Service" | -| HOTEL_AND_LODGING | "Hotel and Lodging" | -| MEDICAL_AND_HEALTH | "Medical and Health" | -| NON_PROFIT | "Non-profit" | -| PROFESSIONAL_SERVICES | "Professional Services" | -| SHOPPING_AND_RETAIL | "Shopping and Retail" | -| TRAVEL_AND_TRANSPORTATION | "Travel and Transportation" | -| RESTAURANT | "Restaurant" | -| OTHER | "Other" | -| EMPTY | "" | - - - diff --git a/java/docs/GetMe401Response.md b/java/docs/GetMe401Response.md deleted file mode 100644 index 5d35a3d..0000000 --- a/java/docs/GetMe401Response.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# GetMe401Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**error** | **String** | | [optional] | - - - diff --git a/java/docs/GetMessages.md b/java/docs/GetMessages.md deleted file mode 100644 index 79f1664..0000000 --- a/java/docs/GetMessages.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# GetMessages - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**messages** | [**List<GetMessagesMessagesInner>**](GetMessagesMessagesInner.md) | | [optional] | - - - diff --git a/java/docs/GetMessagesMessagesInner.md b/java/docs/GetMessagesMessagesInner.md deleted file mode 100644 index 34325c9..0000000 --- a/java/docs/GetMessagesMessagesInner.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# GetMessagesMessagesInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**messageNumber** | **Integer** | | [optional] | -|**id** | **String** | | [optional] | -|**body** | **String** | | [optional] | -|**fromMe** | **Boolean** | | [optional] | -|**self** | **Integer** | | [optional] | -|**isForwarded** | **Integer** | | [optional] | -|**author** | **String** | | [optional] | -|**time** | **Integer** | | [optional] | -|**chatId** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**senderName** | **String** | | [optional] | -|**caption** | **String** | | [optional] | -|**quotedMsgId** | **String** | | [optional] | -|**metadata** | **Object** | | [optional] | -|**chatName** | **String** | | [optional] | - - - diff --git a/java/docs/GetTemplates.md b/java/docs/GetTemplates.md deleted file mode 100644 index cf2957d..0000000 --- a/java/docs/GetTemplates.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetTemplates - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **Integer** | | [optional] | -|**templates** | [**List<GetTemplatesTemplatesInner>**](GetTemplatesTemplatesInner.md) | | [optional] | - - - diff --git a/java/docs/GetTemplatesTemplatesInner.md b/java/docs/GetTemplatesTemplatesInner.md deleted file mode 100644 index 68609da..0000000 --- a/java/docs/GetTemplatesTemplatesInner.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# GetTemplatesTemplatesInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**category** | **TemplateCategoryProp** | | [optional] | -|**components** | **TemplateComponentsProp** | | [optional] | -|**language** | **TemplateLanguageProp** | | [optional] | -|**name** | **String** | | [optional] | -|**namespace** | **String** | Can be found by method /templates | [optional] | -|**rejectedReason** | **String** | | [optional] | -|**status** | **String** | | [optional] | - - - diff --git a/java/docs/MeComponents.md b/java/docs/MeComponents.md deleted file mode 100644 index 1b9a794..0000000 --- a/java/docs/MeComponents.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# MeComponents - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**about** | **String** | Profile`s About section. | [optional] | -|**address** | **String** | Address of the business | [optional] | -|**description** | **String** | Description of the business. Max 256 characters | [optional] | -|**email** | **String** | Business email | [optional] | -|**phone** | **String** | Linked phone number | [optional] | -|**vertical** | [**VerticalEnum**](#VerticalEnum) | Industry of the business | [optional] | -|**photo** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] | - - - -## Enum: VerticalEnum - -| Name | Value | -|---- | -----| -| AUTOMOTIVE | "Automotive" | -| BEAUTY_SPA_AND_SALON | "Beauty, Spa and Salon" | -| CLOTHING_AND_APPAREL | "Clothing and Apparel" | -| EDUCATION | "Education" | -| ENTERTAINMENT | "Entertainment" | -| EVENT_PLANNING_AND_SERVICE | "Event Planning and Service" | -| FINANCE_AND_BANKING | "Finance and Banking" | -| FOOD_AND_GROCERY | "Food and Grocery" | -| PUBLIC_SERVICE | "Public Service" | -| HOTEL_AND_LODGING | "Hotel and Lodging" | -| MEDICAL_AND_HEALTH | "Medical and Health" | -| NON_PROFIT | "Non-profit" | -| PROFESSIONAL_SERVICES | "Professional Services" | -| SHOPPING_AND_RETAIL | "Shopping and Retail" | -| TRAVEL_AND_TRANSPORTATION | "Travel and Transportation" | -| RESTAURANT | "Restaurant" | -| OTHER | "Other" | -| EMPTY | "" | - - - diff --git a/java/docs/MediaApi.md b/java/docs/MediaApi.md deleted file mode 100644 index 564d055..0000000 --- a/java/docs/MediaApi.md +++ /dev/null @@ -1,78 +0,0 @@ -# MediaApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**uploadMedia**](MediaApi.md#uploadMedia) | **POST** /uploadMedia | Upload media & get mediaId | - - - -# **uploadMedia** -> MediaId uploadMedia(uploadMedia) - -Upload media & get mediaId - -Upload media and get mediaId. Uploaded media can be sent in template - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MediaApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MediaApi apiInstance = new MediaApi(defaultClient); - UploadMedia uploadMedia = new UploadMedia(); // UploadMedia | - try { - MediaId result = apiInstance.uploadMedia(uploadMedia); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MediaApi#uploadMedia"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **uploadMedia** | [**UploadMedia**](UploadMedia.md)| | | - -### Return type - -[**MediaId**](MediaId.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - diff --git a/java/docs/MediaId.md b/java/docs/MediaId.md deleted file mode 100644 index c5cb1e5..0000000 --- a/java/docs/MediaId.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MediaId - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**mediaId** | **String** | | [optional] | - - - diff --git a/java/docs/Message.md b/java/docs/Message.md deleted file mode 100644 index f3cbef0..0000000 --- a/java/docs/Message.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# Message - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | unique id | [optional] | -|**body** | **String** | text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" | [optional] | -|**fromMe** | **Boolean** | true - outgoing, false - incoming | [optional] | -|**self** | **Integer** | 1 - generated by api, 0 - generated by app | [optional] | -|**isForwarded** | **Boolean** | true - forwarded message, false - direct message | [optional] | -|**author** | **String** | Author ID of the message | [optional] | -|**time** | **Integer** | send time, unix timestamp | [optional] | -|**chatId** | **String** | chat ID | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | type of the message | [optional] | -|**senderName** | **String** | Sender name | [optional] | -|**caption** | **String** | File caption or filename | [optional] | -|**quotedMsgId** | **String** | ID of quoted message | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| CHAT | "chat" | -| INTERACTIVE | "interactive" | -| IMAGE | "image" | -| VIDEO | "video" | -| DOCUMENT | "document" | -| AUDIO | "audio" | -| STICKER | "sticker" | -| VOICE | "voice" | - - - diff --git a/java/docs/MessageIdProp.md b/java/docs/MessageIdProp.md deleted file mode 100644 index c59a7e7..0000000 --- a/java/docs/MessageIdProp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MessageIdProp - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**messageId** | **String** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] | - - - diff --git a/java/docs/MessagingApi.md b/java/docs/MessagingApi.md deleted file mode 100644 index 2c24c36..0000000 --- a/java/docs/MessagingApi.md +++ /dev/null @@ -1,514 +0,0 @@ -# MessagingApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**messagesList**](MessagingApi.md#messagesList) | **GET** /messages | Get messages list | -| [**readMessage**](MessagingApi.md#readMessage) | **POST** /readMessage | Mark message as read | -| [**sendContact**](MessagingApi.md#sendContact) | **POST** /sendContact | Send a Contact | -| [**sendFile**](MessagingApi.md#sendFile) | **POST** /sendFile | Send a File | -| [**sendList**](MessagingApi.md#sendList) | **POST** /sendList | Send List Message | -| [**sendLocation**](MessagingApi.md#sendLocation) | **POST** /sendLocation | Send a Location | -| [**sendMessage**](MessagingApi.md#sendMessage) | **POST** /sendMessage | Send a Message | - - - -# **messagesList** -> GetMessages messagesList(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId) - -Get messages list - - - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - Boolean last = true; // Boolean | Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. - Integer lastMessageNumber = 100; // Integer | The lastMessageNumber parameter from the last response. Example: 100 - Integer firstMessageNumber = 1; // Integer | The firstMessageNumber parameter from the last response. Example: 1 - Integer limit = 200; // Integer | Sets length of the message list. Default 100. With value 0 returns all messages. - String chatId = "556123122026@c.us"; // String | Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us - Integer minTime = 1665396610; // Integer | Filter messages received after specified time. Example: 1665396610 - Integer maxTime = 1665396610; // Integer | Filter messages received before specified time. Example: 1665396610 - String msgId = "0XzkmGNn4prUAQlzsHApGNRXQ0U"; // String | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - try { - GetMessages result = apiInstance.messagesList(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#messagesList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **last** | **Boolean**| Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. | [optional] | -| **lastMessageNumber** | **Integer**| The lastMessageNumber parameter from the last response. Example: 100 | [optional] | -| **firstMessageNumber** | **Integer**| The firstMessageNumber parameter from the last response. Example: 1 | [optional] | -| **limit** | **Integer**| Sets length of the message list. Default 100. With value 0 returns all messages. | [optional] | -| **chatId** | **String**| Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us | [optional] | -| **minTime** | **Integer**| Filter messages received after specified time. Example: 1665396610 | [optional] | -| **maxTime** | **Integer**| Filter messages received before specified time. Example: 1665396610 | [optional] | -| **msgId** | **String**| Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] | - -### Return type - -[**GetMessages**](GetMessages.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **readMessage** -> SetMe readMessage(readMessageRequest) - -Mark message as read - - - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - ReadMessageRequest readMessageRequest = new ReadMessageRequest(); // ReadMessageRequest | - try { - SetMe result = apiInstance.readMessage(readMessageRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#readMessage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **readMessageRequest** | [**ReadMessageRequest**](ReadMessageRequest.md)| | [optional] | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **sendContact** -> SendMessageStatus sendContact(sendContactRequest) - -Send a Contact - -Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - SendContactRequest sendContactRequest = new SendContactRequest(); // SendContactRequest | - try { - SendMessageStatus result = apiInstance.sendContact(sendContactRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#sendContact"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendContactRequest** | [**SendContactRequest**](SendContactRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **sendFile** -> SendMessageStatus sendFile(sendFileRequest) - -Send a File - -Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - SendFileRequest sendFileRequest = new SendFileRequest(); // SendFileRequest | - try { - SendMessageStatus result = apiInstance.sendFile(sendFileRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#sendFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendFileRequest** | [**SendFileRequest**](SendFileRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **sendList** -> SendMessageStatus sendList(sendListRequest) - -Send List Message - -Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - SendListRequest sendListRequest = new SendListRequest(); // SendListRequest | - try { - SendMessageStatus result = apiInstance.sendList(sendListRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#sendList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendListRequest** | [**SendListRequest**](SendListRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **sendLocation** -> SendMessageStatus sendLocation(sendLocationRequest) - -Send a Location - -Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - SendLocationRequest sendLocationRequest = new SendLocationRequest(); // SendLocationRequest | - try { - SendMessageStatus result = apiInstance.sendLocation(sendLocationRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#sendLocation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendLocationRequest** | [**SendLocationRequest**](SendLocationRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **sendMessage** -> SendMessageStatus sendMessage(sendMessageRequest) - -Send a Message - -Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.MessagingApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - MessagingApi apiInstance = new MessagingApi(defaultClient); - SendMessageRequest sendMessageRequest = new SendMessageRequest(); // SendMessageRequest | - try { - SendMessageStatus result = apiInstance.sendMessage(sendMessageRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MessagingApi#sendMessage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendMessageRequest** | [**SendMessageRequest**](SendMessageRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - diff --git a/java/docs/PhoneProp.md b/java/docs/PhoneProp.md deleted file mode 100644 index 4611bd2..0000000 --- a/java/docs/PhoneProp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PhoneProp - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | - - - diff --git a/java/docs/ProductsCatalogsApi.md b/java/docs/ProductsCatalogsApi.md deleted file mode 100644 index 581e784..0000000 --- a/java/docs/ProductsCatalogsApi.md +++ /dev/null @@ -1,149 +0,0 @@ -# ProductsCatalogsApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**sendProduct**](ProductsCatalogsApi.md#sendProduct) | **POST** /sendProduct | Send a Product | -| [**setCommerce**](ProductsCatalogsApi.md#setCommerce) | **POST** /commerce | Set Commerce Settings | - - - -# **sendProduct** -> SendMessageStatus sendProduct(sendProductRequest) - -Send a Product - -Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ProductsCatalogsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ProductsCatalogsApi apiInstance = new ProductsCatalogsApi(defaultClient); - SendProductRequest sendProductRequest = new SendProductRequest(); // SendProductRequest | - try { - SendMessageStatus result = apiInstance.sendProduct(sendProductRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProductsCatalogsApi#sendProduct"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendProductRequest** | [**SendProductRequest**](SendProductRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **setCommerce** -> SetCommerce setCommerce(commerce) - -Set Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.ProductsCatalogsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - ProductsCatalogsApi apiInstance = new ProductsCatalogsApi(defaultClient); - Commerce commerce = new Commerce(); // Commerce | - try { - SetCommerce result = apiInstance.setCommerce(commerce); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProductsCatalogsApi#setCommerce"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **commerce** | [**Commerce**](Commerce.md)| | | - -### Return type - -[**SetCommerce**](SetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - diff --git a/java/docs/ReadMessageRequest.md b/java/docs/ReadMessageRequest.md deleted file mode 100644 index 1e0a2db..0000000 --- a/java/docs/ReadMessageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ReadMessageRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**messageId** | **String** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] | - - - diff --git a/java/docs/RemoveTemplateRequest.md b/java/docs/RemoveTemplateRequest.md deleted file mode 100644 index 41fae35..0000000 --- a/java/docs/RemoveTemplateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RemoveTemplateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Template name | [optional] | - - - diff --git a/java/docs/SendContactRequest.md b/java/docs/SendContactRequest.md deleted file mode 100644 index 5bf98de..0000000 --- a/java/docs/SendContactRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SendContactRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**contacts** | **List<Object>** | Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] | [optional] | - - - diff --git a/java/docs/SendFileRequest.md b/java/docs/SendFileRequest.md deleted file mode 100644 index 15b5190..0000000 --- a/java/docs/SendFileRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# SendFileRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**body** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | | -|**filename** | **String** | File name, for *example 1.jpg* or *hello.xlsx* | | -|**caption** | **String** | Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 | [optional] | - - - diff --git a/java/docs/SendListRequest.md b/java/docs/SendListRequest.md deleted file mode 100644 index 841f690..0000000 --- a/java/docs/SendListRequest.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# SendListRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**body** | **String** | Main message text | | -|**header** | **String** | Header will be located above message text | [optional] | -|**footer** | **String** | Footer will be placed under message text | [optional] | -|**action** | **String** | Action for open list | | -|**sections** | [**List<SendListRequestAllOfSections>**](SendListRequestAllOfSections.md) | Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] | | - - - diff --git a/java/docs/SendListRequestAllOfRows.md b/java/docs/SendListRequestAllOfRows.md deleted file mode 100644 index 9810aca..0000000 --- a/java/docs/SendListRequestAllOfRows.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SendListRequestAllOfRows - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique id for option, up to 200 symbols | | -|**title** | **String** | Title of option, up to 24 symbols. | | -|**description** | **String** | Description of option, up to 72 symbols | [optional] | - - - diff --git a/java/docs/SendListRequestAllOfSections.md b/java/docs/SendListRequestAllOfSections.md deleted file mode 100644 index c8ce90c..0000000 --- a/java/docs/SendListRequestAllOfSections.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SendListRequestAllOfSections - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**title** | **String** | Title of section, up to 24 symbols. Required if there are more then 1 section | [optional] | -|**rows** | [**List<SendListRequestAllOfRows>**](SendListRequestAllOfRows.md) | | | - - - diff --git a/java/docs/SendLocationRequest.md b/java/docs/SendLocationRequest.md deleted file mode 100644 index 1e9a921..0000000 --- a/java/docs/SendLocationRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# SendLocationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**lat** | **String** | Latitude of the location. Example: 45.018337 | | -|**lng** | **String** | Longitude of the location. Example: -73.968285 | | -|**address** | **String** | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 | [optional] | -|**name** | **String** | Name of the location. Example: Facebook HQ | [optional] | - - - diff --git a/java/docs/SendMessageRequest.md b/java/docs/SendMessageRequest.md deleted file mode 100644 index d498dfa..0000000 --- a/java/docs/SendMessageRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SendMessageRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**body** | **String** | Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 | | - - - diff --git a/java/docs/SendMessageStatus.md b/java/docs/SendMessageStatus.md deleted file mode 100644 index 79949ff..0000000 --- a/java/docs/SendMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SendMessageStatus - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sent** | **Boolean** | | [optional] | -|**id** | **String** | unique message id | [optional] | -|**message** | **String** | Posting status message | [optional] | -|**description** | **String** | Result description | [optional] | - - - diff --git a/java/docs/SendProductRequest.md b/java/docs/SendProductRequest.md deleted file mode 100644 index 7cf3b95..0000000 --- a/java/docs/SendProductRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# SendProductRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**action** | [**SendProductRequestAllOfAction**](SendProductRequestAllOfAction.md) | | | -|**body** | **String** | Text of message. Example: Some text. | [optional] | -|**footer** | **String** | Located under the message text. Example: Footer. | [optional] | -|**header** | **String** | Header of catalog. Example: Header. **Required when sending the catalog.** | [optional] | - - - diff --git a/java/docs/SendProductRequestAllOfAction.md b/java/docs/SendProductRequestAllOfAction.md deleted file mode 100644 index f0dcfcc..0000000 --- a/java/docs/SendProductRequestAllOfAction.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SendProductRequestAllOfAction - -Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**catalogId** | **String** | id of the catalog | [optional] | -|**productRetailerId** | **String** | id of the product | [optional] | -|**sections** | [**List<SendProductRequestAllOfActionSections>**](SendProductRequestAllOfActionSections.md) | | [optional] | - - - diff --git a/java/docs/SendProductRequestAllOfActionProductItems.md b/java/docs/SendProductRequestAllOfActionProductItems.md deleted file mode 100644 index f96e0f6..0000000 --- a/java/docs/SendProductRequestAllOfActionProductItems.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SendProductRequestAllOfActionProductItems - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**productRetailerId** | **String** | id of the product | [optional] | - - - diff --git a/java/docs/SendProductRequestAllOfActionSections.md b/java/docs/SendProductRequestAllOfActionSections.md deleted file mode 100644 index a49e3c2..0000000 --- a/java/docs/SendProductRequestAllOfActionSections.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SendProductRequestAllOfActionSections - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**title** | **String** | Title of the section. Example: the-section-title | [optional] | -|**productItems** | [**List<SendProductRequestAllOfActionProductItems>**](SendProductRequestAllOfActionProductItems.md) | | [optional] | - - - diff --git a/java/docs/SendTemplateRequest.md b/java/docs/SendTemplateRequest.md deleted file mode 100644 index ee7f0d0..0000000 --- a/java/docs/SendTemplateRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# SendTemplateRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespace** | **String** | Can be found by method /templates | | -|**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] | -|**phone** | **Integer** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] | -|**template** | **String** | Name of template | | -|**language** | [**SendTemplateRequestAllOfLanguage**](SendTemplateRequestAllOfLanguage.md) | | | -|**params** | [**List<SendTemplateRequestAllOfParams>**](SendTemplateRequestAllOfParams.md) | Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** | [optional] | - - - diff --git a/java/docs/SendTemplateRequestAllOfCurrency.md b/java/docs/SendTemplateRequestAllOfCurrency.md deleted file mode 100644 index 341ae65..0000000 --- a/java/docs/SendTemplateRequestAllOfCurrency.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SendTemplateRequestAllOfCurrency - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**currencyCode** | **String** | | [optional] | -|**amount1000** | **Integer** | | [optional] | - - - diff --git a/java/docs/SendTemplateRequestAllOfDateTime.md b/java/docs/SendTemplateRequestAllOfDateTime.md deleted file mode 100644 index 0d3fd5b..0000000 --- a/java/docs/SendTemplateRequestAllOfDateTime.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SendTemplateRequestAllOfDateTime - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**component** | [**SendTemplateRequestAllOfDateTimeComponent**](SendTemplateRequestAllOfDateTimeComponent.md) | | [optional] | -|**unixEpoch** | [**SendTemplateRequestAllOfDateTimeUnixEpoch**](SendTemplateRequestAllOfDateTimeUnixEpoch.md) | | [optional] | - - - diff --git a/java/docs/SendTemplateRequestAllOfDateTimeComponent.md b/java/docs/SendTemplateRequestAllOfDateTimeComponent.md deleted file mode 100644 index 936e903..0000000 --- a/java/docs/SendTemplateRequestAllOfDateTimeComponent.md +++ /dev/null @@ -1,49 +0,0 @@ - - -# SendTemplateRequestAllOfDateTimeComponent - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dayOfWeek** | [**DayOfWeekEnum**](#DayOfWeekEnum) | | [optional] | -|**year** | **Integer** | | [optional] | -|**month** | **Integer** | | [optional] | -|**dayOfMonth** | **Integer** | | [optional] | -|**hour** | **Integer** | | [optional] | -|**minute** | **Integer** | | [optional] | -|**calendar** | [**CalendarEnum**](#CalendarEnum) | | [optional] | - - - -## Enum: DayOfWeekEnum - -| Name | Value | -|---- | -----| -| MONDAY | "MONDAY" | -| TUESDAY | "TUESDAY" | -| WEDNESDAY | "WEDNESDAY" | -| THURSDAY | "THURSDAY" | -| FRIDAY | "FRIDAY" | -| SATURDAY | "SATURDAY" | -| SUNDAY | "SUNDAY" | -| _1 | "1" | -| _2 | "2" | -| _3 | "3" | -| _4 | "4" | -| _5 | "5" | -| _6 | "6" | -| _7 | "7" | - - - -## Enum: CalendarEnum - -| Name | Value | -|---- | -----| -| GREGORIAN | "GREGORIAN" | -| SOLAR_HIJRI | "SOLAR_HIJRI" | - - - diff --git a/java/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md b/java/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md deleted file mode 100644 index 91de46e..0000000 --- a/java/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SendTemplateRequestAllOfDateTimeUnixEpoch - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**timestamp** | **Integer** | | [optional] | - - - diff --git a/java/docs/SendTemplateRequestAllOfLanguage.md b/java/docs/SendTemplateRequestAllOfLanguage.md deleted file mode 100644 index c3bb98a..0000000 --- a/java/docs/SendTemplateRequestAllOfLanguage.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# SendTemplateRequestAllOfLanguage - -Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**policy** | [**PolicyEnum**](#PolicyEnum) | | [optional] | -|**code** | **TemplateLanguageProp** | | [optional] | - - - -## Enum: PolicyEnum - -| Name | Value | -|---- | -----| -| DETERMINISTIC | "deterministic" | - - - diff --git a/java/docs/SendTemplateRequestAllOfParams.md b/java/docs/SendTemplateRequestAllOfParams.md deleted file mode 100644 index 56b54cf..0000000 --- a/java/docs/SendTemplateRequestAllOfParams.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SendTemplateRequestAllOfParams - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_default** | **String** | | [optional] | -|**currency** | [**SendTemplateRequestAllOfCurrency**](SendTemplateRequestAllOfCurrency.md) | | [optional] | -|**dateTime** | [**SendTemplateRequestAllOfDateTime**](SendTemplateRequestAllOfDateTime.md) | | [optional] | - - - diff --git a/java/docs/SetCommerce.md b/java/docs/SetCommerce.md deleted file mode 100644 index e85a041..0000000 --- a/java/docs/SetCommerce.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SetCommerce - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**success** | **Boolean** | | [optional] | - - - diff --git a/java/docs/SetMe.md b/java/docs/SetMe.md deleted file mode 100644 index 59fc2bd..0000000 --- a/java/docs/SetMe.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SetMe - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**result** | **String** | | [optional] | - - - diff --git a/java/docs/SetMeRequest.md b/java/docs/SetMeRequest.md deleted file mode 100644 index 52bfc3c..0000000 --- a/java/docs/SetMeRequest.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# SetMeRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**about** | **String** | Profile`s About section. | [optional] | -|**address** | **String** | Address of the business | [optional] | -|**description** | **String** | Description of the business. Max 256 characters | [optional] | -|**email** | **String** | Business email | [optional] | -|**phone** | **String** | Linked phone number | [optional] | -|**vertical** | [**VerticalEnum**](#VerticalEnum) | Industry of the business | [optional] | -|**photo** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] | - - - -## Enum: VerticalEnum - -| Name | Value | -|---- | -----| -| AUTOMOTIVE | "Automotive" | -| BEAUTY_SPA_AND_SALON | "Beauty, Spa and Salon" | -| CLOTHING_AND_APPAREL | "Clothing and Apparel" | -| EDUCATION | "Education" | -| ENTERTAINMENT | "Entertainment" | -| EVENT_PLANNING_AND_SERVICE | "Event Planning and Service" | -| FINANCE_AND_BANKING | "Finance and Banking" | -| FOOD_AND_GROCERY | "Food and Grocery" | -| PUBLIC_SERVICE | "Public Service" | -| HOTEL_AND_LODGING | "Hotel and Lodging" | -| MEDICAL_AND_HEALTH | "Medical and Health" | -| NON_PROFIT | "Non-profit" | -| PROFESSIONAL_SERVICES | "Professional Services" | -| SHOPPING_AND_RETAIL | "Shopping and Retail" | -| TRAVEL_AND_TRANSPORTATION | "Travel and Transportation" | -| RESTAURANT | "Restaurant" | -| OTHER | "Other" | -| EMPTY | "" | - - - diff --git a/java/docs/SetSettings200Response.md b/java/docs/SetSettings200Response.md deleted file mode 100644 index 554655e..0000000 --- a/java/docs/SetSettings200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SetSettings200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**webhookUrl** | **String** | | [optional] | -|**update** | [**SetSettings200ResponseAllOfUpdate**](SetSettings200ResponseAllOfUpdate.md) | | | - - - diff --git a/java/docs/SetSettings200ResponseAllOfUpdate.md b/java/docs/SetSettings200ResponseAllOfUpdate.md deleted file mode 100644 index f795a91..0000000 --- a/java/docs/SetSettings200ResponseAllOfUpdate.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SetSettings200ResponseAllOfUpdate - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**webhookUrl** | **String** | | [optional] | - - - diff --git a/java/docs/SetWebhookStatus.md b/java/docs/SetWebhookStatus.md deleted file mode 100644 index 4029560..0000000 --- a/java/docs/SetWebhookStatus.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SetWebhookStatus - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**set** | **Boolean** | Flag indicating that the current request has changed webhook | [optional] | -|**message** | **String** | | [optional] | - - - diff --git a/java/docs/Settings.md b/java/docs/Settings.md deleted file mode 100644 index aec26df..0000000 --- a/java/docs/Settings.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Settings - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**webhookUrl** | **String** | | [optional] | - - - diff --git a/java/docs/TemplateCategoryProp.md b/java/docs/TemplateCategoryProp.md deleted file mode 100644 index fa22a9f..0000000 --- a/java/docs/TemplateCategoryProp.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateCategoryProp - -## Enum - - -* `MARKETING` (value: `"MARKETING"`) - -* `TRANSACTIONAL` (value: `"TRANSACTIONAL"`) - -* `OTP` (value: `"OTP"`) - - - diff --git a/java/docs/TemplateComponentsProp.md b/java/docs/TemplateComponentsProp.md deleted file mode 100644 index 78995f4..0000000 --- a/java/docs/TemplateComponentsProp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TemplateComponentsProp - -Array of template components - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - diff --git a/java/docs/TemplateComponentsPropInner.md b/java/docs/TemplateComponentsPropInner.md deleted file mode 100644 index 018847b..0000000 --- a/java/docs/TemplateComponentsPropInner.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# TemplateComponentsPropInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**format** | [**FormatEnum**](#FormatEnum) | Only for HEADER type | [optional] | -|**text** | **String** | | [optional] | -|**example** | **Object** | | [optional] | -|**buttons** | [**List<TemplateComponentsPropInnerButtonsInner>**](TemplateComponentsPropInnerButtonsInner.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| BODY | "BODY" | -| HEADER | "HEADER" | -| FOOTER | "FOOTER" | -| BUTTONS | "BUTTONS" | - - - -## Enum: FormatEnum - -| Name | Value | -|---- | -----| -| TEXT | "TEXT" | -| IMAGE | "IMAGE" | -| DOCUMENT | "DOCUMENT" | -| VIDEO | "VIDEO" | - - - diff --git a/java/docs/TemplateComponentsPropInnerButtonsInner.md b/java/docs/TemplateComponentsPropInnerButtonsInner.md deleted file mode 100644 index e1e1369..0000000 --- a/java/docs/TemplateComponentsPropInnerButtonsInner.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# TemplateComponentsPropInnerButtonsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**text** | **String** | | [optional] | -|**url** | **String** | | [optional] | -|**phoneNumber** | **String** | | [optional] | -|**example** | **List<Object>** | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| PHONE_NUMBER | "PHONE_NUMBER" | -| URL | "URL" | -| QUICK_REPLY | "QUICK_REPLY" | - - - diff --git a/java/docs/TemplateLanguageProp.md b/java/docs/TemplateLanguageProp.md deleted file mode 100644 index 42f30f5..0000000 --- a/java/docs/TemplateLanguageProp.md +++ /dev/null @@ -1,139 +0,0 @@ - - -# TemplateLanguageProp - -## Enum - - -* `AF` (value: `"af"`) - -* `SQ` (value: `"sq"`) - -* `AR` (value: `"ar"`) - -* `AZ` (value: `"az"`) - -* `BN` (value: `"bn"`) - -* `BG` (value: `"bg"`) - -* `CA` (value: `"ca"`) - -* `ZH_CN` (value: `"zh_CN"`) - -* `ZH_HK` (value: `"zh_HK"`) - -* `ZH_TW` (value: `"zh_TW"`) - -* `HR` (value: `"hr"`) - -* `CS` (value: `"cs"`) - -* `DA` (value: `"da"`) - -* `NL` (value: `"nl"`) - -* `EN` (value: `"en"`) - -* `EN_GB` (value: `"en_GB"`) - -* `EN_US` (value: `"en_US"`) - -* `ET` (value: `"et"`) - -* `FIL` (value: `"fil"`) - -* `FI` (value: `"fi"`) - -* `FR` (value: `"fr"`) - -* `DE` (value: `"de"`) - -* `EL` (value: `"el"`) - -* `GU` (value: `"gu"`) - -* `HE` (value: `"he"`) - -* `HI` (value: `"hi"`) - -* `HU` (value: `"hu"`) - -* `ID` (value: `"id"`) - -* `GA` (value: `"ga"`) - -* `IT` (value: `"it"`) - -* `JA` (value: `"ja"`) - -* `KN` (value: `"kn"`) - -* `KK` (value: `"kk"`) - -* `KO` (value: `"ko"`) - -* `LO` (value: `"lo"`) - -* `LV` (value: `"lv"`) - -* `LT` (value: `"lt"`) - -* `MK` (value: `"mk"`) - -* `MS` (value: `"ms"`) - -* `MR` (value: `"mr"`) - -* `NB` (value: `"nb"`) - -* `FA` (value: `"fa"`) - -* `PL` (value: `"pl"`) - -* `PT_BR` (value: `"pt_BR"`) - -* `PT_PT` (value: `"pt_PT"`) - -* `PA` (value: `"pa"`) - -* `RO` (value: `"ro"`) - -* `RU` (value: `"ru"`) - -* `SR` (value: `"sr"`) - -* `SK` (value: `"sk"`) - -* `SL` (value: `"sl"`) - -* `ES` (value: `"es"`) - -* `ES_AR` (value: `"es_AR"`) - -* `ES_ES` (value: `"es_ES"`) - -* `ES_MX` (value: `"es_MX"`) - -* `SW` (value: `"sw"`) - -* `SV` (value: `"sv"`) - -* `TA` (value: `"ta"`) - -* `TE` (value: `"te"`) - -* `TH` (value: `"th"`) - -* `TR` (value: `"tr"`) - -* `UK` (value: `"uk"`) - -* `UR` (value: `"ur"`) - -* `UZ` (value: `"uz"`) - -* `VI` (value: `"vi"`) - - - diff --git a/java/docs/TemplateNamespaceField.md b/java/docs/TemplateNamespaceField.md deleted file mode 100644 index 49d17ae..0000000 --- a/java/docs/TemplateNamespaceField.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TemplateNamespaceField - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespace** | **String** | | [optional] | - - - diff --git a/java/docs/TemplatesApi.md b/java/docs/TemplatesApi.md deleted file mode 100644 index 87d9189..0000000 --- a/java/docs/TemplatesApi.md +++ /dev/null @@ -1,285 +0,0 @@ -# TemplatesApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**addTemplate**](TemplatesApi.md#addTemplate) | **POST** /addTemplate | Create template | -| [**removeTemplate**](TemplatesApi.md#removeTemplate) | **POST** /removeTemplate | Remove template | -| [**sendTemplate**](TemplatesApi.md#sendTemplate) | **POST** /sendTemplate | Send Template Message | -| [**templatesList**](TemplatesApi.md#templatesList) | **GET** /templates | Get templates list | - - - -# **addTemplate** -> Object addTemplate(addTemplateRequest) - -Create template - -Create new template for sending. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.TemplatesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - TemplatesApi apiInstance = new TemplatesApi(defaultClient); - AddTemplateRequest addTemplateRequest = new AddTemplateRequest(); // AddTemplateRequest | - try { - Object result = apiInstance.addTemplate(addTemplateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TemplatesApi#addTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **addTemplateRequest** | [**AddTemplateRequest**](AddTemplateRequest.md)| | | - -### Return type - -**Object** - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **removeTemplate** -> SetMe removeTemplate(removeTemplateRequest) - -Remove template - -Deleted template can not be restored. - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.TemplatesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - TemplatesApi apiInstance = new TemplatesApi(defaultClient); - RemoveTemplateRequest removeTemplateRequest = new RemoveTemplateRequest(); // RemoveTemplateRequest | - try { - SetMe result = apiInstance.removeTemplate(removeTemplateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TemplatesApi#removeTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **removeTemplateRequest** | [**RemoveTemplateRequest**](RemoveTemplateRequest.md)| | | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **sendTemplate** -> SendMessageStatus sendTemplate(sendTemplateRequest) - -Send Template Message - -Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.TemplatesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - TemplatesApi apiInstance = new TemplatesApi(defaultClient); - SendTemplateRequest sendTemplateRequest = new SendTemplateRequest(); // SendTemplateRequest | - try { - SendMessageStatus result = apiInstance.sendTemplate(sendTemplateRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TemplatesApi#sendTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **sendTemplateRequest** | [**SendTemplateRequest**](SendTemplateRequest.md)| | | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - - -# **templatesList** -> GetTemplates templatesList() - -Get templates list - - - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.TemplatesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - TemplatesApi apiInstance = new TemplatesApi(defaultClient); - try { - GetTemplates result = apiInstance.templatesList(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TemplatesApi#templatesList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetTemplates**](GetTemplates.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - diff --git a/java/docs/UploadMedia.md b/java/docs/UploadMedia.md deleted file mode 100644 index 49ccebd..0000000 --- a/java/docs/UploadMedia.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UploadMedia - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**body** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | | - - - diff --git a/java/docs/WebhookUrl.md b/java/docs/WebhookUrl.md deleted file mode 100644 index 63913b6..0000000 --- a/java/docs/WebhookUrl.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# WebhookUrl - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**webhookUrl** | **String** | Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). | | - - - diff --git a/java/docs/WebhooksApi.md b/java/docs/WebhooksApi.md deleted file mode 100644 index b87400f..0000000 --- a/java/docs/WebhooksApi.md +++ /dev/null @@ -1,149 +0,0 @@ -# WebhooksApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**ackHookInfo**](WebhooksApi.md#ackHookInfo) | **GET** /hookInfo | Check ACKs | -| [**setWebhook**](WebhooksApi.md#setWebhook) | **POST** /webhook | Set webhook | - - - -# **ackHookInfo** -> GetAckInfo ackHookInfo(messageId) - -Check ACKs - - - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.WebhooksApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - WebhooksApi apiInstance = new WebhooksApi(defaultClient); - String messageId = "0XzkmGNn4prUAQlzsHApGNRXQ0U"; // String | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - try { - GetAckInfo result = apiInstance.ackHookInfo(messageId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#ackHookInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **messageId** | **String**| Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | | - -### Return type - -[**GetAckInfo**](GetAckInfo.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | -| **401** | Invalid token | - | - - -# **setWebhook** -> SetWebhookStatus setWebhook(webhookUrl) - -Set webhook - -Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - -### Example -```java -// Import classes: -import io.onemessage.ApiClient; -import io.onemessage.ApiException; -import io.onemessage.Configuration; -import io.onemessage.auth.*; -import io.onemessage.models.*; -import io.onemessage.client.WebhooksApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.1msg.io/YOUR_INSTANCE_NUMBER"); - - // Configure API key authorization: token - ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token"); - token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //token.setApiKeyPrefix("Token"); - - WebhooksApi apiInstance = new WebhooksApi(defaultClient); - WebhookUrl webhookUrl = new WebhookUrl(); // WebhookUrl | - try { - SetWebhookStatus result = apiInstance.setWebhook(webhookUrl); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#setWebhook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **webhookUrl** | [**WebhookUrl**](WebhookUrl.md)| | | - -### Return type - -[**SetWebhookStatus**](SetWebhookStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Server response example | - | - diff --git a/java/git_push.sh b/java/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/java/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/java/gradle.properties b/java/gradle.properties deleted file mode 100644 index a340857..0000000 --- a/java/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). -# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. -# -# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties -# For example, uncomment below to build for Android -#target = android diff --git a/java/gradle/wrapper/gradle-wrapper.jar b/java/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9ATD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index ffed3a2..0000000 --- a/java/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/java/gradlew b/java/gradlew deleted file mode 100644 index 005bcde..0000000 --- a/java/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/java/gradlew.bat b/java/gradlew.bat deleted file mode 100644 index 6a68175..0000000 --- a/java/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/java/pom.xml b/java/pom.xml deleted file mode 100644 index 1443aed..0000000 --- a/java/pom.xml +++ /dev/null @@ -1,352 +0,0 @@ - - 4.0.0 - io.onemessage - onemessage-java-client - jar - onemessage-java-client - 2.39.0 - https://github.com/openapitools/openapi-generator - OpenAPI Java - - scm:git:git@github.com:openapitools/openapi-generator.git - scm:git:git@github.com:openapitools/openapi-generator.git - https://github.com/openapitools/openapi-generator - - - - - Unlicense - http://unlicense.org - repo - - - - - - OpenAPI-Generator Contributors - team@openapitools.org - OpenAPITools.org - http://openapitools.org - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.1.0 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - - - - maven-dependency-plugin - 3.3.0 - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.3.0 - - - - test-jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.4.1 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - - - - - .gitignore - - - - - - true - 4 - - - - - - - - - - 1.8 - - true - - - - - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-version} - provided - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - test - - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - - - org.mockito - mockito-core - ${mockito-core-version} - test - - - - 1.8 - ${java.version} - ${java.version} - 1.8.5 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.6 - 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 - 2.1.1 - 1.1.1 - UTF-8 - 2.27.2 - - diff --git a/java/settings.gradle b/java/settings.gradle deleted file mode 100644 index f7822fe..0000000 --- a/java/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "onemessage-java-client" \ No newline at end of file diff --git a/java/src/main/AndroidManifest.xml b/java/src/main/AndroidManifest.xml deleted file mode 100644 index 552beb4..0000000 --- a/java/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/java/src/main/java/org/openapitools/client/ApiCallback.java b/java/src/main/java/org/openapitools/client/ApiCallback.java deleted file mode 100644 index 8ef56ab..0000000 --- a/java/src/main/java/org/openapitools/client/ApiCallback.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.io.IOException; - -import java.util.Map; -import java.util.List; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API download processing. - * - * @param bytesRead bytes Read - * @param contentLength content length of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/java/src/main/java/org/openapitools/client/ApiClient.java b/java/src/main/java/org/openapitools/client/ApiClient.java deleted file mode 100644 index a2980c8..0000000 --- a/java/src/main/java/org/openapitools/client/ApiClient.java +++ /dev/null @@ -1,1569 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; - -import javax.net.ssl.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Type; -import java.net.URI; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.openapitools.client.auth.Authentication; -import org.openapitools.client.auth.HttpBasicAuth; -import org.openapitools.client.auth.HttpBearerAuth; -import org.openapitools.client.auth.ApiKeyAuth; - -/** - *

ApiClient class.

- */ -public class ApiClient { - - private String basePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER"; - protected List servers = new ArrayList(Arrays.asList( - new ServerConfiguration( - "{protocol}://api.1msg.io/{channelId}", - "New common server url", - new HashMap() {{ - put("channelId", new ServerVariable( - "Your channel number", - "YOUR_INSTANCE_NUMBER", - new HashSet( - ) - )); - put("protocol", new ServerVariable( - "No description provided", - "https", - new HashSet( - Arrays.asList( - "http", - "https" - ) - ) - )); - }} - ) - )); - protected Integer serverIndex = 0; - protected Map serverVariables = null; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; - - private Map authentications; - - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; - - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - - private OkHttpClient httpClient; - private JSON json; - - private HttpLoggingInterceptor loggingInterceptor; - - /** - * Basic constructor for ApiClient - */ - public ApiClient() { - init(); - initHttpClient(); - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("token", new ApiKeyAuth("query", "token")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - /** - * Basic constructor with custom OkHttpClient - * - * @param client a {@link okhttp3.OkHttpClient} object - */ - public ApiClient(OkHttpClient client) { - init(); - - httpClient = client; - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("token", new ApiKeyAuth("query", "token")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - private void initHttpClient() { - initHttpClient(Collections.emptyList()); - } - - private void initHttpClient(List interceptors) { - OkHttpClient.Builder builder = new OkHttpClient.Builder(); - builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor: interceptors) { - builder.addInterceptor(interceptor); - } - - httpClient = builder.build(); - } - - private void init() { - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.39.0/java"); - - authentications = new HashMap(); - } - - /** - * Get base path - * - * @return Base path - */ - public String getBasePath() { - return basePath; - } - - /** - * Set base path - * - * @param basePath Base path of the URL (e.g https://api.1msg.io/YOUR_INSTANCE_NUMBER - * @return An instance of OkHttpClient - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - this.serverIndex = null; - return this; - } - - public List getServers() { - return servers; - } - - public ApiClient setServers(List servers) { - this.servers = servers; - return this; - } - - public Integer getServerIndex() { - return serverIndex; - } - - public ApiClient setServerIndex(Integer serverIndex) { - this.serverIndex = serverIndex; - return this; - } - - public Map getServerVariables() { - return serverVariables; - } - - public ApiClient setServerVariables(Map serverVariables) { - this.serverVariables = serverVariables; - return this; - } - - /** - * Get HTTP client - * - * @return An instance of OkHttpClient - */ - public OkHttpClient getHttpClient() { - return httpClient; - } - - /** - * Set HTTP client, which must never be null. - * - * @param newHttpClient An instance of OkHttpClient - * @return Api Client - * @throws java.lang.NullPointerException when newHttpClient is null - */ - public ApiClient setHttpClient(OkHttpClient newHttpClient) { - this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); - return this; - } - - /** - * Get JSON - * - * @return JSON object - */ - public JSON getJSON() { - return json; - } - - /** - * Set JSON - * - * @param json JSON object - * @return Api client - */ - public ApiClient setJSON(JSON json) { - this.json = json; - return this; - } - - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. - * Default to true. - * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - /** - *

Getter for the field keyManagers.

- * - * @return an array of {@link javax.net.ssl.KeyManager} objects - */ - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - - /** - *

Getter for the field dateFormat.

- * - * @return a {@link java.text.DateFormat} object - */ - public DateFormat getDateFormat() { - return dateFormat; - } - - /** - *

Setter for the field dateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setDateFormat(DateFormat dateFormat) { - JSON.setDateFormat(dateFormat); - return this; - } - - /** - *

Set SqlDateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - JSON.setSqlDateFormat(dateFormat); - return this; - } - - /** - *

Set OffsetDateTimeFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - JSON.setOffsetDateTimeFormat(dateFormat); - return this; - } - - /** - *

Set LocalDateFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - JSON.setLocalDateFormat(dateFormat); - return this; - } - - /** - *

Set LenientOnJson.

- * - * @param lenientOnJson a boolean - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setLenientOnJson(boolean lenientOnJson) { - JSON.setLenientOnJson(lenientOnJson); - return this; - } - - /** - * Get authentications (key: authentication name, value: authentication). - * - * @return Map of authentication objects - */ - public Map getAuthentications() { - return authentications; - } - - /** - * Get authentication for the given name. - * - * @param authName The authentication name - * @return The authentication, null if not found - */ - public Authentication getAuthentication(String authName) { - return authentications.get(authName); - } - - - /** - * Helper method to set username for the first HTTP basic authentication. - * - * @param username Username - */ - public void setUsername(String username) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(username); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set password for the first HTTP basic authentication. - * - * @param password Password - */ - public void setPassword(String password) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setPassword(password); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set API key value for the first API key authentication. - * - * @param apiKey API key - */ - public void setApiKey(String apiKey) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKey(apiKey); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set API key prefix for the first API key authentication. - * - * @param apiKeyPrefix API key prefix - */ - public void setApiKeyPrefix(String apiKeyPrefix) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set access token for the first OAuth2 authentication. - * - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - throw new RuntimeException("No OAuth2 authentication configured!"); - } - - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - - /** - * Set the User-Agent header's value (by adding to the default header map). - * - * @param userAgent HTTP request's user agent - * @return ApiClient - */ - public ApiClient setUserAgent(String userAgent) { - addDefaultHeader("User-Agent", userAgent); - return this; - } - - /** - * Add a default header. - * - * @param key The header's key - * @param value The header's value - * @return ApiClient - */ - public ApiClient addDefaultHeader(String key, String value) { - defaultHeaderMap.put(key, value); - return this; - } - - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return ApiClient - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - - /** - * Check that whether debugging is enabled for this API client. - * - * @return True if debugging is enabled, false otherwise. - */ - public boolean isDebugging() { - return debugging; - } - - /** - * Enable/disable debugging for this API client. - * - * @param debugging To enable (true) or disable (false) debugging - * @return ApiClient - */ - public ApiClient setDebugging(boolean debugging) { - if (debugging != this.debugging) { - if (debugging) { - loggingInterceptor = new HttpLoggingInterceptor(); - loggingInterceptor.setLevel(Level.BODY); - httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); - } else { - final OkHttpClient.Builder builder = httpClient.newBuilder(); - builder.interceptors().remove(loggingInterceptor); - httpClient = builder.build(); - loggingInterceptor = null; - } - } - this.debugging = debugging; - return this; - } - - /** - * The path of temporary folder used to store downloaded files from endpoints - * with file response. The default value is null, i.e. using - * the system's default temporary folder. - * - * @see
createTempFile - * @return Temporary folder path - */ - public String getTempFolderPath() { - return tempFolderPath; - } - - /** - * Set the temporary folder path (for downloading files) - * - * @param tempFolderPath Temporary folder path - * @return ApiClient - */ - public ApiClient setTempFolderPath(String tempFolderPath) { - this.tempFolderPath = tempFolderPath; - return this; - } - - /** - * Get connection timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getConnectTimeout() { - return httpClient.connectTimeoutMillis(); - } - - /** - * Sets the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param connectionTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get read timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getReadTimeout() { - return httpClient.readTimeoutMillis(); - } - - /** - * Sets the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param readTimeout read timeout in milliseconds - * @return Api client - */ - public ApiClient setReadTimeout(int readTimeout) { - httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get write timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getWriteTimeout() { - return httpClient.writeTimeoutMillis(); - } - - /** - * Sets the write timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param writeTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setWriteTimeout(int writeTimeout) { - httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - - /** - * Format the given parameter object into string. - * - * @param param Parameter - * @return String representation of the parameter - */ - public String parameterToString(Object param) { - if (param == null) { - return ""; - } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { - //Serialize to json string and remove the " enclosing characters - String jsonStr = JSON.serialize(param); - return jsonStr.substring(1, jsonStr.length() - 1); - } else if (param instanceof Collection) { - StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { - b.append(","); - } - b.append(o); - } - return b.toString(); - } else { - return String.valueOf(param); - } - } - - /** - * Formats the specified query parameter to a list containing a single {@code Pair} object. - * - * Note that {@code value} must not be a collection. - * - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list containing a single {@code Pair} object. - */ - public List parameterToPair(String name, Object value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) { - return params; - } - - params.add(new Pair(name, parameterToString(value))); - return params; - } - - /** - * Formats the specified collection query parameters to a list of {@code Pair} objects. - * - * Note that the values of each of the returned Pair objects are percent-encoded. - * - * @param collectionFormat The collection format of the parameter. - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list of {@code Pair} objects. - */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value.isEmpty()) { - return params; - } - - // create the params based on the collection format - if ("multi".equals(collectionFormat)) { - for (Object item : value) { - params.add(new Pair(name, escapeString(parameterToString(item)))); - } - return params; - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - // escape all delimiters except commas, which are URI reserved - // characters - if ("ssv".equals(collectionFormat)) { - delimiter = escapeString(" "); - } else if ("tsv".equals(collectionFormat)) { - delimiter = escapeString("\t"); - } else if ("pipes".equals(collectionFormat)) { - delimiter = escapeString("|"); - } - - StringBuilder sb = new StringBuilder(); - for (Object item : value) { - sb.append(delimiter); - sb.append(escapeString(parameterToString(item))); - } - - params.add(new Pair(name, sb.substring(delimiter.length()))); - - return params; - } - - /** - * Formats the specified collection path parameter to a string value. - * - * @param collectionFormat The collection format of the parameter. - * @param value The value of the parameter. - * @return String representation of the parameter - */ - public String collectionPathParameterToString(String collectionFormat, Collection value) { - // create the value based on the collection format - if ("multi".equals(collectionFormat)) { - // not valid for path params - return parameterToString(value); - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - if ("ssv".equals(collectionFormat)) { - delimiter = " "; - } else if ("tsv".equals(collectionFormat)) { - delimiter = "\t"; - } else if ("pipes".equals(collectionFormat)) { - delimiter = "|"; - } - - StringBuilder sb = new StringBuilder() ; - for (Object item : value) { - sb.append(delimiter); - sb.append(parameterToString(item)); - } - - return sb.substring(delimiter.length()); - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * "* / *" is also default to JSON - * @param mime MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public boolean isJsonMime(String mime) { - String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; - return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); - } - - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * returns null. If it matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0) { - return null; - } - - if (contentTypes[0].equals("*/*")) { - return "application/json"; - } - - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - - return contentTypes[0]; - } - - /** - * Escape the given string to be used as URL query value. - * - * @param str String to be escaped - * @return Escaped string - */ - public String escapeString(String str) { - try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - return str; - } - } - - /** - * Deserialize response body to Java object, according to the return type and - * the Content-Type response header. - * - * @param Type - * @param response HTTP response - * @param returnType The type of the Java object - * @return The deserialized Java object - * @throws org.openapitools.client.ApiException If fail to deserialize response body, i.e. cannot read response body - * or the Content-Type of the response is not supported. - */ - @SuppressWarnings("unchecked") - public T deserialize(Response response, Type returnType) throws ApiException { - if (response == null || returnType == null) { - return null; - } - - if ("byte[]".equals(returnType.toString())) { - // Handle binary response (byte array). - try { - return (T) response.body().bytes(); - } catch (IOException e) { - throw new ApiException(e); - } - } else if (returnType.equals(File.class)) { - // Handle file downloading. - return (T) downloadFileFromResponse(response); - } - - String respBody; - try { - if (response.body() != null) - respBody = response.body().string(); - else - respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { - return null; - } - - String contentType = response.headers().get("Content-Type"); - if (contentType == null) { - // ensuring a default content type - contentType = "application/json"; - } - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( - "Content type \"" + contentType + "\" is not supported for type: " + returnType, - response.code(), - response.headers().toMultimap(), - respBody); - } - } - - /** - * Serialize the given Java object into request body according to the object's - * class and the request Content-Type. - * - * @param obj The Java object - * @param contentType The request Content-Type - * @return The serialized request body - * @throws org.openapitools.client.ApiException If fail to serialize the given object - */ - public RequestBody serialize(Object obj, String contentType) throws ApiException { - if (obj instanceof byte[]) { - // Binary (byte array) body parameter support. - return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create((File) obj, MediaType.parse(contentType)); - } else if ("text/plain".equals(contentType) && obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else if (isJsonMime(contentType)) { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - return RequestBody.create(content, MediaType.parse(contentType)); - } else if (obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else { - throw new ApiException("Content type \"" + contentType + "\" is not supported"); - } - } - - /** - * Download file from the given response. - * - * @param response An instance of the Response object - * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk - * @return Downloaded file - */ - public File downloadFileFromResponse(Response response) throws ApiException { - try { - File file = prepareDownloadFile(response); - BufferedSink sink = Okio.buffer(Okio.sink(file)); - sink.writeAll(response.body().source()); - sink.close(); - return file; - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Prepare file for download - * - * @param response An instance of the Response object - * @return Prepared file for the download - * @throws java.io.IOException If fail to prepare file for download - */ - public File prepareDownloadFile(Response response) throws IOException { - String filename = null; - String contentDisposition = response.header("Content-Disposition"); - if (contentDisposition != null && !"".equals(contentDisposition)) { - // Get filename from the Content-Disposition header. - Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); - Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) { - filename = sanitizeFilename(matcher.group(1)); - } - } - - String prefix = null; - String suffix = null; - if (filename == null) { - prefix = "download-"; - suffix = ""; - } else { - int pos = filename.lastIndexOf("."); - if (pos == -1) { - prefix = filename + "-"; - } else { - prefix = filename.substring(0, pos) + "-"; - suffix = filename.substring(pos); - } - // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) - prefix = "download-"; - } - - if (tempFolderPath == null) - return Files.createTempFile(prefix, suffix).toFile(); - else - return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); - } - - /** - * {@link #execute(Call, Type)} - * - * @param Type - * @param call An instance of the Call object - * @return ApiResponse<T> - * @throws org.openapitools.client.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call) throws ApiException { - return execute(call, null); - } - - /** - * Execute HTTP call and deserialize the HTTP response body into the given return type. - * - * @param returnType The return type used to deserialize HTTP response body - * @param The return type corresponding to (same with) returnType - * @param call Call - * @return ApiResponse object containing response status, headers and - * data, which is a Java object deserialized from response body and would be null - * when returnType is null. - * @throws org.openapitools.client.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call, Type returnType) throws ApiException { - try { - Response response = call.execute(); - T data = handleResponse(response, returnType); - return new ApiResponse(response.code(), response.headers().toMultimap(), data); - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * {@link #executeAsync(Call, Type, ApiCallback)} - * - * @param Type - * @param call An instance of the Call object - * @param callback ApiCallback<T> - */ - public void executeAsync(Call call, ApiCallback callback) { - executeAsync(call, null, callback); - } - - /** - * Execute HTTP call asynchronously. - * - * @param Type - * @param call The callback to be executed when the API call finishes - * @param returnType Return type - * @param callback ApiCallback - * @see #execute(Call, Type) - */ - @SuppressWarnings("unchecked") - public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue(new Callback() { - @Override - public void onFailure(Call call, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } - - @Override - public void onResponse(Call call, Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } catch (Exception e) { - callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); - return; - } - callback.onSuccess(result, response.code(), response.headers().toMultimap()); - } - }); - } - - /** - * Handle the given response, return the deserialized object when the response is successful. - * - * @param Type - * @param response Response - * @param returnType Return type - * @return Type - * @throws org.openapitools.client.ApiException If the response has an unsuccessful status code or - * fail to deserialize the response body - */ - public T handleResponse(Response response, Type returnType) throws ApiException { - if (response.isSuccessful()) { - if (returnType == null || response.code() == 204) { - // returning null if the returnType is not defined, - // or the status code is 204 (No Content) - if (response.body() != null) { - try { - response.body().close(); - } catch (Exception e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - return null; - } else { - return deserialize(response, returnType); - } - } else { - String respBody = null; - if (response.body() != null) { - try { - respBody = response.body().string(); - } catch (IOException e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); - } - } - - /** - * Build HTTP call with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP call - * @throws org.openapitools.client.ApiException If fail to serialize the request body object - */ - public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); - - return httpClient.newCall(request); - } - - /** - * Build an HTTP request with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP request - * @throws org.openapitools.client.ApiException If fail to serialize the request body object - */ - public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams - List allQueryParams = new ArrayList(queryParams); - allQueryParams.addAll(collectionQueryParams); - - final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); - - // prepare HTTP request body - RequestBody reqBody; - String contentType = headerParams.get("Content-Type"); - String contentTypePure = contentType; - if (contentTypePure != null && contentTypePure.contains(";")) { - contentTypePure = contentType.substring(0, contentType.indexOf(";")); - } - if (!HttpMethod.permitsRequestBody(method)) { - reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentTypePure)) { - reqBody = buildRequestBodyMultipart(formParams); - } else if (body == null) { - if ("DELETE".equals(method)) { - // allow calling DELETE without sending a request body - reqBody = null; - } else { - // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); - } - } else { - reqBody = serialize(body, contentType); - } - - // update parameters with authentication settings - updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - - final Request.Builder reqBuilder = new Request.Builder().url(url); - processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); - - // Associate callback with request (if not null) so interceptor can - // access it when creating ProgressResponseBody - reqBuilder.tag(callback); - - Request request = null; - - if (callback != null && reqBody != null) { - ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); - request = reqBuilder.method(method, progressRequestBody).build(); - } else { - request = reqBuilder.method(method, reqBody).build(); - } - - return request; - } - - /** - * Build full URL by concatenating base path, the given sub path and query parameters. - * - * @param baseUrl The base URL - * @param path The sub path - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @return The full URL - */ - public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { - final StringBuilder url = new StringBuilder(); - if (baseUrl != null) { - url.append(baseUrl).append(path); - } else { - String baseURL; - if (serverIndex != null) { - if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() - )); - } - baseURL = servers.get(serverIndex).URL(serverVariables); - } else { - baseURL = basePath; - } - url.append(baseURL).append(path); - } - - if (queryParams != null && !queryParams.isEmpty()) { - // support (constant) query string in `path`, e.g. "/posts?draft=1" - String prefix = path.contains("?") ? "&" : "?"; - for (Pair param : queryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); - } - } - } - - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - - return url.toString(); - } - - /** - * Set header parameters to the request builder, including default headers. - * - * @param headerParams Header parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { - for (Entry param : headerParams.entrySet()) { - reqBuilder.header(param.getKey(), parameterToString(param.getValue())); - } - for (Entry header : defaultHeaderMap.entrySet()) { - if (!headerParams.containsKey(header.getKey())) { - reqBuilder.header(header.getKey(), parameterToString(header.getValue())); - } - } - } - - /** - * Set cookie parameters to the request builder, including default cookies. - * - * @param cookieParams Cookie parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { - for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - for (Entry param : defaultCookieMap.entrySet()) { - if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws org.openapitools.client.ApiException If fails to update the parameters - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, - Map cookieParams, String payload, String method, URI uri) throws ApiException { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); - } - auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); - } - } - - /** - * Build a form-encoding request body with the given form parameters. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyFormEncoding(Map formParams) { - okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); - for (Entry param : formParams.entrySet()) { - formBuilder.add(param.getKey(), parameterToString(param.getValue())); - } - return formBuilder.build(); - } - - /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); - } else if (param.getValue() instanceof List) { - List list = (List) param.getValue(); - for (Object item: list) { - if (item instanceof File) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - - /** - * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param file The file to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } - - /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param obj The complex object to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { - RequestBody requestBody; - if (obj instanceof String) { - requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); - } else { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - requestBody = RequestBody.create(content, MediaType.parse("application/json")); - } - - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); - mpBuilder.addPart(partHeaders, requestBody); - } - - /** - * Get network interceptor to add it to the httpClient to track download progress for - * async requests. - */ - private Interceptor getProgressInterceptor() { - return new Interceptor() { - @Override - public Response intercept(Interceptor.Chain chain) throws IOException { - final Request request = chain.request(); - final Response originalResponse = chain.proceed(request); - if (request.tag() instanceof ApiCallback) { - final ApiCallback callback = (ApiCallback) request.tag(); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); - } - return originalResponse; - } - }; - } - - /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. - */ - private void applySslSettings() { - try { - TrustManager[] trustManagers; - HostnameVerifier hostnameVerifier; - if (!verifyingSsl) { - trustManagers = new TrustManager[]{ - new X509TrustManager() { - @Override - public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[]{}; - } - } - }; - hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - } else { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - - if (sslCaCert == null) { - trustManagerFactory.init((KeyStore) null); - } else { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + (index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - trustManagerFactory.init(caKeyStore); - } - trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; - } - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) - .hostnameVerifier(hostnameVerifier) - .build(); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } - - /** - * Convert the HTTP request body to a string. - * - * @param requestBody The HTTP request object - * @return The string representation of the HTTP request body - * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string - */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { - if (requestBody != null) { - try { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return buffer.readUtf8(); - } catch (final IOException e) { - throw new ApiException(e); - } - } - - // empty http request body - return ""; - } -} diff --git a/java/src/main/java/org/openapitools/client/ApiException.java b/java/src/main/java/org/openapitools/client/ApiException.java deleted file mode 100644 index f47b100..0000000 --- a/java/src/main/java/org/openapitools/client/ApiException.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Map; -import java.util.List; - - -/** - *

ApiException class.

- */ -@SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:32:47.491345194+07:00[Asia/Bangkok]") -public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - /** - *

Constructor for ApiException.

- */ - public ApiException() {} - - /** - *

Constructor for ApiException.

- * - * @param throwable a {@link java.lang.Throwable} object - */ - public ApiException(Throwable throwable) { - super(throwable); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - */ - public ApiException(String message) { - super(message); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, Map> responseHeaders, String responseBody) { - this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message a {@link java.lang.String} object - */ - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", - super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); - } -} diff --git a/java/src/main/java/org/openapitools/client/ApiResponse.java b/java/src/main/java/org/openapitools/client/ApiResponse.java deleted file mode 100644 index a146f8e..0000000 --- a/java/src/main/java/org/openapitools/client/ApiResponse.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - */ -public class ApiResponse { - final private int statusCode; - final private Map> headers; - final private T data; - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - /** - *

Get the status code.

- * - * @return the status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - *

Get the headers.

- * - * @return a {@link java.util.Map} of headers - */ - public Map> getHeaders() { - return headers; - } - - /** - *

Get the data.

- * - * @return the data - */ - public T getData() { - return data; - } -} diff --git a/java/src/main/java/org/openapitools/client/Configuration.java b/java/src/main/java/org/openapitools/client/Configuration.java deleted file mode 100644 index ef4b4a9..0000000 --- a/java/src/main/java/org/openapitools/client/Configuration.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:32:47.491345194+07:00[Asia/Bangkok]") -public class Configuration { - public static final String VERSION = "2.39.0"; - - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } - - /** - * Set the default API client, which would be used when creating API - * instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; - } -} diff --git a/java/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/java/src/main/java/org/openapitools/client/GzipRequestInterceptor.java deleted file mode 100644 index 0192dc6..0000000 --- a/java/src/main/java/org/openapitools/client/GzipRequestInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/java/src/main/java/org/openapitools/client/JSON.java b/java/src/main/java/org/openapitools/client/JSON.java deleted file mode 100644 index 5d38859..0000000 --- a/java/src/main/java/org/openapitools/client/JSON.java +++ /dev/null @@ -1,462 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; - -import okio.ByteString; - -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Ack.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AddTemplateRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChannelExtendedStatistics.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChannelExtendedStatisticsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChannelStatistics.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChannelStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChatIdProp.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Commerce.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CommerceParams.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Contacts.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ContactsContactsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ContactsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetAckInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetAckInfoHooksInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetCommerce.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetCommerceInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetIP.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetMe.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetMe401Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetMessages.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetMessagesMessagesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetTemplates.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetTemplatesTemplatesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MeComponents.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MediaId.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Message.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MessageIdProp.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PhoneProp.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReadMessageRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RemoveTemplateRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendContactRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendFileRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendListRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendListRequestAllOfRows.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendListRequestAllOfSections.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendLocationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendMessageRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendMessageStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendProductRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendProductRequestAllOfAction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendProductRequestAllOfActionProductItems.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendProductRequestAllOfActionSections.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequestAllOfCurrency.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequestAllOfDateTime.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequestAllOfDateTimeComponent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequestAllOfDateTimeUnixEpoch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequestAllOfLanguage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SendTemplateRequestAllOfParams.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SetCommerce.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SetMe.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SetMeRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SetSettings200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SetSettings200ResponseAllOfUpdate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SetWebhookStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Settings.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TemplateComponentsProp.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TemplateComponentsPropInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TemplateComponentsPropInnerButtonsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TemplateNamespaceField.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UploadMedia.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WebhookUrl.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** - * Gson TypeAdapter for Byte Array type - */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/java/src/main/java/org/openapitools/client/Pair.java b/java/src/main/java/org/openapitools/client/Pair.java deleted file mode 100644 index 901c7a4..0000000 --- a/java/src/main/java/org/openapitools/client/Pair.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:32:47.491345194+07:00[Asia/Bangkok]") -public class Pair { - private String name = ""; - private String value = ""; - - public Pair (String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) { - return; - } - - this.name = name; - } - - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - return true; - } -} diff --git a/java/src/main/java/org/openapitools/client/ProgressRequestBody.java b/java/src/main/java/org/openapitools/client/ProgressRequestBody.java deleted file mode 100644 index e80c368..0000000 --- a/java/src/main/java/org/openapitools/client/ProgressRequestBody.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - private final RequestBody requestBody; - - private final ApiCallback callback; - - public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { - this.requestBody = requestBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/java/src/main/java/org/openapitools/client/ProgressResponseBody.java b/java/src/main/java/org/openapitools/client/ProgressResponseBody.java deleted file mode 100644 index 46b8b4d..0000000 --- a/java/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.MediaType; -import okhttp3.ResponseBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - private final ResponseBody responseBody; - private final ApiCallback callback; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { - this.responseBody = responseBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} diff --git a/java/src/main/java/org/openapitools/client/ServerConfiguration.java b/java/src/main/java/org/openapitools/client/ServerConfiguration.java deleted file mode 100644 index 59edc52..0000000 --- a/java/src/main/java/org/openapitools/client/ServerConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.client; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replace("{" + name + "}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/java/src/main/java/org/openapitools/client/ServerVariable.java b/java/src/main/java/org/openapitools/client/ServerVariable.java deleted file mode 100644 index c2f13e2..0000000 --- a/java/src/main/java/org/openapitools/client/ServerVariable.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/java/src/main/java/org/openapitools/client/StringUtil.java b/java/src/main/java/org/openapitools/client/StringUtil.java deleted file mode 100644 index 45733f0..0000000 --- a/java/src/main/java/org/openapitools/client/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:32:47.491345194+07:00[Asia/Bangkok]") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/java/src/main/java/org/openapitools/client/api/ChannelApi.java b/java/src/main/java/org/openapitools/client/api/ChannelApi.java deleted file mode 100644 index f651043..0000000 --- a/java/src/main/java/org/openapitools/client/api/ChannelApi.java +++ /dev/null @@ -1,1156 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ChannelExtendedStatistics; -import org.openapitools.client.model.ChannelStatistics; -import org.openapitools.client.model.ChannelStatus; -import org.openapitools.client.model.GetCommerce; -import org.openapitools.client.model.GetIP; -import org.openapitools.client.model.GetMe; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.SetMe; -import org.openapitools.client.model.SetMeRequest; -import org.openapitools.client.model.SetSettings200Response; -import org.openapitools.client.model.Settings; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ChannelApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ChannelApi() { - this(Configuration.getDefaultApiClient()); - } - - public ChannelApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getCommerce - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call getCommerceCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/commerce"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCommerceValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getCommerceCall(_callback); - - } - - /** - * Get Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @return GetCommerce - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public GetCommerce getCommerce() throws ApiException { - ApiResponse localVarResp = getCommerceWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @return ApiResponse<GetCommerce> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse getCommerceWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getCommerceValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Commerce Settings (asynchronously) - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call getCommerceAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCommerceValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getExtendedStatistics - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call getExtendedStatisticsCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/extendedStatistics"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getExtendedStatisticsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getExtendedStatisticsCall(_callback); - - } - - /** - * Get Extended Channel statistics - * Get channel usage extended statistics - * @return ChannelExtendedStatistics - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ChannelExtendedStatistics getExtendedStatistics() throws ApiException { - ApiResponse localVarResp = getExtendedStatisticsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Extended Channel statistics - * Get channel usage extended statistics - * @return ApiResponse<ChannelExtendedStatistics> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse getExtendedStatisticsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getExtendedStatisticsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Extended Channel statistics (asynchronously) - * Get channel usage extended statistics - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call getExtendedStatisticsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getExtendedStatisticsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getMe - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call getMeCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/me"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getMeValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getMeCall(_callback); - - } - - /** - * Get Profile Info - * Use this edge to retrieve your profile's About info - * @return GetMe - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public GetMe getMe() throws ApiException { - ApiResponse localVarResp = getMeWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Profile Info - * Use this edge to retrieve your profile's About info - * @return ApiResponse<GetMe> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse getMeWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getMeValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Profile Info (asynchronously) - * Use this edge to retrieve your profile's About info - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call getMeAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getMeValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getSettings - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call getSettingsCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/settings"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getSettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getSettingsCall(_callback); - - } - - /** - * Get Settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @return Settings - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public Settings getSettings() throws ApiException { - ApiResponse localVarResp = getSettingsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @return ApiResponse<Settings> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse getSettingsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getSettingsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Settings (asynchronously) - * **webhookUrl** - Http or https URL for receiving notifications. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call getSettingsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getSettingsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getStatistics - * @param date Month and year in format mm.YYYY. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call getStatisticsCall(String date, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/statistics"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (date != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("date", date)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getStatisticsValidateBeforeCall(String date, final ApiCallback _callback) throws ApiException { - return getStatisticsCall(date, _callback); - - } - - /** - * Get Channel statistics - * Get channel usage statistics - * @param date Month and year in format mm.YYYY. (optional) - * @return ChannelStatistics - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ChannelStatistics getStatistics(String date) throws ApiException { - ApiResponse localVarResp = getStatisticsWithHttpInfo(date); - return localVarResp.getData(); - } - - /** - * Get Channel statistics - * Get channel usage statistics - * @param date Month and year in format mm.YYYY. (optional) - * @return ApiResponse<ChannelStatistics> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse getStatisticsWithHttpInfo(String date) throws ApiException { - okhttp3.Call localVarCall = getStatisticsValidateBeforeCall(date, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Channel statistics (asynchronously) - * Get channel usage statistics - * @param date Month and year in format mm.YYYY. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call getStatisticsAsync(String date, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getStatisticsValidateBeforeCall(date, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getStatus - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call getStatusCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/status"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getStatusValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getStatusCall(_callback); - - } - - /** - * Get Status - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * @return ChannelStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ChannelStatus getStatus() throws ApiException { - ApiResponse localVarResp = getStatusWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Status - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * @return ApiResponse<ChannelStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse getStatusWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getStatusValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Status (asynchronously) - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call getStatusAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getStatusValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for outputIP - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call outputIPCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/outputIP"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call outputIPValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return outputIPCall(_callback); - - } - - /** - * Get channel server IP - * - * @return GetIP - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public GetIP outputIP() throws ApiException { - ApiResponse localVarResp = outputIPWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get channel server IP - * - * @return ApiResponse<GetIP> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse outputIPWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = outputIPValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get channel server IP (asynchronously) - * - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call outputIPAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = outputIPValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for setMe - * @param setMeRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call setMeCall(SetMeRequest setMeRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = setMeRequest; - - // create path and map variables - String localVarPath = "/me"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call setMeValidateBeforeCall(SetMeRequest setMeRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'setMeRequest' is set - if (setMeRequest == null) { - throw new ApiException("Missing the required parameter 'setMeRequest' when calling setMe(Async)"); - } - - return setMeCall(setMeRequest, _callback); - - } - - /** - * Change user info - * Change user info - * @param setMeRequest (required) - * @return SetMe - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public SetMe setMe(SetMeRequest setMeRequest) throws ApiException { - ApiResponse localVarResp = setMeWithHttpInfo(setMeRequest); - return localVarResp.getData(); - } - - /** - * Change user info - * Change user info - * @param setMeRequest (required) - * @return ApiResponse<SetMe> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse setMeWithHttpInfo(SetMeRequest setMeRequest) throws ApiException { - okhttp3.Call localVarCall = setMeValidateBeforeCall(setMeRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Change user info (asynchronously) - * Change user info - * @param setMeRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call setMeAsync(SetMeRequest setMeRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = setMeValidateBeforeCall(setMeRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for setSettings - * @param settings (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call setSettingsCall(Settings settings, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = settings; - - // create path and map variables - String localVarPath = "/settings"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call setSettingsValidateBeforeCall(Settings settings, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'settings' is set - if (settings == null) { - throw new ApiException("Missing the required parameter 'settings' when calling setSettings(Async)"); - } - - return setSettingsCall(settings, _callback); - - } - - /** - * Set settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @param settings (required) - * @return SetSettings200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public SetSettings200Response setSettings(Settings settings) throws ApiException { - ApiResponse localVarResp = setSettingsWithHttpInfo(settings); - return localVarResp.getData(); - } - - /** - * Set settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @param settings (required) - * @return ApiResponse<SetSettings200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse setSettingsWithHttpInfo(Settings settings) throws ApiException { - okhttp3.Call localVarCall = setSettingsValidateBeforeCall(settings, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Set settings (asynchronously) - * **webhookUrl** - Http or https URL for receiving notifications. - * @param settings (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call setSettingsAsync(Settings settings, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = setSettingsValidateBeforeCall(settings, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java/src/main/java/org/openapitools/client/api/MediaApi.java b/java/src/main/java/org/openapitools/client/api/MediaApi.java deleted file mode 100644 index c5c5920..0000000 --- a/java/src/main/java/org/openapitools/client/api/MediaApi.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.MediaId; -import org.openapitools.client.model.UploadMedia; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MediaApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public MediaApi() { - this(Configuration.getDefaultApiClient()); - } - - public MediaApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for uploadMedia - * @param uploadMedia (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call uploadMediaCall(UploadMedia uploadMedia, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = uploadMedia; - - // create path and map variables - String localVarPath = "/uploadMedia"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call uploadMediaValidateBeforeCall(UploadMedia uploadMedia, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'uploadMedia' is set - if (uploadMedia == null) { - throw new ApiException("Missing the required parameter 'uploadMedia' when calling uploadMedia(Async)"); - } - - return uploadMediaCall(uploadMedia, _callback); - - } - - /** - * Upload media & get mediaId - * Upload media and get mediaId. Uploaded media can be sent in template - * @param uploadMedia (required) - * @return MediaId - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public MediaId uploadMedia(UploadMedia uploadMedia) throws ApiException { - ApiResponse localVarResp = uploadMediaWithHttpInfo(uploadMedia); - return localVarResp.getData(); - } - - /** - * Upload media & get mediaId - * Upload media and get mediaId. Uploaded media can be sent in template - * @param uploadMedia (required) - * @return ApiResponse<MediaId> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse uploadMediaWithHttpInfo(UploadMedia uploadMedia) throws ApiException { - okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(uploadMedia, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload media & get mediaId (asynchronously) - * Upload media and get mediaId. Uploaded media can be sent in template - * @param uploadMedia (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call uploadMediaAsync(UploadMedia uploadMedia, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(uploadMedia, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java/src/main/java/org/openapitools/client/api/MessagingApi.java b/java/src/main/java/org/openapitools/client/api/MessagingApi.java deleted file mode 100644 index 487e5a5..0000000 --- a/java/src/main/java/org/openapitools/client/api/MessagingApi.java +++ /dev/null @@ -1,1008 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.GetMessages; -import org.openapitools.client.model.ReadMessageRequest; -import org.openapitools.client.model.SendContactRequest; -import org.openapitools.client.model.SendFileRequest; -import org.openapitools.client.model.SendListRequest; -import org.openapitools.client.model.SendLocationRequest; -import org.openapitools.client.model.SendMessageRequest; -import org.openapitools.client.model.SendMessageStatus; -import org.openapitools.client.model.SetMe; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MessagingApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public MessagingApi() { - this(Configuration.getDefaultApiClient()); - } - - public MessagingApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for messagesList - * @param last Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - * @param lastMessageNumber The lastMessageNumber parameter from the last response. Example: 100 (optional) - * @param firstMessageNumber The firstMessageNumber parameter from the last response. Example: 1 (optional) - * @param limit Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - * @param chatId Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - * @param minTime Filter messages received after specified time. Example: 1665396610 (optional) - * @param maxTime Filter messages received before specified time. Example: 1665396610 (optional) - * @param msgId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call messagesListCall(Boolean last, Integer lastMessageNumber, Integer firstMessageNumber, Integer limit, String chatId, Integer minTime, Integer maxTime, String msgId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/messages"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (last != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("last", last)); - } - - if (lastMessageNumber != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("lastMessageNumber", lastMessageNumber)); - } - - if (firstMessageNumber != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("firstMessageNumber", firstMessageNumber)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (chatId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("chatId", chatId)); - } - - if (minTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("min_time", minTime)); - } - - if (maxTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("max_time", maxTime)); - } - - if (msgId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("msgId", msgId)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call messagesListValidateBeforeCall(Boolean last, Integer lastMessageNumber, Integer firstMessageNumber, Integer limit, String chatId, Integer minTime, Integer maxTime, String msgId, final ApiCallback _callback) throws ApiException { - return messagesListCall(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId, _callback); - - } - - /** - * Get messages list - * - * @param last Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - * @param lastMessageNumber The lastMessageNumber parameter from the last response. Example: 100 (optional) - * @param firstMessageNumber The firstMessageNumber parameter from the last response. Example: 1 (optional) - * @param limit Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - * @param chatId Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - * @param minTime Filter messages received after specified time. Example: 1665396610 (optional) - * @param maxTime Filter messages received before specified time. Example: 1665396610 (optional) - * @param msgId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - * @return GetMessages - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public GetMessages messagesList(Boolean last, Integer lastMessageNumber, Integer firstMessageNumber, Integer limit, String chatId, Integer minTime, Integer maxTime, String msgId) throws ApiException { - ApiResponse localVarResp = messagesListWithHttpInfo(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - return localVarResp.getData(); - } - - /** - * Get messages list - * - * @param last Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - * @param lastMessageNumber The lastMessageNumber parameter from the last response. Example: 100 (optional) - * @param firstMessageNumber The firstMessageNumber parameter from the last response. Example: 1 (optional) - * @param limit Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - * @param chatId Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - * @param minTime Filter messages received after specified time. Example: 1665396610 (optional) - * @param maxTime Filter messages received before specified time. Example: 1665396610 (optional) - * @param msgId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - * @return ApiResponse<GetMessages> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse messagesListWithHttpInfo(Boolean last, Integer lastMessageNumber, Integer firstMessageNumber, Integer limit, String chatId, Integer minTime, Integer maxTime, String msgId) throws ApiException { - okhttp3.Call localVarCall = messagesListValidateBeforeCall(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get messages list (asynchronously) - * - * @param last Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - * @param lastMessageNumber The lastMessageNumber parameter from the last response. Example: 100 (optional) - * @param firstMessageNumber The firstMessageNumber parameter from the last response. Example: 1 (optional) - * @param limit Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - * @param chatId Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - * @param minTime Filter messages received after specified time. Example: 1665396610 (optional) - * @param maxTime Filter messages received before specified time. Example: 1665396610 (optional) - * @param msgId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call messagesListAsync(Boolean last, Integer lastMessageNumber, Integer firstMessageNumber, Integer limit, String chatId, Integer minTime, Integer maxTime, String msgId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = messagesListValidateBeforeCall(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for readMessage - * @param readMessageRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call readMessageCall(ReadMessageRequest readMessageRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = readMessageRequest; - - // create path and map variables - String localVarPath = "/readMessage"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readMessageValidateBeforeCall(ReadMessageRequest readMessageRequest, final ApiCallback _callback) throws ApiException { - return readMessageCall(readMessageRequest, _callback); - - } - - /** - * Mark message as read - * - * @param readMessageRequest (optional) - * @return SetMe - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public SetMe readMessage(ReadMessageRequest readMessageRequest) throws ApiException { - ApiResponse localVarResp = readMessageWithHttpInfo(readMessageRequest); - return localVarResp.getData(); - } - - /** - * Mark message as read - * - * @param readMessageRequest (optional) - * @return ApiResponse<SetMe> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse readMessageWithHttpInfo(ReadMessageRequest readMessageRequest) throws ApiException { - okhttp3.Call localVarCall = readMessageValidateBeforeCall(readMessageRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Mark message as read (asynchronously) - * - * @param readMessageRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call readMessageAsync(ReadMessageRequest readMessageRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = readMessageValidateBeforeCall(readMessageRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for sendContact - * @param sendContactRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendContactCall(SendContactRequest sendContactRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendContactRequest; - - // create path and map variables - String localVarPath = "/sendContact"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendContactValidateBeforeCall(SendContactRequest sendContactRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendContactRequest' is set - if (sendContactRequest == null) { - throw new ApiException("Missing the required parameter 'sendContactRequest' when calling sendContact(Async)"); - } - - return sendContactCall(sendContactRequest, _callback); - - } - - /** - * Send a Contact - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendContactRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendContact(SendContactRequest sendContactRequest) throws ApiException { - ApiResponse localVarResp = sendContactWithHttpInfo(sendContactRequest); - return localVarResp.getData(); - } - - /** - * Send a Contact - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendContactRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendContactWithHttpInfo(SendContactRequest sendContactRequest) throws ApiException { - okhttp3.Call localVarCall = sendContactValidateBeforeCall(sendContactRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send a Contact (asynchronously) - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendContactRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendContactAsync(SendContactRequest sendContactRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendContactValidateBeforeCall(sendContactRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for sendFile - * @param sendFileRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendFileCall(SendFileRequest sendFileRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendFileRequest; - - // create path and map variables - String localVarPath = "/sendFile"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendFileValidateBeforeCall(SendFileRequest sendFileRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendFileRequest' is set - if (sendFileRequest == null) { - throw new ApiException("Missing the required parameter 'sendFileRequest' when calling sendFile(Async)"); - } - - return sendFileCall(sendFileRequest, _callback); - - } - - /** - * Send a File - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendFileRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendFile(SendFileRequest sendFileRequest) throws ApiException { - ApiResponse localVarResp = sendFileWithHttpInfo(sendFileRequest); - return localVarResp.getData(); - } - - /** - * Send a File - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendFileRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendFileWithHttpInfo(SendFileRequest sendFileRequest) throws ApiException { - okhttp3.Call localVarCall = sendFileValidateBeforeCall(sendFileRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send a File (asynchronously) - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendFileRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendFileAsync(SendFileRequest sendFileRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendFileValidateBeforeCall(sendFileRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for sendList - * @param sendListRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendListCall(SendListRequest sendListRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendListRequest; - - // create path and map variables - String localVarPath = "/sendList"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendListValidateBeforeCall(SendListRequest sendListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendListRequest' is set - if (sendListRequest == null) { - throw new ApiException("Missing the required parameter 'sendListRequest' when calling sendList(Async)"); - } - - return sendListCall(sendListRequest, _callback); - - } - - /** - * Send List Message - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendListRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendList(SendListRequest sendListRequest) throws ApiException { - ApiResponse localVarResp = sendListWithHttpInfo(sendListRequest); - return localVarResp.getData(); - } - - /** - * Send List Message - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendListRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendListWithHttpInfo(SendListRequest sendListRequest) throws ApiException { - okhttp3.Call localVarCall = sendListValidateBeforeCall(sendListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send List Message (asynchronously) - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendListRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendListAsync(SendListRequest sendListRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendListValidateBeforeCall(sendListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for sendLocation - * @param sendLocationRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendLocationCall(SendLocationRequest sendLocationRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendLocationRequest; - - // create path and map variables - String localVarPath = "/sendLocation"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendLocationValidateBeforeCall(SendLocationRequest sendLocationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendLocationRequest' is set - if (sendLocationRequest == null) { - throw new ApiException("Missing the required parameter 'sendLocationRequest' when calling sendLocation(Async)"); - } - - return sendLocationCall(sendLocationRequest, _callback); - - } - - /** - * Send a Location - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendLocationRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendLocation(SendLocationRequest sendLocationRequest) throws ApiException { - ApiResponse localVarResp = sendLocationWithHttpInfo(sendLocationRequest); - return localVarResp.getData(); - } - - /** - * Send a Location - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendLocationRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendLocationWithHttpInfo(SendLocationRequest sendLocationRequest) throws ApiException { - okhttp3.Call localVarCall = sendLocationValidateBeforeCall(sendLocationRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send a Location (asynchronously) - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendLocationRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendLocationAsync(SendLocationRequest sendLocationRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendLocationValidateBeforeCall(sendLocationRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for sendMessage - * @param sendMessageRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendMessageCall(SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendMessageRequest; - - // create path and map variables - String localVarPath = "/sendMessage"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendMessageValidateBeforeCall(SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendMessageRequest' is set - if (sendMessageRequest == null) { - throw new ApiException("Missing the required parameter 'sendMessageRequest' when calling sendMessage(Async)"); - } - - return sendMessageCall(sendMessageRequest, _callback); - - } - - /** - * Send a Message - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendMessageRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendMessage(SendMessageRequest sendMessageRequest) throws ApiException { - ApiResponse localVarResp = sendMessageWithHttpInfo(sendMessageRequest); - return localVarResp.getData(); - } - - /** - * Send a Message - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendMessageRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendMessageWithHttpInfo(SendMessageRequest sendMessageRequest) throws ApiException { - okhttp3.Call localVarCall = sendMessageValidateBeforeCall(sendMessageRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send a Message (asynchronously) - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * @param sendMessageRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendMessageAsync(SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendMessageValidateBeforeCall(sendMessageRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java/src/main/java/org/openapitools/client/api/ProductsCatalogsApi.java b/java/src/main/java/org/openapitools/client/api/ProductsCatalogsApi.java deleted file mode 100644 index 854d23f..0000000 --- a/java/src/main/java/org/openapitools/client/api/ProductsCatalogsApi.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.Commerce; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.SendMessageStatus; -import org.openapitools.client.model.SendProductRequest; -import org.openapitools.client.model.SetCommerce; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ProductsCatalogsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ProductsCatalogsApi() { - this(Configuration.getDefaultApiClient()); - } - - public ProductsCatalogsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for sendProduct - * @param sendProductRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendProductCall(SendProductRequest sendProductRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendProductRequest; - - // create path and map variables - String localVarPath = "/sendProduct"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendProductValidateBeforeCall(SendProductRequest sendProductRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendProductRequest' is set - if (sendProductRequest == null) { - throw new ApiException("Missing the required parameter 'sendProductRequest' when calling sendProduct(Async)"); - } - - return sendProductCall(sendProductRequest, _callback); - - } - - /** - * Send a Product - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * @param sendProductRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendProduct(SendProductRequest sendProductRequest) throws ApiException { - ApiResponse localVarResp = sendProductWithHttpInfo(sendProductRequest); - return localVarResp.getData(); - } - - /** - * Send a Product - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * @param sendProductRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendProductWithHttpInfo(SendProductRequest sendProductRequest) throws ApiException { - okhttp3.Call localVarCall = sendProductValidateBeforeCall(sendProductRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send a Product (asynchronously) - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * @param sendProductRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendProductAsync(SendProductRequest sendProductRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendProductValidateBeforeCall(sendProductRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for setCommerce - * @param commerce (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call setCommerceCall(Commerce commerce, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = commerce; - - // create path and map variables - String localVarPath = "/commerce"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call setCommerceValidateBeforeCall(Commerce commerce, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'commerce' is set - if (commerce == null) { - throw new ApiException("Missing the required parameter 'commerce' when calling setCommerce(Async)"); - } - - return setCommerceCall(commerce, _callback); - - } - - /** - * Set Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @param commerce (required) - * @return SetCommerce - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public SetCommerce setCommerce(Commerce commerce) throws ApiException { - ApiResponse localVarResp = setCommerceWithHttpInfo(commerce); - return localVarResp.getData(); - } - - /** - * Set Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @param commerce (required) - * @return ApiResponse<SetCommerce> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse setCommerceWithHttpInfo(Commerce commerce) throws ApiException { - okhttp3.Call localVarCall = setCommerceValidateBeforeCall(commerce, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Set Commerce Settings (asynchronously) - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @param commerce (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call setCommerceAsync(Commerce commerce, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = setCommerceValidateBeforeCall(commerce, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java/src/main/java/org/openapitools/client/api/TemplatesApi.java b/java/src/main/java/org/openapitools/client/api/TemplatesApi.java deleted file mode 100644 index 8f16522..0000000 --- a/java/src/main/java/org/openapitools/client/api/TemplatesApi.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.AddTemplateRequest; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.GetTemplates; -import org.openapitools.client.model.RemoveTemplateRequest; -import org.openapitools.client.model.SendMessageStatus; -import org.openapitools.client.model.SendTemplateRequest; -import org.openapitools.client.model.SetMe; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TemplatesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public TemplatesApi() { - this(Configuration.getDefaultApiClient()); - } - - public TemplatesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for addTemplate - * @param addTemplateRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call addTemplateCall(AddTemplateRequest addTemplateRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = addTemplateRequest; - - // create path and map variables - String localVarPath = "/addTemplate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call addTemplateValidateBeforeCall(AddTemplateRequest addTemplateRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'addTemplateRequest' is set - if (addTemplateRequest == null) { - throw new ApiException("Missing the required parameter 'addTemplateRequest' when calling addTemplate(Async)"); - } - - return addTemplateCall(addTemplateRequest, _callback); - - } - - /** - * Create template - * Create new template for sending. - * @param addTemplateRequest (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public Object addTemplate(AddTemplateRequest addTemplateRequest) throws ApiException { - ApiResponse localVarResp = addTemplateWithHttpInfo(addTemplateRequest); - return localVarResp.getData(); - } - - /** - * Create template - * Create new template for sending. - * @param addTemplateRequest (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse addTemplateWithHttpInfo(AddTemplateRequest addTemplateRequest) throws ApiException { - okhttp3.Call localVarCall = addTemplateValidateBeforeCall(addTemplateRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create template (asynchronously) - * Create new template for sending. - * @param addTemplateRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call addTemplateAsync(AddTemplateRequest addTemplateRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addTemplateValidateBeforeCall(addTemplateRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for removeTemplate - * @param removeTemplateRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call removeTemplateCall(RemoveTemplateRequest removeTemplateRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = removeTemplateRequest; - - // create path and map variables - String localVarPath = "/removeTemplate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeTemplateValidateBeforeCall(RemoveTemplateRequest removeTemplateRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'removeTemplateRequest' is set - if (removeTemplateRequest == null) { - throw new ApiException("Missing the required parameter 'removeTemplateRequest' when calling removeTemplate(Async)"); - } - - return removeTemplateCall(removeTemplateRequest, _callback); - - } - - /** - * Remove template - * Deleted template can not be restored. - * @param removeTemplateRequest (required) - * @return SetMe - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SetMe removeTemplate(RemoveTemplateRequest removeTemplateRequest) throws ApiException { - ApiResponse localVarResp = removeTemplateWithHttpInfo(removeTemplateRequest); - return localVarResp.getData(); - } - - /** - * Remove template - * Deleted template can not be restored. - * @param removeTemplateRequest (required) - * @return ApiResponse<SetMe> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse removeTemplateWithHttpInfo(RemoveTemplateRequest removeTemplateRequest) throws ApiException { - okhttp3.Call localVarCall = removeTemplateValidateBeforeCall(removeTemplateRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Remove template (asynchronously) - * Deleted template can not be restored. - * @param removeTemplateRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call removeTemplateAsync(RemoveTemplateRequest removeTemplateRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeTemplateValidateBeforeCall(removeTemplateRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for sendTemplate - * @param sendTemplateRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendTemplateCall(SendTemplateRequest sendTemplateRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = sendTemplateRequest; - - // create path and map variables - String localVarPath = "/sendTemplate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendTemplateValidateBeforeCall(SendTemplateRequest sendTemplateRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'sendTemplateRequest' is set - if (sendTemplateRequest == null) { - throw new ApiException("Missing the required parameter 'sendTemplateRequest' when calling sendTemplate(Async)"); - } - - return sendTemplateCall(sendTemplateRequest, _callback); - - } - - /** - * Send Template Message - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * @param sendTemplateRequest (required) - * @return SendMessageStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SendMessageStatus sendTemplate(SendTemplateRequest sendTemplateRequest) throws ApiException { - ApiResponse localVarResp = sendTemplateWithHttpInfo(sendTemplateRequest); - return localVarResp.getData(); - } - - /** - * Send Template Message - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * @param sendTemplateRequest (required) - * @return ApiResponse<SendMessageStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse sendTemplateWithHttpInfo(SendTemplateRequest sendTemplateRequest) throws ApiException { - okhttp3.Call localVarCall = sendTemplateValidateBeforeCall(sendTemplateRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send Template Message (asynchronously) - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * @param sendTemplateRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call sendTemplateAsync(SendTemplateRequest sendTemplateRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendTemplateValidateBeforeCall(sendTemplateRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for templatesList - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call templatesListCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/templates"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call templatesListValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return templatesListCall(_callback); - - } - - /** - * Get templates list - * - * @return GetTemplates - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public GetTemplates templatesList() throws ApiException { - ApiResponse localVarResp = templatesListWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get templates list - * - * @return ApiResponse<GetTemplates> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse templatesListWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = templatesListValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get templates list (asynchronously) - * - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call templatesListAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = templatesListValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java/src/main/java/org/openapitools/client/api/WebhooksApi.java b/java/src/main/java/org/openapitools/client/api/WebhooksApi.java deleted file mode 100644 index 7f7d2a3..0000000 --- a/java/src/main/java/org/openapitools/client/api/WebhooksApi.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.GetAckInfo; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.SetWebhookStatus; -import org.openapitools.client.model.WebhookUrl; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class WebhooksApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public WebhooksApi() { - this(Configuration.getDefaultApiClient()); - } - - public WebhooksApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for ackHookInfo - * @param messageId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call ackHookInfoCall(String messageId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/hookInfo"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (messageId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("messageId", messageId)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call ackHookInfoValidateBeforeCall(String messageId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'messageId' is set - if (messageId == null) { - throw new ApiException("Missing the required parameter 'messageId' when calling ackHookInfo(Async)"); - } - - return ackHookInfoCall(messageId, _callback); - - } - - /** - * Check ACKs - * - * @param messageId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (required) - * @return GetAckInfo - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public GetAckInfo ackHookInfo(String messageId) throws ApiException { - ApiResponse localVarResp = ackHookInfoWithHttpInfo(messageId); - return localVarResp.getData(); - } - - /** - * Check ACKs - * - * @param messageId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (required) - * @return ApiResponse<GetAckInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public ApiResponse ackHookInfoWithHttpInfo(String messageId) throws ApiException { - okhttp3.Call localVarCall = ackHookInfoValidateBeforeCall(messageId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Check ACKs (asynchronously) - * - * @param messageId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Server response example -
401 Invalid token -
- */ - public okhttp3.Call ackHookInfoAsync(String messageId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = ackHookInfoValidateBeforeCall(messageId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for setWebhook - * @param webhookUrl (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call setWebhookCall(WebhookUrl webhookUrl, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = webhookUrl; - - // create path and map variables - String localVarPath = "/webhook"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded", - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call setWebhookValidateBeforeCall(WebhookUrl webhookUrl, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'webhookUrl' is set - if (webhookUrl == null) { - throw new ApiException("Missing the required parameter 'webhookUrl' when calling setWebhook(Async)"); - } - - return setWebhookCall(webhookUrl, _callback); - - } - - /** - * Set webhook - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * @param webhookUrl (required) - * @return SetWebhookStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public SetWebhookStatus setWebhook(WebhookUrl webhookUrl) throws ApiException { - ApiResponse localVarResp = setWebhookWithHttpInfo(webhookUrl); - return localVarResp.getData(); - } - - /** - * Set webhook - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * @param webhookUrl (required) - * @return ApiResponse<SetWebhookStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public ApiResponse setWebhookWithHttpInfo(WebhookUrl webhookUrl) throws ApiException { - okhttp3.Call localVarCall = setWebhookValidateBeforeCall(webhookUrl, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Set webhook (asynchronously) - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * @param webhookUrl (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Server response example -
- */ - public okhttp3.Call setWebhookAsync(WebhookUrl webhookUrl, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = setWebhookValidateBeforeCall(webhookUrl, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/java/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java deleted file mode 100644 index e0224d8..0000000 --- a/java/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:32:47.491345194+07:00[Asia/Bangkok]") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/java/src/main/java/org/openapitools/client/auth/Authentication.java b/java/src/main/java/org/openapitools/client/auth/Authentication.java deleted file mode 100644 index 471e524..0000000 --- a/java/src/main/java/org/openapitools/client/auth/Authentication.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; -} diff --git a/java/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/java/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java deleted file mode 100644 index 721e997..0000000 --- a/java/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import okhttp3.Credentials; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -import java.io.UnsupportedEncodingException; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/java/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/java/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java deleted file mode 100644 index c42207c..0000000 --- a/java/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:32:47.491345194+07:00[Asia/Bangkok]") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (bearerToken == null) { - return; - } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/java/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/java/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java deleted file mode 100644 index 177b1e7..0000000 --- a/java/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import io.onemessage.ApiException; -import java.util.Objects; -import java.lang.reflect.Type; -import java.util.Map; - -//import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map> getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - //@JsonValue - public Object getActualInstance() {return instance;} - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) {this.instance = instance;} - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) && - Objects.equals(this.isNullable, a.isNullable) && - Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } - - - -} diff --git a/java/src/main/java/org/openapitools/client/model/Ack.java b/java/src/main/java/org/openapitools/client/model/Ack.java deleted file mode 100644 index 3aa0877..0000000 --- a/java/src/main/java/org/openapitools/client/model/Ack.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Ack - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class Ack { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - /** - * type of the message status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - DELIVERED("delivered"), - - VIEWED("viewed"), - - SENT("sent"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public Ack() { - } - - public Ack id(String id) { - - this.id = id; - return this; - } - - /** - * unique id of message - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Ack chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * chat ID - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public Ack status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * type of the message status - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Ack ack = (Ack) o; - return Objects.equals(this.id, ack.id) && - Objects.equals(this.chatId, ack.chatId) && - Objects.equals(this.status, ack.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, chatId, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Ack {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("chatId"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Ack - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Ack.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Ack is not found in the empty JSON string", Ack.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Ack.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Ack` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Ack.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Ack' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Ack.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Ack value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Ack read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Ack given an JSON string - * - * @param jsonString JSON string - * @return An instance of Ack - * @throws IOException if the JSON string is invalid with respect to Ack - */ - public static Ack fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Ack.class); - } - - /** - * Convert an instance of Ack to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/AddTemplateRequest.java b/java/src/main/java/org/openapitools/client/model/AddTemplateRequest.java deleted file mode 100644 index caf3916..0000000 --- a/java/src/main/java/org/openapitools/client/model/AddTemplateRequest.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.TemplateCategoryProp; -import org.openapitools.client.model.TemplateComponentsProp; -import org.openapitools.client.model.TemplateLanguageProp; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * AddTemplateRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class AddTemplateRequest { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_CATEGORY = "category"; - @SerializedName(SERIALIZED_NAME_CATEGORY) - private TemplateCategoryProp category; - - public static final String SERIALIZED_NAME_COMPONENTS = "components"; - @SerializedName(SERIALIZED_NAME_COMPONENTS) - private TemplateComponentsProp components; - - public static final String SERIALIZED_NAME_LANGUAGE = "language"; - @SerializedName(SERIALIZED_NAME_LANGUAGE) - private TemplateLanguageProp language; - - public AddTemplateRequest() { - } - - public AddTemplateRequest name(String name) { - - this.name = name; - return this; - } - - /** - * Name of template - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public AddTemplateRequest category(TemplateCategoryProp category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nullable - public TemplateCategoryProp getCategory() { - return category; - } - - - public void setCategory(TemplateCategoryProp category) { - this.category = category; - } - - - public AddTemplateRequest components(TemplateComponentsProp components) { - - this.components = components; - return this; - } - - /** - * Get components - * @return components - **/ - @javax.annotation.Nullable - public TemplateComponentsProp getComponents() { - return components; - } - - - public void setComponents(TemplateComponentsProp components) { - this.components = components; - } - - - public AddTemplateRequest language(TemplateLanguageProp language) { - - this.language = language; - return this; - } - - /** - * Get language - * @return language - **/ - @javax.annotation.Nullable - public TemplateLanguageProp getLanguage() { - return language; - } - - - public void setLanguage(TemplateLanguageProp language) { - this.language = language; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddTemplateRequest addTemplateRequest = (AddTemplateRequest) o; - return Objects.equals(this.name, addTemplateRequest.name) && - Objects.equals(this.category, addTemplateRequest.category) && - Objects.equals(this.components, addTemplateRequest.components) && - Objects.equals(this.language, addTemplateRequest.language); - } - - @Override - public int hashCode() { - return Objects.hash(name, category, components, language); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AddTemplateRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" components: ").append(toIndentedString(components)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("category"); - openapiFields.add("components"); - openapiFields.add("language"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AddTemplateRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AddTemplateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AddTemplateRequest is not found in the empty JSON string", AddTemplateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AddTemplateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddTemplateRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AddTemplateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AddTemplateRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AddTemplateRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AddTemplateRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AddTemplateRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AddTemplateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AddTemplateRequest - * @throws IOException if the JSON string is invalid with respect to AddTemplateRequest - */ - public static AddTemplateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AddTemplateRequest.class); - } - - /** - * Convert an instance of AddTemplateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ChannelExtendedStatistics.java b/java/src/main/java/org/openapitools/client/model/ChannelExtendedStatistics.java deleted file mode 100644 index 01339b4..0000000 --- a/java/src/main/java/org/openapitools/client/model/ChannelExtendedStatistics.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ChannelExtendedStatisticsInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ChannelExtendedStatistics - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ChannelExtendedStatistics extends ArrayList { - public ChannelExtendedStatistics() { - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChannelExtendedStatistics {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChannelExtendedStatistics - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChannelExtendedStatistics.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChannelExtendedStatistics is not found in the empty JSON string", ChannelExtendedStatistics.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChannelExtendedStatistics.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChannelExtendedStatistics` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChannelExtendedStatistics.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChannelExtendedStatistics' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChannelExtendedStatistics.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChannelExtendedStatistics value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChannelExtendedStatistics read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChannelExtendedStatistics given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChannelExtendedStatistics - * @throws IOException if the JSON string is invalid with respect to ChannelExtendedStatistics - */ - public static ChannelExtendedStatistics fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChannelExtendedStatistics.class); - } - - /** - * Convert an instance of ChannelExtendedStatistics to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ChannelExtendedStatisticsInner.java b/java/src/main/java/org/openapitools/client/model/ChannelExtendedStatisticsInner.java deleted file mode 100644 index 82b6d2c..0000000 --- a/java/src/main/java/org/openapitools/client/model/ChannelExtendedStatisticsInner.java +++ /dev/null @@ -1,545 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ChannelExtendedStatisticsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ChannelExtendedStatisticsInner { - public static final String SERIALIZED_NAME_BUSINESS_INITIATED_PAID_QUANTITY = "business_initiated_paid_quantity"; - @SerializedName(SERIALIZED_NAME_BUSINESS_INITIATED_PAID_QUANTITY) - private Integer businessInitiatedPaidQuantity; - - public static final String SERIALIZED_NAME_BUSINESS_INITIATED_PRICE = "business_initiated_price"; - @SerializedName(SERIALIZED_NAME_BUSINESS_INITIATED_PRICE) - private BigDecimal businessInitiatedPrice; - - public static final String SERIALIZED_NAME_BUSINESS_INITIATED_QUANTITY = "business_initiated_quantity"; - @SerializedName(SERIALIZED_NAME_BUSINESS_INITIATED_QUANTITY) - private Integer businessInitiatedQuantity; - - public static final String SERIALIZED_NAME_FREE_ENTRY_POINT = "free_entry_point"; - @SerializedName(SERIALIZED_NAME_FREE_ENTRY_POINT) - private Integer freeEntryPoint; - - public static final String SERIALIZED_NAME_FREE_QUANTITY = "free_quantity"; - @SerializedName(SERIALIZED_NAME_FREE_QUANTITY) - private Integer freeQuantity; - - public static final String SERIALIZED_NAME_FREE_TIER = "free_tier"; - @SerializedName(SERIALIZED_NAME_FREE_TIER) - private Integer freeTier; - - public static final String SERIALIZED_NAME_PAID_QUANTITY = "paid_quantity"; - @SerializedName(SERIALIZED_NAME_PAID_QUANTITY) - private Integer paidQuantity; - - public static final String SERIALIZED_NAME_PERIOD_DATE = "period_date"; - @SerializedName(SERIALIZED_NAME_PERIOD_DATE) - private String periodDate; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private BigDecimal quantity; - - public static final String SERIALIZED_NAME_TOTAL_PRICE = "total_price"; - @SerializedName(SERIALIZED_NAME_TOTAL_PRICE) - private BigDecimal totalPrice; - - public static final String SERIALIZED_NAME_USER_INITIATED_PAID_QUANTITY = "user_initiated_paid_quantity"; - @SerializedName(SERIALIZED_NAME_USER_INITIATED_PAID_QUANTITY) - private Integer userInitiatedPaidQuantity; - - public static final String SERIALIZED_NAME_USER_INITIATED_PRICE = "user_initiated_price"; - @SerializedName(SERIALIZED_NAME_USER_INITIATED_PRICE) - private BigDecimal userInitiatedPrice; - - public static final String SERIALIZED_NAME_USER_INITIATED_QUANTITY = "user_initiated_quantity"; - @SerializedName(SERIALIZED_NAME_USER_INITIATED_QUANTITY) - private Integer userInitiatedQuantity; - - public ChannelExtendedStatisticsInner() { - } - - public ChannelExtendedStatisticsInner businessInitiatedPaidQuantity(Integer businessInitiatedPaidQuantity) { - - this.businessInitiatedPaidQuantity = businessInitiatedPaidQuantity; - return this; - } - - /** - * Get businessInitiatedPaidQuantity - * @return businessInitiatedPaidQuantity - **/ - @javax.annotation.Nullable - public Integer getBusinessInitiatedPaidQuantity() { - return businessInitiatedPaidQuantity; - } - - - public void setBusinessInitiatedPaidQuantity(Integer businessInitiatedPaidQuantity) { - this.businessInitiatedPaidQuantity = businessInitiatedPaidQuantity; - } - - - public ChannelExtendedStatisticsInner businessInitiatedPrice(BigDecimal businessInitiatedPrice) { - - this.businessInitiatedPrice = businessInitiatedPrice; - return this; - } - - /** - * Get businessInitiatedPrice - * @return businessInitiatedPrice - **/ - @javax.annotation.Nullable - public BigDecimal getBusinessInitiatedPrice() { - return businessInitiatedPrice; - } - - - public void setBusinessInitiatedPrice(BigDecimal businessInitiatedPrice) { - this.businessInitiatedPrice = businessInitiatedPrice; - } - - - public ChannelExtendedStatisticsInner businessInitiatedQuantity(Integer businessInitiatedQuantity) { - - this.businessInitiatedQuantity = businessInitiatedQuantity; - return this; - } - - /** - * Get businessInitiatedQuantity - * @return businessInitiatedQuantity - **/ - @javax.annotation.Nullable - public Integer getBusinessInitiatedQuantity() { - return businessInitiatedQuantity; - } - - - public void setBusinessInitiatedQuantity(Integer businessInitiatedQuantity) { - this.businessInitiatedQuantity = businessInitiatedQuantity; - } - - - public ChannelExtendedStatisticsInner freeEntryPoint(Integer freeEntryPoint) { - - this.freeEntryPoint = freeEntryPoint; - return this; - } - - /** - * Get freeEntryPoint - * @return freeEntryPoint - **/ - @javax.annotation.Nullable - public Integer getFreeEntryPoint() { - return freeEntryPoint; - } - - - public void setFreeEntryPoint(Integer freeEntryPoint) { - this.freeEntryPoint = freeEntryPoint; - } - - - public ChannelExtendedStatisticsInner freeQuantity(Integer freeQuantity) { - - this.freeQuantity = freeQuantity; - return this; - } - - /** - * Get freeQuantity - * @return freeQuantity - **/ - @javax.annotation.Nullable - public Integer getFreeQuantity() { - return freeQuantity; - } - - - public void setFreeQuantity(Integer freeQuantity) { - this.freeQuantity = freeQuantity; - } - - - public ChannelExtendedStatisticsInner freeTier(Integer freeTier) { - - this.freeTier = freeTier; - return this; - } - - /** - * Get freeTier - * @return freeTier - **/ - @javax.annotation.Nullable - public Integer getFreeTier() { - return freeTier; - } - - - public void setFreeTier(Integer freeTier) { - this.freeTier = freeTier; - } - - - public ChannelExtendedStatisticsInner paidQuantity(Integer paidQuantity) { - - this.paidQuantity = paidQuantity; - return this; - } - - /** - * Get paidQuantity - * @return paidQuantity - **/ - @javax.annotation.Nullable - public Integer getPaidQuantity() { - return paidQuantity; - } - - - public void setPaidQuantity(Integer paidQuantity) { - this.paidQuantity = paidQuantity; - } - - - public ChannelExtendedStatisticsInner periodDate(String periodDate) { - - this.periodDate = periodDate; - return this; - } - - /** - * Get periodDate - * @return periodDate - **/ - @javax.annotation.Nullable - public String getPeriodDate() { - return periodDate; - } - - - public void setPeriodDate(String periodDate) { - this.periodDate = periodDate; - } - - - public ChannelExtendedStatisticsInner quantity(BigDecimal quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public BigDecimal getQuantity() { - return quantity; - } - - - public void setQuantity(BigDecimal quantity) { - this.quantity = quantity; - } - - - public ChannelExtendedStatisticsInner totalPrice(BigDecimal totalPrice) { - - this.totalPrice = totalPrice; - return this; - } - - /** - * Get totalPrice - * @return totalPrice - **/ - @javax.annotation.Nullable - public BigDecimal getTotalPrice() { - return totalPrice; - } - - - public void setTotalPrice(BigDecimal totalPrice) { - this.totalPrice = totalPrice; - } - - - public ChannelExtendedStatisticsInner userInitiatedPaidQuantity(Integer userInitiatedPaidQuantity) { - - this.userInitiatedPaidQuantity = userInitiatedPaidQuantity; - return this; - } - - /** - * Get userInitiatedPaidQuantity - * @return userInitiatedPaidQuantity - **/ - @javax.annotation.Nullable - public Integer getUserInitiatedPaidQuantity() { - return userInitiatedPaidQuantity; - } - - - public void setUserInitiatedPaidQuantity(Integer userInitiatedPaidQuantity) { - this.userInitiatedPaidQuantity = userInitiatedPaidQuantity; - } - - - public ChannelExtendedStatisticsInner userInitiatedPrice(BigDecimal userInitiatedPrice) { - - this.userInitiatedPrice = userInitiatedPrice; - return this; - } - - /** - * Get userInitiatedPrice - * @return userInitiatedPrice - **/ - @javax.annotation.Nullable - public BigDecimal getUserInitiatedPrice() { - return userInitiatedPrice; - } - - - public void setUserInitiatedPrice(BigDecimal userInitiatedPrice) { - this.userInitiatedPrice = userInitiatedPrice; - } - - - public ChannelExtendedStatisticsInner userInitiatedQuantity(Integer userInitiatedQuantity) { - - this.userInitiatedQuantity = userInitiatedQuantity; - return this; - } - - /** - * Get userInitiatedQuantity - * @return userInitiatedQuantity - **/ - @javax.annotation.Nullable - public Integer getUserInitiatedQuantity() { - return userInitiatedQuantity; - } - - - public void setUserInitiatedQuantity(Integer userInitiatedQuantity) { - this.userInitiatedQuantity = userInitiatedQuantity; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChannelExtendedStatisticsInner channelExtendedStatisticsInner = (ChannelExtendedStatisticsInner) o; - return Objects.equals(this.businessInitiatedPaidQuantity, channelExtendedStatisticsInner.businessInitiatedPaidQuantity) && - Objects.equals(this.businessInitiatedPrice, channelExtendedStatisticsInner.businessInitiatedPrice) && - Objects.equals(this.businessInitiatedQuantity, channelExtendedStatisticsInner.businessInitiatedQuantity) && - Objects.equals(this.freeEntryPoint, channelExtendedStatisticsInner.freeEntryPoint) && - Objects.equals(this.freeQuantity, channelExtendedStatisticsInner.freeQuantity) && - Objects.equals(this.freeTier, channelExtendedStatisticsInner.freeTier) && - Objects.equals(this.paidQuantity, channelExtendedStatisticsInner.paidQuantity) && - Objects.equals(this.periodDate, channelExtendedStatisticsInner.periodDate) && - Objects.equals(this.quantity, channelExtendedStatisticsInner.quantity) && - Objects.equals(this.totalPrice, channelExtendedStatisticsInner.totalPrice) && - Objects.equals(this.userInitiatedPaidQuantity, channelExtendedStatisticsInner.userInitiatedPaidQuantity) && - Objects.equals(this.userInitiatedPrice, channelExtendedStatisticsInner.userInitiatedPrice) && - Objects.equals(this.userInitiatedQuantity, channelExtendedStatisticsInner.userInitiatedQuantity); - } - - @Override - public int hashCode() { - return Objects.hash(businessInitiatedPaidQuantity, businessInitiatedPrice, businessInitiatedQuantity, freeEntryPoint, freeQuantity, freeTier, paidQuantity, periodDate, quantity, totalPrice, userInitiatedPaidQuantity, userInitiatedPrice, userInitiatedQuantity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChannelExtendedStatisticsInner {\n"); - sb.append(" businessInitiatedPaidQuantity: ").append(toIndentedString(businessInitiatedPaidQuantity)).append("\n"); - sb.append(" businessInitiatedPrice: ").append(toIndentedString(businessInitiatedPrice)).append("\n"); - sb.append(" businessInitiatedQuantity: ").append(toIndentedString(businessInitiatedQuantity)).append("\n"); - sb.append(" freeEntryPoint: ").append(toIndentedString(freeEntryPoint)).append("\n"); - sb.append(" freeQuantity: ").append(toIndentedString(freeQuantity)).append("\n"); - sb.append(" freeTier: ").append(toIndentedString(freeTier)).append("\n"); - sb.append(" paidQuantity: ").append(toIndentedString(paidQuantity)).append("\n"); - sb.append(" periodDate: ").append(toIndentedString(periodDate)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" totalPrice: ").append(toIndentedString(totalPrice)).append("\n"); - sb.append(" userInitiatedPaidQuantity: ").append(toIndentedString(userInitiatedPaidQuantity)).append("\n"); - sb.append(" userInitiatedPrice: ").append(toIndentedString(userInitiatedPrice)).append("\n"); - sb.append(" userInitiatedQuantity: ").append(toIndentedString(userInitiatedQuantity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("business_initiated_paid_quantity"); - openapiFields.add("business_initiated_price"); - openapiFields.add("business_initiated_quantity"); - openapiFields.add("free_entry_point"); - openapiFields.add("free_quantity"); - openapiFields.add("free_tier"); - openapiFields.add("paid_quantity"); - openapiFields.add("period_date"); - openapiFields.add("quantity"); - openapiFields.add("total_price"); - openapiFields.add("user_initiated_paid_quantity"); - openapiFields.add("user_initiated_price"); - openapiFields.add("user_initiated_quantity"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChannelExtendedStatisticsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChannelExtendedStatisticsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChannelExtendedStatisticsInner is not found in the empty JSON string", ChannelExtendedStatisticsInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChannelExtendedStatisticsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChannelExtendedStatisticsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("period_date") != null && !jsonObj.get("period_date").isJsonNull()) && !jsonObj.get("period_date").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `period_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period_date").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChannelExtendedStatisticsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChannelExtendedStatisticsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChannelExtendedStatisticsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChannelExtendedStatisticsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChannelExtendedStatisticsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChannelExtendedStatisticsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChannelExtendedStatisticsInner - * @throws IOException if the JSON string is invalid with respect to ChannelExtendedStatisticsInner - */ - public static ChannelExtendedStatisticsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChannelExtendedStatisticsInner.class); - } - - /** - * Convert an instance of ChannelExtendedStatisticsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ChannelStatistics.java b/java/src/main/java/org/openapitools/client/model/ChannelStatistics.java deleted file mode 100644 index 4d63a3b..0000000 --- a/java/src/main/java/org/openapitools/client/model/ChannelStatistics.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ChannelStatistics - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ChannelStatistics { - public static final String SERIALIZED_NAME_DATE = "date"; - @SerializedName(SERIALIZED_NAME_DATE) - private String date; - - public static final String SERIALIZED_NAME_TEMPLATES_COST = "templates_cost"; - @SerializedName(SERIALIZED_NAME_TEMPLATES_COST) - private BigDecimal templatesCost; - - public ChannelStatistics() { - } - - public ChannelStatistics date(String date) { - - this.date = date; - return this; - } - - /** - * Get date - * @return date - **/ - @javax.annotation.Nullable - public String getDate() { - return date; - } - - - public void setDate(String date) { - this.date = date; - } - - - public ChannelStatistics templatesCost(BigDecimal templatesCost) { - - this.templatesCost = templatesCost; - return this; - } - - /** - * Get templatesCost - * @return templatesCost - **/ - @javax.annotation.Nullable - public BigDecimal getTemplatesCost() { - return templatesCost; - } - - - public void setTemplatesCost(BigDecimal templatesCost) { - this.templatesCost = templatesCost; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChannelStatistics channelStatistics = (ChannelStatistics) o; - return Objects.equals(this.date, channelStatistics.date) && - Objects.equals(this.templatesCost, channelStatistics.templatesCost); - } - - @Override - public int hashCode() { - return Objects.hash(date, templatesCost); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChannelStatistics {\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" templatesCost: ").append(toIndentedString(templatesCost)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("date"); - openapiFields.add("templates_cost"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChannelStatistics - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChannelStatistics.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChannelStatistics is not found in the empty JSON string", ChannelStatistics.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChannelStatistics.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChannelStatistics` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("date") != null && !jsonObj.get("date").isJsonNull()) && !jsonObj.get("date").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChannelStatistics.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChannelStatistics' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChannelStatistics.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChannelStatistics value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChannelStatistics read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChannelStatistics given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChannelStatistics - * @throws IOException if the JSON string is invalid with respect to ChannelStatistics - */ - public static ChannelStatistics fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChannelStatistics.class); - } - - /** - * Convert an instance of ChannelStatistics to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ChannelStatus.java b/java/src/main/java/org/openapitools/client/model/ChannelStatus.java deleted file mode 100644 index 9759a1a..0000000 --- a/java/src/main/java/org/openapitools/client/model/ChannelStatus.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ChannelStatus - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ChannelStatus { - /** - * channel Status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - CONNECTED("connected"), - - CONNECTING("connecting"), - - DISCONNECTED("disconnected"), - - UNINITIALIZED("uninitialized"), - - UNREGISTERED("unregistered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public ChannelStatus() { - } - - public ChannelStatus status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * channel Status - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChannelStatus channelStatus = (ChannelStatus) o; - return Objects.equals(this.status, channelStatus.status); - } - - @Override - public int hashCode() { - return Objects.hash(status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChannelStatus {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChannelStatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChannelStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChannelStatus is not found in the empty JSON string", ChannelStatus.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChannelStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChannelStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChannelStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChannelStatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChannelStatus.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChannelStatus value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChannelStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChannelStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChannelStatus - * @throws IOException if the JSON string is invalid with respect to ChannelStatus - */ - public static ChannelStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChannelStatus.class); - } - - /** - * Convert an instance of ChannelStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ChatIdProp.java b/java/src/main/java/org/openapitools/client/model/ChatIdProp.java deleted file mode 100644 index 1d23bea..0000000 --- a/java/src/main/java/org/openapitools/client/model/ChatIdProp.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ChatIdProp - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ChatIdProp { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public ChatIdProp() { - } - - public ChatIdProp chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChatIdProp chatIdProp = (ChatIdProp) o; - return Objects.equals(this.chatId, chatIdProp.chatId); - } - - @Override - public int hashCode() { - return Objects.hash(chatId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChatIdProp {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChatIdProp - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChatIdProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChatIdProp is not found in the empty JSON string", ChatIdProp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChatIdProp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChatIdProp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChatIdProp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChatIdProp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChatIdProp.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChatIdProp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChatIdProp read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChatIdProp given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChatIdProp - * @throws IOException if the JSON string is invalid with respect to ChatIdProp - */ - public static ChatIdProp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChatIdProp.class); - } - - /** - * Convert an instance of ChatIdProp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/Commerce.java b/java/src/main/java/org/openapitools/client/model/Commerce.java deleted file mode 100644 index 0b4b916..0000000 --- a/java/src/main/java/org/openapitools/client/model/Commerce.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CommerceParams; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Commerce - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class Commerce { - public static final String SERIALIZED_NAME_PARAMS = "params"; - @SerializedName(SERIALIZED_NAME_PARAMS) - private CommerceParams params; - - public Commerce() { - } - - public Commerce params(CommerceParams params) { - - this.params = params; - return this; - } - - /** - * Get params - * @return params - **/ - @javax.annotation.Nullable - public CommerceParams getParams() { - return params; - } - - - public void setParams(CommerceParams params) { - this.params = params; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Commerce commerce = (Commerce) o; - return Objects.equals(this.params, commerce.params); - } - - @Override - public int hashCode() { - return Objects.hash(params); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Commerce {\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("params"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Commerce - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Commerce.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Commerce is not found in the empty JSON string", Commerce.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Commerce.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Commerce` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `params` - if (jsonObj.get("params") != null && !jsonObj.get("params").isJsonNull()) { - CommerceParams.validateJsonElement(jsonObj.get("params")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Commerce.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Commerce' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Commerce.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Commerce value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Commerce read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Commerce given an JSON string - * - * @param jsonString JSON string - * @return An instance of Commerce - * @throws IOException if the JSON string is invalid with respect to Commerce - */ - public static Commerce fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Commerce.class); - } - - /** - * Convert an instance of Commerce to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/CommerceParams.java b/java/src/main/java/org/openapitools/client/model/CommerceParams.java deleted file mode 100644 index a049f10..0000000 --- a/java/src/main/java/org/openapitools/client/model/CommerceParams.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * CommerceParams - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class CommerceParams { - public static final String SERIALIZED_NAME_IS_CART_ENABLED = "is_cart_enabled"; - @SerializedName(SERIALIZED_NAME_IS_CART_ENABLED) - private Boolean isCartEnabled; - - public static final String SERIALIZED_NAME_IS_CATALOG_VISIBLE = "is_catalog_visible"; - @SerializedName(SERIALIZED_NAME_IS_CATALOG_VISIBLE) - private Boolean isCatalogVisible; - - public CommerceParams() { - } - - public CommerceParams isCartEnabled(Boolean isCartEnabled) { - - this.isCartEnabled = isCartEnabled; - return this; - } - - /** - * Get isCartEnabled - * @return isCartEnabled - **/ - @javax.annotation.Nonnull - public Boolean getIsCartEnabled() { - return isCartEnabled; - } - - - public void setIsCartEnabled(Boolean isCartEnabled) { - this.isCartEnabled = isCartEnabled; - } - - - public CommerceParams isCatalogVisible(Boolean isCatalogVisible) { - - this.isCatalogVisible = isCatalogVisible; - return this; - } - - /** - * Get isCatalogVisible - * @return isCatalogVisible - **/ - @javax.annotation.Nonnull - public Boolean getIsCatalogVisible() { - return isCatalogVisible; - } - - - public void setIsCatalogVisible(Boolean isCatalogVisible) { - this.isCatalogVisible = isCatalogVisible; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CommerceParams commerceParams = (CommerceParams) o; - return Objects.equals(this.isCartEnabled, commerceParams.isCartEnabled) && - Objects.equals(this.isCatalogVisible, commerceParams.isCatalogVisible); - } - - @Override - public int hashCode() { - return Objects.hash(isCartEnabled, isCatalogVisible); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CommerceParams {\n"); - sb.append(" isCartEnabled: ").append(toIndentedString(isCartEnabled)).append("\n"); - sb.append(" isCatalogVisible: ").append(toIndentedString(isCatalogVisible)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("is_cart_enabled"); - openapiFields.add("is_catalog_visible"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("is_cart_enabled"); - openapiRequiredFields.add("is_catalog_visible"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CommerceParams - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CommerceParams.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CommerceParams is not found in the empty JSON string", CommerceParams.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CommerceParams.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommerceParams` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommerceParams.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommerceParams.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommerceParams' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CommerceParams.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CommerceParams value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommerceParams read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CommerceParams given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommerceParams - * @throws IOException if the JSON string is invalid with respect to CommerceParams - */ - public static CommerceParams fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommerceParams.class); - } - - /** - * Convert an instance of CommerceParams to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/Contacts.java b/java/src/main/java/org/openapitools/client/model/Contacts.java deleted file mode 100644 index 206fd60..0000000 --- a/java/src/main/java/org/openapitools/client/model/Contacts.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ContactsContactsInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Contacts - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class Contacts { - public static final String SERIALIZED_NAME_CONTACTS = "contacts"; - @SerializedName(SERIALIZED_NAME_CONTACTS) - private List contacts; - - public Contacts() { - } - - public Contacts contacts(List contacts) { - - this.contacts = contacts; - return this; - } - - public Contacts addContactsItem(ContactsContactsInner contactsItem) { - if (this.contacts == null) { - this.contacts = new ArrayList<>(); - } - this.contacts.add(contactsItem); - return this; - } - - /** - * List of checked numbers - * @return contacts - **/ - @javax.annotation.Nullable - public List getContacts() { - return contacts; - } - - - public void setContacts(List contacts) { - this.contacts = contacts; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Contacts contacts = (Contacts) o; - return Objects.equals(this.contacts, contacts.contacts); - } - - @Override - public int hashCode() { - return Objects.hash(contacts); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Contacts {\n"); - sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contacts"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Contacts - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Contacts.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Contacts is not found in the empty JSON string", Contacts.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Contacts.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Contacts` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("contacts") != null && !jsonObj.get("contacts").isJsonNull()) { - JsonArray jsonArraycontacts = jsonObj.getAsJsonArray("contacts"); - if (jsonArraycontacts != null) { - // ensure the json data is an array - if (!jsonObj.get("contacts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `contacts` to be an array in the JSON string but got `%s`", jsonObj.get("contacts").toString())); - } - - // validate the optional field `contacts` (array) - for (int i = 0; i < jsonArraycontacts.size(); i++) { - ContactsContactsInner.validateJsonElement(jsonArraycontacts.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Contacts.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Contacts' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Contacts.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Contacts value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Contacts read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Contacts given an JSON string - * - * @param jsonString JSON string - * @return An instance of Contacts - * @throws IOException if the JSON string is invalid with respect to Contacts - */ - public static Contacts fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Contacts.class); - } - - /** - * Convert an instance of Contacts to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ContactsContactsInner.java b/java/src/main/java/org/openapitools/client/model/ContactsContactsInner.java deleted file mode 100644 index 8c4fc32..0000000 --- a/java/src/main/java/org/openapitools/client/model/ContactsContactsInner.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ContactsContactsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ContactsContactsInner { - public static final String SERIALIZED_NAME_INPUT = "input"; - @SerializedName(SERIALIZED_NAME_INPUT) - private String input; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_WA_ID = "wa_id"; - @SerializedName(SERIALIZED_NAME_WA_ID) - private String waId; - - public ContactsContactsInner() { - } - - public ContactsContactsInner input(String input) { - - this.input = input; - return this; - } - - /** - * Sent value - * @return input - **/ - @javax.annotation.Nullable - public String getInput() { - return input; - } - - - public void setInput(String input) { - this.input = input; - } - - - public ContactsContactsInner status(String status) { - - this.status = status; - return this; - } - - /** - * Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public ContactsContactsInner waId(String waId) { - - this.waId = waId; - return this; - } - - /** - * Formatted contact phone - * @return waId - **/ - @javax.annotation.Nullable - public String getWaId() { - return waId; - } - - - public void setWaId(String waId) { - this.waId = waId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ContactsContactsInner contactsContactsInner = (ContactsContactsInner) o; - return Objects.equals(this.input, contactsContactsInner.input) && - Objects.equals(this.status, contactsContactsInner.status) && - Objects.equals(this.waId, contactsContactsInner.waId); - } - - @Override - public int hashCode() { - return Objects.hash(input, status, waId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContactsContactsInner {\n"); - sb.append(" input: ").append(toIndentedString(input)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" waId: ").append(toIndentedString(waId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("input"); - openapiFields.add("status"); - openapiFields.add("wa_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ContactsContactsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ContactsContactsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ContactsContactsInner is not found in the empty JSON string", ContactsContactsInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ContactsContactsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ContactsContactsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("input") != null && !jsonObj.get("input").isJsonNull()) && !jsonObj.get("input").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `input` to be a primitive type in the JSON string but got `%s`", jsonObj.get("input").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("wa_id") != null && !jsonObj.get("wa_id").isJsonNull()) && !jsonObj.get("wa_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `wa_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("wa_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContactsContactsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ContactsContactsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ContactsContactsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ContactsContactsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ContactsContactsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ContactsContactsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ContactsContactsInner - * @throws IOException if the JSON string is invalid with respect to ContactsContactsInner - */ - public static ContactsContactsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ContactsContactsInner.class); - } - - /** - * Convert an instance of ContactsContactsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ContactsRequest.java b/java/src/main/java/org/openapitools/client/model/ContactsRequest.java deleted file mode 100644 index c1f833e..0000000 --- a/java/src/main/java/org/openapitools/client/model/ContactsRequest.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ContactsRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ContactsRequest { - public static final String SERIALIZED_NAME_BLOCKING = "blocking"; - @SerializedName(SERIALIZED_NAME_BLOCKING) - private String blocking; - - public static final String SERIALIZED_NAME_FORCE_CHECK = "force_check"; - @SerializedName(SERIALIZED_NAME_FORCE_CHECK) - private Boolean forceCheck; - - public static final String SERIALIZED_NAME_CONTACTS = "contacts"; - @SerializedName(SERIALIZED_NAME_CONTACTS) - private List contacts = new ArrayList<>(); - - public ContactsRequest() { - } - - public ContactsRequest blocking(String blocking) { - - this.blocking = blocking; - return this; - } - - /** - * Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) - * @return blocking - **/ - @javax.annotation.Nullable - public String getBlocking() { - return blocking; - } - - - public void setBlocking(String blocking) { - this.blocking = blocking; - } - - - public ContactsRequest forceCheck(Boolean forceCheck) { - - this.forceCheck = forceCheck; - return this; - } - - /** - * Using cache: *true* - ignore cache *false* - use cache (default) - * @return forceCheck - **/ - @javax.annotation.Nullable - public Boolean getForceCheck() { - return forceCheck; - } - - - public void setForceCheck(Boolean forceCheck) { - this.forceCheck = forceCheck; - } - - - public ContactsRequest contacts(List contacts) { - - this.contacts = contacts; - return this; - } - - public ContactsRequest addContactsItem(String contactsItem) { - if (this.contacts == null) { - this.contacts = new ArrayList<>(); - } - this.contacts.add(contactsItem); - return this; - } - - /** - * Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] - * @return contacts - **/ - @javax.annotation.Nonnull - public List getContacts() { - return contacts; - } - - - public void setContacts(List contacts) { - this.contacts = contacts; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ContactsRequest contactsRequest = (ContactsRequest) o; - return Objects.equals(this.blocking, contactsRequest.blocking) && - Objects.equals(this.forceCheck, contactsRequest.forceCheck) && - Objects.equals(this.contacts, contactsRequest.contacts); - } - - @Override - public int hashCode() { - return Objects.hash(blocking, forceCheck, contacts); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContactsRequest {\n"); - sb.append(" blocking: ").append(toIndentedString(blocking)).append("\n"); - sb.append(" forceCheck: ").append(toIndentedString(forceCheck)).append("\n"); - sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("blocking"); - openapiFields.add("force_check"); - openapiFields.add("contacts"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("contacts"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ContactsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ContactsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ContactsRequest is not found in the empty JSON string", ContactsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ContactsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ContactsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ContactsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("blocking") != null && !jsonObj.get("blocking").isJsonNull()) && !jsonObj.get("blocking").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blocking` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blocking").toString())); - } - // ensure the required json array is present - if (jsonObj.get("contacts") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("contacts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `contacts` to be an array in the JSON string but got `%s`", jsonObj.get("contacts").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContactsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ContactsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ContactsRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ContactsRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ContactsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ContactsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ContactsRequest - * @throws IOException if the JSON string is invalid with respect to ContactsRequest - */ - public static ContactsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ContactsRequest.class); - } - - /** - * Convert an instance of ContactsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetAckInfo.java b/java/src/main/java/org/openapitools/client/model/GetAckInfo.java deleted file mode 100644 index 9a16702..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetAckInfo.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.GetAckInfoHooksInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetAckInfo - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetAckInfo { - public static final String SERIALIZED_NAME_HOOKS = "hooks"; - @SerializedName(SERIALIZED_NAME_HOOKS) - private List hooks; - - public GetAckInfo() { - } - - public GetAckInfo hooks(List hooks) { - - this.hooks = hooks; - return this; - } - - public GetAckInfo addHooksItem(GetAckInfoHooksInner hooksItem) { - if (this.hooks == null) { - this.hooks = new ArrayList<>(); - } - this.hooks.add(hooksItem); - return this; - } - - /** - * Get hooks - * @return hooks - **/ - @javax.annotation.Nullable - public List getHooks() { - return hooks; - } - - - public void setHooks(List hooks) { - this.hooks = hooks; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAckInfo getAckInfo = (GetAckInfo) o; - return Objects.equals(this.hooks, getAckInfo.hooks); - } - - @Override - public int hashCode() { - return Objects.hash(hooks); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAckInfo {\n"); - sb.append(" hooks: ").append(toIndentedString(hooks)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hooks"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetAckInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetAckInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetAckInfo is not found in the empty JSON string", GetAckInfo.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetAckInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetAckInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("hooks") != null && !jsonObj.get("hooks").isJsonNull()) { - JsonArray jsonArrayhooks = jsonObj.getAsJsonArray("hooks"); - if (jsonArrayhooks != null) { - // ensure the json data is an array - if (!jsonObj.get("hooks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `hooks` to be an array in the JSON string but got `%s`", jsonObj.get("hooks").toString())); - } - - // validate the optional field `hooks` (array) - for (int i = 0; i < jsonArrayhooks.size(); i++) { - GetAckInfoHooksInner.validateJsonElement(jsonArrayhooks.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetAckInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetAckInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetAckInfo.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetAckInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetAckInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetAckInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetAckInfo - * @throws IOException if the JSON string is invalid with respect to GetAckInfo - */ - public static GetAckInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetAckInfo.class); - } - - /** - * Convert an instance of GetAckInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetAckInfoHooksInner.java b/java/src/main/java/org/openapitools/client/model/GetAckInfoHooksInner.java deleted file mode 100644 index ebbbdf0..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetAckInfoHooksInner.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetAckInfoHooksInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetAckInfoHooksInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_PRICING = "pricing"; - @SerializedName(SERIALIZED_NAME_PRICING) - private Object pricing; - - public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; - @SerializedName(SERIALIZED_NAME_TIMESTAMP) - private String timestamp; - - public static final String SERIALIZED_NAME_CONVERSATION = "conversation"; - @SerializedName(SERIALIZED_NAME_CONVERSATION) - private Object conversation; - - public static final String SERIALIZED_NAME_RECIPIENT_ID = "recipient_id"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_ID) - private String recipientId; - - public GetAckInfoHooksInner() { - } - - public GetAckInfoHooksInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public GetAckInfoHooksInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public GetAckInfoHooksInner status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public GetAckInfoHooksInner pricing(Object pricing) { - - this.pricing = pricing; - return this; - } - - /** - * Get pricing - * @return pricing - **/ - @javax.annotation.Nullable - public Object getPricing() { - return pricing; - } - - - public void setPricing(Object pricing) { - this.pricing = pricing; - } - - - public GetAckInfoHooksInner timestamp(String timestamp) { - - this.timestamp = timestamp; - return this; - } - - /** - * Get timestamp - * @return timestamp - **/ - @javax.annotation.Nullable - public String getTimestamp() { - return timestamp; - } - - - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } - - - public GetAckInfoHooksInner conversation(Object conversation) { - - this.conversation = conversation; - return this; - } - - /** - * Get conversation - * @return conversation - **/ - @javax.annotation.Nullable - public Object getConversation() { - return conversation; - } - - - public void setConversation(Object conversation) { - this.conversation = conversation; - } - - - public GetAckInfoHooksInner recipientId(String recipientId) { - - this.recipientId = recipientId; - return this; - } - - /** - * Get recipientId - * @return recipientId - **/ - @javax.annotation.Nullable - public String getRecipientId() { - return recipientId; - } - - - public void setRecipientId(String recipientId) { - this.recipientId = recipientId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAckInfoHooksInner getAckInfoHooksInner = (GetAckInfoHooksInner) o; - return Objects.equals(this.id, getAckInfoHooksInner.id) && - Objects.equals(this.type, getAckInfoHooksInner.type) && - Objects.equals(this.status, getAckInfoHooksInner.status) && - Objects.equals(this.pricing, getAckInfoHooksInner.pricing) && - Objects.equals(this.timestamp, getAckInfoHooksInner.timestamp) && - Objects.equals(this.conversation, getAckInfoHooksInner.conversation) && - Objects.equals(this.recipientId, getAckInfoHooksInner.recipientId); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, status, pricing, timestamp, conversation, recipientId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAckInfoHooksInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" pricing: ").append(toIndentedString(pricing)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" conversation: ").append(toIndentedString(conversation)).append("\n"); - sb.append(" recipientId: ").append(toIndentedString(recipientId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("status"); - openapiFields.add("pricing"); - openapiFields.add("timestamp"); - openapiFields.add("conversation"); - openapiFields.add("recipient_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetAckInfoHooksInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetAckInfoHooksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetAckInfoHooksInner is not found in the empty JSON string", GetAckInfoHooksInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetAckInfoHooksInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetAckInfoHooksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) && !jsonObj.get("timestamp").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timestamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timestamp").toString())); - } - if ((jsonObj.get("recipient_id") != null && !jsonObj.get("recipient_id").isJsonNull()) && !jsonObj.get("recipient_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipient_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipient_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetAckInfoHooksInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetAckInfoHooksInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetAckInfoHooksInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetAckInfoHooksInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetAckInfoHooksInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetAckInfoHooksInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetAckInfoHooksInner - * @throws IOException if the JSON string is invalid with respect to GetAckInfoHooksInner - */ - public static GetAckInfoHooksInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetAckInfoHooksInner.class); - } - - /** - * Convert an instance of GetAckInfoHooksInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetCommerce.java b/java/src/main/java/org/openapitools/client/model/GetCommerce.java deleted file mode 100644 index 91e5d5c..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetCommerce.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.GetCommerceInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetCommerce - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetCommerce extends ArrayList { - public GetCommerce() { - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetCommerce {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetCommerce - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetCommerce.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetCommerce is not found in the empty JSON string", GetCommerce.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetCommerce.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetCommerce` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetCommerce.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetCommerce' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetCommerce.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetCommerce value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetCommerce read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetCommerce given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetCommerce - * @throws IOException if the JSON string is invalid with respect to GetCommerce - */ - public static GetCommerce fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetCommerce.class); - } - - /** - * Convert an instance of GetCommerce to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetCommerceInner.java b/java/src/main/java/org/openapitools/client/model/GetCommerceInner.java deleted file mode 100644 index 4252604..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetCommerceInner.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetCommerceInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetCommerceInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_IS_CART_ENABLED = "is_cart_enabled"; - @SerializedName(SERIALIZED_NAME_IS_CART_ENABLED) - private Boolean isCartEnabled; - - public static final String SERIALIZED_NAME_IS_CATALOG_VISIBLE = "is_catalog_visible"; - @SerializedName(SERIALIZED_NAME_IS_CATALOG_VISIBLE) - private Boolean isCatalogVisible; - - public GetCommerceInner() { - } - - public GetCommerceInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public GetCommerceInner isCartEnabled(Boolean isCartEnabled) { - - this.isCartEnabled = isCartEnabled; - return this; - } - - /** - * Get isCartEnabled - * @return isCartEnabled - **/ - @javax.annotation.Nullable - public Boolean getIsCartEnabled() { - return isCartEnabled; - } - - - public void setIsCartEnabled(Boolean isCartEnabled) { - this.isCartEnabled = isCartEnabled; - } - - - public GetCommerceInner isCatalogVisible(Boolean isCatalogVisible) { - - this.isCatalogVisible = isCatalogVisible; - return this; - } - - /** - * Get isCatalogVisible - * @return isCatalogVisible - **/ - @javax.annotation.Nullable - public Boolean getIsCatalogVisible() { - return isCatalogVisible; - } - - - public void setIsCatalogVisible(Boolean isCatalogVisible) { - this.isCatalogVisible = isCatalogVisible; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCommerceInner getCommerceInner = (GetCommerceInner) o; - return Objects.equals(this.id, getCommerceInner.id) && - Objects.equals(this.isCartEnabled, getCommerceInner.isCartEnabled) && - Objects.equals(this.isCatalogVisible, getCommerceInner.isCatalogVisible); - } - - @Override - public int hashCode() { - return Objects.hash(id, isCartEnabled, isCatalogVisible); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetCommerceInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" isCartEnabled: ").append(toIndentedString(isCartEnabled)).append("\n"); - sb.append(" isCatalogVisible: ").append(toIndentedString(isCatalogVisible)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("is_cart_enabled"); - openapiFields.add("is_catalog_visible"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetCommerceInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetCommerceInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetCommerceInner is not found in the empty JSON string", GetCommerceInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetCommerceInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetCommerceInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetCommerceInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetCommerceInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetCommerceInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetCommerceInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetCommerceInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetCommerceInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetCommerceInner - * @throws IOException if the JSON string is invalid with respect to GetCommerceInner - */ - public static GetCommerceInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetCommerceInner.class); - } - - /** - * Convert an instance of GetCommerceInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetIP.java b/java/src/main/java/org/openapitools/client/model/GetIP.java deleted file mode 100644 index 69b9d00..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetIP.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetIP - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetIP { - public static final String SERIALIZED_NAME_RESULT = "result"; - @SerializedName(SERIALIZED_NAME_RESULT) - private String result; - - public GetIP() { - } - - public GetIP result(String result) { - - this.result = result; - return this; - } - - /** - * Get result - * @return result - **/ - @javax.annotation.Nullable - public String getResult() { - return result; - } - - - public void setResult(String result) { - this.result = result; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetIP getIP = (GetIP) o; - return Objects.equals(this.result, getIP.result); - } - - @Override - public int hashCode() { - return Objects.hash(result); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetIP {\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("result"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetIP - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetIP.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetIP is not found in the empty JSON string", GetIP.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetIP.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetIP` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetIP.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetIP' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetIP.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetIP value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetIP read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetIP given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetIP - * @throws IOException if the JSON string is invalid with respect to GetIP - */ - public static GetIP fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetIP.class); - } - - /** - * Convert an instance of GetIP to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetMe.java b/java/src/main/java/org/openapitools/client/model/GetMe.java deleted file mode 100644 index b2e35f3..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetMe.java +++ /dev/null @@ -1,473 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetMe - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetMe { - public static final String SERIALIZED_NAME_ABOUT = "about"; - @SerializedName(SERIALIZED_NAME_ABOUT) - private String about; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private String phone; - - /** - * Industry of the business - */ - @JsonAdapter(VerticalEnum.Adapter.class) - public enum VerticalEnum { - AUTOMOTIVE("Automotive"), - - BEAUTY_SPA_AND_SALON("Beauty, Spa and Salon"), - - CLOTHING_AND_APPAREL("Clothing and Apparel"), - - EDUCATION("Education"), - - ENTERTAINMENT("Entertainment"), - - EVENT_PLANNING_AND_SERVICE("Event Planning and Service"), - - FINANCE_AND_BANKING("Finance and Banking"), - - FOOD_AND_GROCERY("Food and Grocery"), - - PUBLIC_SERVICE("Public Service"), - - HOTEL_AND_LODGING("Hotel and Lodging"), - - MEDICAL_AND_HEALTH("Medical and Health"), - - NON_PROFIT("Non-profit"), - - PROFESSIONAL_SERVICES("Professional Services"), - - SHOPPING_AND_RETAIL("Shopping and Retail"), - - TRAVEL_AND_TRANSPORTATION("Travel and Transportation"), - - RESTAURANT("Restaurant"), - - OTHER("Other"), - - EMPTY(""); - - private String value; - - VerticalEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VerticalEnum fromValue(String value) { - for (VerticalEnum b : VerticalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VerticalEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VerticalEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VerticalEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_VERTICAL = "vertical"; - @SerializedName(SERIALIZED_NAME_VERTICAL) - private VerticalEnum vertical; - - public static final String SERIALIZED_NAME_PHOTO = "photo"; - @SerializedName(SERIALIZED_NAME_PHOTO) - private String photo; - - public GetMe() { - } - - public GetMe about(String about) { - - this.about = about; - return this; - } - - /** - * Profile`s About section. - * @return about - **/ - @javax.annotation.Nullable - public String getAbout() { - return about; - } - - - public void setAbout(String about) { - this.about = about; - } - - - public GetMe address(String address) { - - this.address = address; - return this; - } - - /** - * Address of the business - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public GetMe description(String description) { - - this.description = description; - return this; - } - - /** - * Description of the business. Max 256 characters - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public GetMe email(String email) { - - this.email = email; - return this; - } - - /** - * Business email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public GetMe phone(String phone) { - - this.phone = phone; - return this; - } - - /** - * Linked phone number - * @return phone - **/ - @javax.annotation.Nullable - public String getPhone() { - return phone; - } - - - public void setPhone(String phone) { - this.phone = phone; - } - - - public GetMe vertical(VerticalEnum vertical) { - - this.vertical = vertical; - return this; - } - - /** - * Industry of the business - * @return vertical - **/ - @javax.annotation.Nullable - public VerticalEnum getVertical() { - return vertical; - } - - - public void setVertical(VerticalEnum vertical) { - this.vertical = vertical; - } - - - public GetMe photo(String photo) { - - this.photo = photo; - return this; - } - - /** - * Get photo - * @return photo - **/ - @javax.annotation.Nullable - public String getPhoto() { - return photo; - } - - - public void setPhoto(String photo) { - this.photo = photo; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMe getMe = (GetMe) o; - return Objects.equals(this.about, getMe.about) && - Objects.equals(this.address, getMe.address) && - Objects.equals(this.description, getMe.description) && - Objects.equals(this.email, getMe.email) && - Objects.equals(this.phone, getMe.phone) && - Objects.equals(this.vertical, getMe.vertical) && - Objects.equals(this.photo, getMe.photo); - } - - @Override - public int hashCode() { - return Objects.hash(about, address, description, email, phone, vertical, photo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetMe {\n"); - sb.append(" about: ").append(toIndentedString(about)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" vertical: ").append(toIndentedString(vertical)).append("\n"); - sb.append(" photo: ").append(toIndentedString(photo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("about"); - openapiFields.add("address"); - openapiFields.add("description"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("vertical"); - openapiFields.add("photo"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetMe - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetMe.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetMe is not found in the empty JSON string", GetMe.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetMe.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetMe` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("about") != null && !jsonObj.get("about").isJsonNull()) && !jsonObj.get("about").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `about` to be a primitive type in the JSON string but got `%s`", jsonObj.get("about").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); - } - if ((jsonObj.get("vertical") != null && !jsonObj.get("vertical").isJsonNull()) && !jsonObj.get("vertical").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vertical` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vertical").toString())); - } - if ((jsonObj.get("photo") != null && !jsonObj.get("photo").isJsonNull()) && !jsonObj.get("photo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `photo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("photo").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetMe.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetMe' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetMe.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetMe value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetMe read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetMe given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetMe - * @throws IOException if the JSON string is invalid with respect to GetMe - */ - public static GetMe fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetMe.class); - } - - /** - * Convert an instance of GetMe to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetMe401Response.java b/java/src/main/java/org/openapitools/client/model/GetMe401Response.java deleted file mode 100644 index 832933c..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetMe401Response.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetMe401Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetMe401Response { - public static final String SERIALIZED_NAME_ERROR = "error"; - @SerializedName(SERIALIZED_NAME_ERROR) - private String error; - - public GetMe401Response() { - } - - public GetMe401Response error(String error) { - - this.error = error; - return this; - } - - /** - * Get error - * @return error - **/ - @javax.annotation.Nullable - public String getError() { - return error; - } - - - public void setError(String error) { - this.error = error; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMe401Response getMe401Response = (GetMe401Response) o; - return Objects.equals(this.error, getMe401Response.error); - } - - @Override - public int hashCode() { - return Objects.hash(error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetMe401Response {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("error"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetMe401Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetMe401Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetMe401Response is not found in the empty JSON string", GetMe401Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetMe401Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetMe401Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetMe401Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetMe401Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetMe401Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetMe401Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetMe401Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetMe401Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetMe401Response - * @throws IOException if the JSON string is invalid with respect to GetMe401Response - */ - public static GetMe401Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetMe401Response.class); - } - - /** - * Convert an instance of GetMe401Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetMessages.java b/java/src/main/java/org/openapitools/client/model/GetMessages.java deleted file mode 100644 index 79cf96d..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetMessages.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.GetMessagesMessagesInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetMessages - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetMessages { - public static final String SERIALIZED_NAME_MESSAGES = "messages"; - @SerializedName(SERIALIZED_NAME_MESSAGES) - private List messages; - - public GetMessages() { - } - - public GetMessages messages(List messages) { - - this.messages = messages; - return this; - } - - public GetMessages addMessagesItem(GetMessagesMessagesInner messagesItem) { - if (this.messages == null) { - this.messages = new ArrayList<>(); - } - this.messages.add(messagesItem); - return this; - } - - /** - * Get messages - * @return messages - **/ - @javax.annotation.Nullable - public List getMessages() { - return messages; - } - - - public void setMessages(List messages) { - this.messages = messages; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMessages getMessages = (GetMessages) o; - return Objects.equals(this.messages, getMessages.messages); - } - - @Override - public int hashCode() { - return Objects.hash(messages); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetMessages {\n"); - sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messages"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetMessages - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetMessages.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetMessages is not found in the empty JSON string", GetMessages.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetMessages.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetMessages` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("messages") != null && !jsonObj.get("messages").isJsonNull()) { - JsonArray jsonArraymessages = jsonObj.getAsJsonArray("messages"); - if (jsonArraymessages != null) { - // ensure the json data is an array - if (!jsonObj.get("messages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); - } - - // validate the optional field `messages` (array) - for (int i = 0; i < jsonArraymessages.size(); i++) { - GetMessagesMessagesInner.validateJsonElement(jsonArraymessages.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetMessages.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetMessages' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetMessages.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetMessages value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetMessages read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetMessages given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetMessages - * @throws IOException if the JSON string is invalid with respect to GetMessages - */ - public static GetMessages fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetMessages.class); - } - - /** - * Convert an instance of GetMessages to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetMessagesMessagesInner.java b/java/src/main/java/org/openapitools/client/model/GetMessagesMessagesInner.java deleted file mode 100644 index d7f2cb3..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetMessagesMessagesInner.java +++ /dev/null @@ -1,624 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetMessagesMessagesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetMessagesMessagesInner { - public static final String SERIALIZED_NAME_MESSAGE_NUMBER = "messageNumber"; - @SerializedName(SERIALIZED_NAME_MESSAGE_NUMBER) - private Integer messageNumber; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_FROM_ME = "fromMe"; - @SerializedName(SERIALIZED_NAME_FROM_ME) - private Boolean fromMe; - - public static final String SERIALIZED_NAME_SELF = "self"; - @SerializedName(SERIALIZED_NAME_SELF) - private Integer self; - - public static final String SERIALIZED_NAME_IS_FORWARDED = "isForwarded"; - @SerializedName(SERIALIZED_NAME_IS_FORWARDED) - private Integer isForwarded; - - public static final String SERIALIZED_NAME_AUTHOR = "author"; - @SerializedName(SERIALIZED_NAME_AUTHOR) - private String author; - - public static final String SERIALIZED_NAME_TIME = "time"; - @SerializedName(SERIALIZED_NAME_TIME) - private Integer time; - - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_SENDER_NAME = "senderName"; - @SerializedName(SERIALIZED_NAME_SENDER_NAME) - private String senderName; - - public static final String SERIALIZED_NAME_CAPTION = "caption"; - @SerializedName(SERIALIZED_NAME_CAPTION) - private String caption; - - public static final String SERIALIZED_NAME_QUOTED_MSG_ID = "quotedMsgId"; - @SerializedName(SERIALIZED_NAME_QUOTED_MSG_ID) - private String quotedMsgId; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - @SerializedName(SERIALIZED_NAME_METADATA) - private Object metadata; - - public static final String SERIALIZED_NAME_CHAT_NAME = "chatName"; - @SerializedName(SERIALIZED_NAME_CHAT_NAME) - private String chatName; - - public GetMessagesMessagesInner() { - } - - public GetMessagesMessagesInner messageNumber(Integer messageNumber) { - - this.messageNumber = messageNumber; - return this; - } - - /** - * Get messageNumber - * @return messageNumber - **/ - @javax.annotation.Nullable - public Integer getMessageNumber() { - return messageNumber; - } - - - public void setMessageNumber(Integer messageNumber) { - this.messageNumber = messageNumber; - } - - - public GetMessagesMessagesInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public GetMessagesMessagesInner body(String body) { - - this.body = body; - return this; - } - - /** - * Get body - * @return body - **/ - @javax.annotation.Nullable - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - public GetMessagesMessagesInner fromMe(Boolean fromMe) { - - this.fromMe = fromMe; - return this; - } - - /** - * Get fromMe - * @return fromMe - **/ - @javax.annotation.Nullable - public Boolean getFromMe() { - return fromMe; - } - - - public void setFromMe(Boolean fromMe) { - this.fromMe = fromMe; - } - - - public GetMessagesMessagesInner self(Integer self) { - - this.self = self; - return this; - } - - /** - * Get self - * @return self - **/ - @javax.annotation.Nullable - public Integer getSelf() { - return self; - } - - - public void setSelf(Integer self) { - this.self = self; - } - - - public GetMessagesMessagesInner isForwarded(Integer isForwarded) { - - this.isForwarded = isForwarded; - return this; - } - - /** - * Get isForwarded - * @return isForwarded - **/ - @javax.annotation.Nullable - public Integer getIsForwarded() { - return isForwarded; - } - - - public void setIsForwarded(Integer isForwarded) { - this.isForwarded = isForwarded; - } - - - public GetMessagesMessagesInner author(String author) { - - this.author = author; - return this; - } - - /** - * Get author - * @return author - **/ - @javax.annotation.Nullable - public String getAuthor() { - return author; - } - - - public void setAuthor(String author) { - this.author = author; - } - - - public GetMessagesMessagesInner time(Integer time) { - - this.time = time; - return this; - } - - /** - * Get time - * @return time - **/ - @javax.annotation.Nullable - public Integer getTime() { - return time; - } - - - public void setTime(Integer time) { - this.time = time; - } - - - public GetMessagesMessagesInner chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * Get chatId - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public GetMessagesMessagesInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public GetMessagesMessagesInner senderName(String senderName) { - - this.senderName = senderName; - return this; - } - - /** - * Get senderName - * @return senderName - **/ - @javax.annotation.Nullable - public String getSenderName() { - return senderName; - } - - - public void setSenderName(String senderName) { - this.senderName = senderName; - } - - - public GetMessagesMessagesInner caption(String caption) { - - this.caption = caption; - return this; - } - - /** - * Get caption - * @return caption - **/ - @javax.annotation.Nullable - public String getCaption() { - return caption; - } - - - public void setCaption(String caption) { - this.caption = caption; - } - - - public GetMessagesMessagesInner quotedMsgId(String quotedMsgId) { - - this.quotedMsgId = quotedMsgId; - return this; - } - - /** - * Get quotedMsgId - * @return quotedMsgId - **/ - @javax.annotation.Nullable - public String getQuotedMsgId() { - return quotedMsgId; - } - - - public void setQuotedMsgId(String quotedMsgId) { - this.quotedMsgId = quotedMsgId; - } - - - public GetMessagesMessagesInner metadata(Object metadata) { - - this.metadata = metadata; - return this; - } - - /** - * Get metadata - * @return metadata - **/ - @javax.annotation.Nullable - public Object getMetadata() { - return metadata; - } - - - public void setMetadata(Object metadata) { - this.metadata = metadata; - } - - - public GetMessagesMessagesInner chatName(String chatName) { - - this.chatName = chatName; - return this; - } - - /** - * Get chatName - * @return chatName - **/ - @javax.annotation.Nullable - public String getChatName() { - return chatName; - } - - - public void setChatName(String chatName) { - this.chatName = chatName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMessagesMessagesInner getMessagesMessagesInner = (GetMessagesMessagesInner) o; - return Objects.equals(this.messageNumber, getMessagesMessagesInner.messageNumber) && - Objects.equals(this.id, getMessagesMessagesInner.id) && - Objects.equals(this.body, getMessagesMessagesInner.body) && - Objects.equals(this.fromMe, getMessagesMessagesInner.fromMe) && - Objects.equals(this.self, getMessagesMessagesInner.self) && - Objects.equals(this.isForwarded, getMessagesMessagesInner.isForwarded) && - Objects.equals(this.author, getMessagesMessagesInner.author) && - Objects.equals(this.time, getMessagesMessagesInner.time) && - Objects.equals(this.chatId, getMessagesMessagesInner.chatId) && - Objects.equals(this.type, getMessagesMessagesInner.type) && - Objects.equals(this.senderName, getMessagesMessagesInner.senderName) && - Objects.equals(this.caption, getMessagesMessagesInner.caption) && - Objects.equals(this.quotedMsgId, getMessagesMessagesInner.quotedMsgId) && - Objects.equals(this.metadata, getMessagesMessagesInner.metadata) && - Objects.equals(this.chatName, getMessagesMessagesInner.chatName); - } - - @Override - public int hashCode() { - return Objects.hash(messageNumber, id, body, fromMe, self, isForwarded, author, time, chatId, type, senderName, caption, quotedMsgId, metadata, chatName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetMessagesMessagesInner {\n"); - sb.append(" messageNumber: ").append(toIndentedString(messageNumber)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" fromMe: ").append(toIndentedString(fromMe)).append("\n"); - sb.append(" self: ").append(toIndentedString(self)).append("\n"); - sb.append(" isForwarded: ").append(toIndentedString(isForwarded)).append("\n"); - sb.append(" author: ").append(toIndentedString(author)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" senderName: ").append(toIndentedString(senderName)).append("\n"); - sb.append(" caption: ").append(toIndentedString(caption)).append("\n"); - sb.append(" quotedMsgId: ").append(toIndentedString(quotedMsgId)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" chatName: ").append(toIndentedString(chatName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messageNumber"); - openapiFields.add("id"); - openapiFields.add("body"); - openapiFields.add("fromMe"); - openapiFields.add("self"); - openapiFields.add("isForwarded"); - openapiFields.add("author"); - openapiFields.add("time"); - openapiFields.add("chatId"); - openapiFields.add("type"); - openapiFields.add("senderName"); - openapiFields.add("caption"); - openapiFields.add("quotedMsgId"); - openapiFields.add("metadata"); - openapiFields.add("chatName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetMessagesMessagesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetMessagesMessagesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetMessagesMessagesInner is not found in the empty JSON string", GetMessagesMessagesInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetMessagesMessagesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetMessagesMessagesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("body") != null && !jsonObj.get("body").isJsonNull()) && !jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - if ((jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) && !jsonObj.get("author").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `author` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author").toString())); - } - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("senderName") != null && !jsonObj.get("senderName").isJsonNull()) && !jsonObj.get("senderName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderName").toString())); - } - if ((jsonObj.get("caption") != null && !jsonObj.get("caption").isJsonNull()) && !jsonObj.get("caption").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `caption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caption").toString())); - } - if ((jsonObj.get("quotedMsgId") != null && !jsonObj.get("quotedMsgId").isJsonNull()) && !jsonObj.get("quotedMsgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quotedMsgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quotedMsgId").toString())); - } - if ((jsonObj.get("chatName") != null && !jsonObj.get("chatName").isJsonNull()) && !jsonObj.get("chatName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetMessagesMessagesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetMessagesMessagesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetMessagesMessagesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetMessagesMessagesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetMessagesMessagesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetMessagesMessagesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetMessagesMessagesInner - * @throws IOException if the JSON string is invalid with respect to GetMessagesMessagesInner - */ - public static GetMessagesMessagesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetMessagesMessagesInner.class); - } - - /** - * Convert an instance of GetMessagesMessagesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetTemplates.java b/java/src/main/java/org/openapitools/client/model/GetTemplates.java deleted file mode 100644 index aace544..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetTemplates.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.GetTemplatesTemplatesInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetTemplates - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetTemplates { - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private Integer total; - - public static final String SERIALIZED_NAME_TEMPLATES = "templates"; - @SerializedName(SERIALIZED_NAME_TEMPLATES) - private List templates; - - public GetTemplates() { - } - - public GetTemplates total(Integer total) { - - this.total = total; - return this; - } - - /** - * Get total - * @return total - **/ - @javax.annotation.Nullable - public Integer getTotal() { - return total; - } - - - public void setTotal(Integer total) { - this.total = total; - } - - - public GetTemplates templates(List templates) { - - this.templates = templates; - return this; - } - - public GetTemplates addTemplatesItem(GetTemplatesTemplatesInner templatesItem) { - if (this.templates == null) { - this.templates = new ArrayList<>(); - } - this.templates.add(templatesItem); - return this; - } - - /** - * Get templates - * @return templates - **/ - @javax.annotation.Nullable - public List getTemplates() { - return templates; - } - - - public void setTemplates(List templates) { - this.templates = templates; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTemplates getTemplates = (GetTemplates) o; - return Objects.equals(this.total, getTemplates.total) && - Objects.equals(this.templates, getTemplates.templates); - } - - @Override - public int hashCode() { - return Objects.hash(total, templates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTemplates {\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" templates: ").append(toIndentedString(templates)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("total"); - openapiFields.add("templates"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetTemplates - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetTemplates.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetTemplates is not found in the empty JSON string", GetTemplates.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetTemplates.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetTemplates` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("templates") != null && !jsonObj.get("templates").isJsonNull()) { - JsonArray jsonArraytemplates = jsonObj.getAsJsonArray("templates"); - if (jsonArraytemplates != null) { - // ensure the json data is an array - if (!jsonObj.get("templates").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `templates` to be an array in the JSON string but got `%s`", jsonObj.get("templates").toString())); - } - - // validate the optional field `templates` (array) - for (int i = 0; i < jsonArraytemplates.size(); i++) { - GetTemplatesTemplatesInner.validateJsonElement(jsonArraytemplates.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetTemplates.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetTemplates' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetTemplates.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetTemplates value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetTemplates read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetTemplates given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetTemplates - * @throws IOException if the JSON string is invalid with respect to GetTemplates - */ - public static GetTemplates fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetTemplates.class); - } - - /** - * Convert an instance of GetTemplates to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/GetTemplatesTemplatesInner.java b/java/src/main/java/org/openapitools/client/model/GetTemplatesTemplatesInner.java deleted file mode 100644 index 0bb1593..0000000 --- a/java/src/main/java/org/openapitools/client/model/GetTemplatesTemplatesInner.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.TemplateCategoryProp; -import org.openapitools.client.model.TemplateComponentsProp; -import org.openapitools.client.model.TemplateLanguageProp; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * GetTemplatesTemplatesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class GetTemplatesTemplatesInner { - public static final String SERIALIZED_NAME_CATEGORY = "category"; - @SerializedName(SERIALIZED_NAME_CATEGORY) - private TemplateCategoryProp category; - - public static final String SERIALIZED_NAME_COMPONENTS = "components"; - @SerializedName(SERIALIZED_NAME_COMPONENTS) - private TemplateComponentsProp components; - - public static final String SERIALIZED_NAME_LANGUAGE = "language"; - @SerializedName(SERIALIZED_NAME_LANGUAGE) - private TemplateLanguageProp language; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - private String namespace; - - public static final String SERIALIZED_NAME_REJECTED_REASON = "rejected_reason"; - @SerializedName(SERIALIZED_NAME_REJECTED_REASON) - private String rejectedReason; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public GetTemplatesTemplatesInner() { - } - - public GetTemplatesTemplatesInner category(TemplateCategoryProp category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nullable - public TemplateCategoryProp getCategory() { - return category; - } - - - public void setCategory(TemplateCategoryProp category) { - this.category = category; - } - - - public GetTemplatesTemplatesInner components(TemplateComponentsProp components) { - - this.components = components; - return this; - } - - /** - * Get components - * @return components - **/ - @javax.annotation.Nullable - public TemplateComponentsProp getComponents() { - return components; - } - - - public void setComponents(TemplateComponentsProp components) { - this.components = components; - } - - - public GetTemplatesTemplatesInner language(TemplateLanguageProp language) { - - this.language = language; - return this; - } - - /** - * Get language - * @return language - **/ - @javax.annotation.Nullable - public TemplateLanguageProp getLanguage() { - return language; - } - - - public void setLanguage(TemplateLanguageProp language) { - this.language = language; - } - - - public GetTemplatesTemplatesInner name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public GetTemplatesTemplatesInner namespace(String namespace) { - - this.namespace = namespace; - return this; - } - - /** - * Can be found by method /templates - * @return namespace - **/ - @javax.annotation.Nullable - public String getNamespace() { - return namespace; - } - - - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - - public GetTemplatesTemplatesInner rejectedReason(String rejectedReason) { - - this.rejectedReason = rejectedReason; - return this; - } - - /** - * Get rejectedReason - * @return rejectedReason - **/ - @javax.annotation.Nullable - public String getRejectedReason() { - return rejectedReason; - } - - - public void setRejectedReason(String rejectedReason) { - this.rejectedReason = rejectedReason; - } - - - public GetTemplatesTemplatesInner status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTemplatesTemplatesInner getTemplatesTemplatesInner = (GetTemplatesTemplatesInner) o; - return Objects.equals(this.category, getTemplatesTemplatesInner.category) && - Objects.equals(this.components, getTemplatesTemplatesInner.components) && - Objects.equals(this.language, getTemplatesTemplatesInner.language) && - Objects.equals(this.name, getTemplatesTemplatesInner.name) && - Objects.equals(this.namespace, getTemplatesTemplatesInner.namespace) && - Objects.equals(this.rejectedReason, getTemplatesTemplatesInner.rejectedReason) && - Objects.equals(this.status, getTemplatesTemplatesInner.status); - } - - @Override - public int hashCode() { - return Objects.hash(category, components, language, name, namespace, rejectedReason, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTemplatesTemplatesInner {\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" components: ").append(toIndentedString(components)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" rejectedReason: ").append(toIndentedString(rejectedReason)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("category"); - openapiFields.add("components"); - openapiFields.add("language"); - openapiFields.add("name"); - openapiFields.add("namespace"); - openapiFields.add("rejected_reason"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetTemplatesTemplatesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetTemplatesTemplatesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetTemplatesTemplatesInner is not found in the empty JSON string", GetTemplatesTemplatesInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetTemplatesTemplatesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetTemplatesTemplatesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); - } - if ((jsonObj.get("rejected_reason") != null && !jsonObj.get("rejected_reason").isJsonNull()) && !jsonObj.get("rejected_reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rejected_reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejected_reason").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetTemplatesTemplatesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetTemplatesTemplatesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetTemplatesTemplatesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetTemplatesTemplatesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetTemplatesTemplatesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetTemplatesTemplatesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetTemplatesTemplatesInner - * @throws IOException if the JSON string is invalid with respect to GetTemplatesTemplatesInner - */ - public static GetTemplatesTemplatesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetTemplatesTemplatesInner.class); - } - - /** - * Convert an instance of GetTemplatesTemplatesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/MeComponents.java b/java/src/main/java/org/openapitools/client/model/MeComponents.java deleted file mode 100644 index d15437a..0000000 --- a/java/src/main/java/org/openapitools/client/model/MeComponents.java +++ /dev/null @@ -1,473 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * MeComponents - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class MeComponents { - public static final String SERIALIZED_NAME_ABOUT = "about"; - @SerializedName(SERIALIZED_NAME_ABOUT) - private String about; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private String phone; - - /** - * Industry of the business - */ - @JsonAdapter(VerticalEnum.Adapter.class) - public enum VerticalEnum { - AUTOMOTIVE("Automotive"), - - BEAUTY_SPA_AND_SALON("Beauty, Spa and Salon"), - - CLOTHING_AND_APPAREL("Clothing and Apparel"), - - EDUCATION("Education"), - - ENTERTAINMENT("Entertainment"), - - EVENT_PLANNING_AND_SERVICE("Event Planning and Service"), - - FINANCE_AND_BANKING("Finance and Banking"), - - FOOD_AND_GROCERY("Food and Grocery"), - - PUBLIC_SERVICE("Public Service"), - - HOTEL_AND_LODGING("Hotel and Lodging"), - - MEDICAL_AND_HEALTH("Medical and Health"), - - NON_PROFIT("Non-profit"), - - PROFESSIONAL_SERVICES("Professional Services"), - - SHOPPING_AND_RETAIL("Shopping and Retail"), - - TRAVEL_AND_TRANSPORTATION("Travel and Transportation"), - - RESTAURANT("Restaurant"), - - OTHER("Other"), - - EMPTY(""); - - private String value; - - VerticalEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VerticalEnum fromValue(String value) { - for (VerticalEnum b : VerticalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VerticalEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VerticalEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VerticalEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_VERTICAL = "vertical"; - @SerializedName(SERIALIZED_NAME_VERTICAL) - private VerticalEnum vertical; - - public static final String SERIALIZED_NAME_PHOTO = "photo"; - @SerializedName(SERIALIZED_NAME_PHOTO) - private String photo; - - public MeComponents() { - } - - public MeComponents about(String about) { - - this.about = about; - return this; - } - - /** - * Profile`s About section. - * @return about - **/ - @javax.annotation.Nullable - public String getAbout() { - return about; - } - - - public void setAbout(String about) { - this.about = about; - } - - - public MeComponents address(String address) { - - this.address = address; - return this; - } - - /** - * Address of the business - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public MeComponents description(String description) { - - this.description = description; - return this; - } - - /** - * Description of the business. Max 256 characters - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public MeComponents email(String email) { - - this.email = email; - return this; - } - - /** - * Business email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public MeComponents phone(String phone) { - - this.phone = phone; - return this; - } - - /** - * Linked phone number - * @return phone - **/ - @javax.annotation.Nullable - public String getPhone() { - return phone; - } - - - public void setPhone(String phone) { - this.phone = phone; - } - - - public MeComponents vertical(VerticalEnum vertical) { - - this.vertical = vertical; - return this; - } - - /** - * Industry of the business - * @return vertical - **/ - @javax.annotation.Nullable - public VerticalEnum getVertical() { - return vertical; - } - - - public void setVertical(VerticalEnum vertical) { - this.vertical = vertical; - } - - - public MeComponents photo(String photo) { - - this.photo = photo; - return this; - } - - /** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @return photo - **/ - @javax.annotation.Nullable - public String getPhoto() { - return photo; - } - - - public void setPhoto(String photo) { - this.photo = photo; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MeComponents meComponents = (MeComponents) o; - return Objects.equals(this.about, meComponents.about) && - Objects.equals(this.address, meComponents.address) && - Objects.equals(this.description, meComponents.description) && - Objects.equals(this.email, meComponents.email) && - Objects.equals(this.phone, meComponents.phone) && - Objects.equals(this.vertical, meComponents.vertical) && - Objects.equals(this.photo, meComponents.photo); - } - - @Override - public int hashCode() { - return Objects.hash(about, address, description, email, phone, vertical, photo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MeComponents {\n"); - sb.append(" about: ").append(toIndentedString(about)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" vertical: ").append(toIndentedString(vertical)).append("\n"); - sb.append(" photo: ").append(toIndentedString(photo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("about"); - openapiFields.add("address"); - openapiFields.add("description"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("vertical"); - openapiFields.add("photo"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MeComponents - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MeComponents.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MeComponents is not found in the empty JSON string", MeComponents.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MeComponents.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MeComponents` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("about") != null && !jsonObj.get("about").isJsonNull()) && !jsonObj.get("about").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `about` to be a primitive type in the JSON string but got `%s`", jsonObj.get("about").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); - } - if ((jsonObj.get("vertical") != null && !jsonObj.get("vertical").isJsonNull()) && !jsonObj.get("vertical").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vertical` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vertical").toString())); - } - if ((jsonObj.get("photo") != null && !jsonObj.get("photo").isJsonNull()) && !jsonObj.get("photo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `photo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("photo").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MeComponents.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MeComponents' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MeComponents.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MeComponents value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MeComponents read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MeComponents given an JSON string - * - * @param jsonString JSON string - * @return An instance of MeComponents - * @throws IOException if the JSON string is invalid with respect to MeComponents - */ - public static MeComponents fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MeComponents.class); - } - - /** - * Convert an instance of MeComponents to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/MediaId.java b/java/src/main/java/org/openapitools/client/model/MediaId.java deleted file mode 100644 index b6f58df..0000000 --- a/java/src/main/java/org/openapitools/client/model/MediaId.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * MediaId - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class MediaId { - public static final String SERIALIZED_NAME_MEDIA_ID = "mediaId"; - @SerializedName(SERIALIZED_NAME_MEDIA_ID) - private String mediaId; - - public MediaId() { - } - - public MediaId mediaId(String mediaId) { - - this.mediaId = mediaId; - return this; - } - - /** - * Get mediaId - * @return mediaId - **/ - @javax.annotation.Nullable - public String getMediaId() { - return mediaId; - } - - - public void setMediaId(String mediaId) { - this.mediaId = mediaId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MediaId mediaId = (MediaId) o; - return Objects.equals(this.mediaId, mediaId.mediaId); - } - - @Override - public int hashCode() { - return Objects.hash(mediaId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MediaId {\n"); - sb.append(" mediaId: ").append(toIndentedString(mediaId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("mediaId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MediaId - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MediaId.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MediaId is not found in the empty JSON string", MediaId.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MediaId.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MediaId` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("mediaId") != null && !jsonObj.get("mediaId").isJsonNull()) && !jsonObj.get("mediaId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MediaId.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MediaId' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MediaId.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MediaId value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MediaId read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MediaId given an JSON string - * - * @param jsonString JSON string - * @return An instance of MediaId - * @throws IOException if the JSON string is invalid with respect to MediaId - */ - public static MediaId fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MediaId.class); - } - - /** - * Convert an instance of MediaId to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/Message.java b/java/src/main/java/org/openapitools/client/model/Message.java deleted file mode 100644 index 29566a7..0000000 --- a/java/src/main/java/org/openapitools/client/model/Message.java +++ /dev/null @@ -1,596 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Message - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class Message { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_FROM_ME = "fromMe"; - @SerializedName(SERIALIZED_NAME_FROM_ME) - private Boolean fromMe; - - public static final String SERIALIZED_NAME_SELF = "self"; - @SerializedName(SERIALIZED_NAME_SELF) - private Integer self; - - public static final String SERIALIZED_NAME_IS_FORWARDED = "isForwarded"; - @SerializedName(SERIALIZED_NAME_IS_FORWARDED) - private Boolean isForwarded; - - public static final String SERIALIZED_NAME_AUTHOR = "author"; - @SerializedName(SERIALIZED_NAME_AUTHOR) - private String author; - - public static final String SERIALIZED_NAME_TIME = "time"; - @SerializedName(SERIALIZED_NAME_TIME) - private Integer time; - - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - /** - * type of the message - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CHAT("chat"), - - INTERACTIVE("interactive"), - - IMAGE("image"), - - VIDEO("video"), - - DOCUMENT("document"), - - AUDIO("audio"), - - STICKER("sticker"), - - VOICE("voice"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_SENDER_NAME = "senderName"; - @SerializedName(SERIALIZED_NAME_SENDER_NAME) - private String senderName; - - public static final String SERIALIZED_NAME_CAPTION = "caption"; - @SerializedName(SERIALIZED_NAME_CAPTION) - private String caption; - - public static final String SERIALIZED_NAME_QUOTED_MSG_ID = "quotedMsgId"; - @SerializedName(SERIALIZED_NAME_QUOTED_MSG_ID) - private String quotedMsgId; - - public Message() { - } - - public Message id(String id) { - - this.id = id; - return this; - } - - /** - * unique id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Message body(String body) { - - this.body = body; - return this; - } - - /** - * text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" - * @return body - **/ - @javax.annotation.Nullable - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - public Message fromMe(Boolean fromMe) { - - this.fromMe = fromMe; - return this; - } - - /** - * true - outgoing, false - incoming - * @return fromMe - **/ - @javax.annotation.Nullable - public Boolean getFromMe() { - return fromMe; - } - - - public void setFromMe(Boolean fromMe) { - this.fromMe = fromMe; - } - - - public Message self(Integer self) { - - this.self = self; - return this; - } - - /** - * 1 - generated by api, 0 - generated by app - * @return self - **/ - @javax.annotation.Nullable - public Integer getSelf() { - return self; - } - - - public void setSelf(Integer self) { - this.self = self; - } - - - public Message isForwarded(Boolean isForwarded) { - - this.isForwarded = isForwarded; - return this; - } - - /** - * true - forwarded message, false - direct message - * @return isForwarded - **/ - @javax.annotation.Nullable - public Boolean getIsForwarded() { - return isForwarded; - } - - - public void setIsForwarded(Boolean isForwarded) { - this.isForwarded = isForwarded; - } - - - public Message author(String author) { - - this.author = author; - return this; - } - - /** - * Author ID of the message - * @return author - **/ - @javax.annotation.Nullable - public String getAuthor() { - return author; - } - - - public void setAuthor(String author) { - this.author = author; - } - - - public Message time(Integer time) { - - this.time = time; - return this; - } - - /** - * send time, unix timestamp - * @return time - **/ - @javax.annotation.Nullable - public Integer getTime() { - return time; - } - - - public void setTime(Integer time) { - this.time = time; - } - - - public Message chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * chat ID - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public Message type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * type of the message - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Message senderName(String senderName) { - - this.senderName = senderName; - return this; - } - - /** - * Sender name - * @return senderName - **/ - @javax.annotation.Nullable - public String getSenderName() { - return senderName; - } - - - public void setSenderName(String senderName) { - this.senderName = senderName; - } - - - public Message caption(String caption) { - - this.caption = caption; - return this; - } - - /** - * File caption or filename - * @return caption - **/ - @javax.annotation.Nullable - public String getCaption() { - return caption; - } - - - public void setCaption(String caption) { - this.caption = caption; - } - - - public Message quotedMsgId(String quotedMsgId) { - - this.quotedMsgId = quotedMsgId; - return this; - } - - /** - * ID of quoted message - * @return quotedMsgId - **/ - @javax.annotation.Nullable - public String getQuotedMsgId() { - return quotedMsgId; - } - - - public void setQuotedMsgId(String quotedMsgId) { - this.quotedMsgId = quotedMsgId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Message message = (Message) o; - return Objects.equals(this.id, message.id) && - Objects.equals(this.body, message.body) && - Objects.equals(this.fromMe, message.fromMe) && - Objects.equals(this.self, message.self) && - Objects.equals(this.isForwarded, message.isForwarded) && - Objects.equals(this.author, message.author) && - Objects.equals(this.time, message.time) && - Objects.equals(this.chatId, message.chatId) && - Objects.equals(this.type, message.type) && - Objects.equals(this.senderName, message.senderName) && - Objects.equals(this.caption, message.caption) && - Objects.equals(this.quotedMsgId, message.quotedMsgId); - } - - @Override - public int hashCode() { - return Objects.hash(id, body, fromMe, self, isForwarded, author, time, chatId, type, senderName, caption, quotedMsgId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Message {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" fromMe: ").append(toIndentedString(fromMe)).append("\n"); - sb.append(" self: ").append(toIndentedString(self)).append("\n"); - sb.append(" isForwarded: ").append(toIndentedString(isForwarded)).append("\n"); - sb.append(" author: ").append(toIndentedString(author)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" senderName: ").append(toIndentedString(senderName)).append("\n"); - sb.append(" caption: ").append(toIndentedString(caption)).append("\n"); - sb.append(" quotedMsgId: ").append(toIndentedString(quotedMsgId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("body"); - openapiFields.add("fromMe"); - openapiFields.add("self"); - openapiFields.add("isForwarded"); - openapiFields.add("author"); - openapiFields.add("time"); - openapiFields.add("chatId"); - openapiFields.add("type"); - openapiFields.add("senderName"); - openapiFields.add("caption"); - openapiFields.add("quotedMsgId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Message - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Message.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Message` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("body") != null && !jsonObj.get("body").isJsonNull()) && !jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - if ((jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) && !jsonObj.get("author").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `author` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author").toString())); - } - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("senderName") != null && !jsonObj.get("senderName").isJsonNull()) && !jsonObj.get("senderName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderName").toString())); - } - if ((jsonObj.get("caption") != null && !jsonObj.get("caption").isJsonNull()) && !jsonObj.get("caption").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `caption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caption").toString())); - } - if ((jsonObj.get("quotedMsgId") != null && !jsonObj.get("quotedMsgId").isJsonNull()) && !jsonObj.get("quotedMsgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quotedMsgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quotedMsgId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Message.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Message' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Message.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Message value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Message read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Message given an JSON string - * - * @param jsonString JSON string - * @return An instance of Message - * @throws IOException if the JSON string is invalid with respect to Message - */ - public static Message fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Message.class); - } - - /** - * Convert an instance of Message to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/MessageIdProp.java b/java/src/main/java/org/openapitools/client/model/MessageIdProp.java deleted file mode 100644 index bf96f14..0000000 --- a/java/src/main/java/org/openapitools/client/model/MessageIdProp.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * MessageIdProp - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class MessageIdProp { - public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; - @SerializedName(SERIALIZED_NAME_MESSAGE_ID) - private String messageId; - - public MessageIdProp() { - } - - public MessageIdProp messageId(String messageId) { - - this.messageId = messageId; - return this; - } - - /** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @return messageId - **/ - @javax.annotation.Nullable - public String getMessageId() { - return messageId; - } - - - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MessageIdProp messageIdProp = (MessageIdProp) o; - return Objects.equals(this.messageId, messageIdProp.messageId); - } - - @Override - public int hashCode() { - return Objects.hash(messageId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MessageIdProp {\n"); - sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messageId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MessageIdProp - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MessageIdProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessageIdProp is not found in the empty JSON string", MessageIdProp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MessageIdProp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageIdProp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MessageIdProp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MessageIdProp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MessageIdProp.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MessageIdProp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MessageIdProp read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MessageIdProp given an JSON string - * - * @param jsonString JSON string - * @return An instance of MessageIdProp - * @throws IOException if the JSON string is invalid with respect to MessageIdProp - */ - public static MessageIdProp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MessageIdProp.class); - } - - /** - * Convert an instance of MessageIdProp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/PhoneProp.java b/java/src/main/java/org/openapitools/client/model/PhoneProp.java deleted file mode 100644 index 3baa253..0000000 --- a/java/src/main/java/org/openapitools/client/model/PhoneProp.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * PhoneProp - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class PhoneProp { - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public PhoneProp() { - } - - public PhoneProp phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PhoneProp phoneProp = (PhoneProp) o; - return Objects.equals(this.phone, phoneProp.phone); - } - - @Override - public int hashCode() { - return Objects.hash(phone); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PhoneProp {\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("phone"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PhoneProp - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PhoneProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PhoneProp is not found in the empty JSON string", PhoneProp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PhoneProp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PhoneProp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PhoneProp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PhoneProp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PhoneProp.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PhoneProp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PhoneProp read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PhoneProp given an JSON string - * - * @param jsonString JSON string - * @return An instance of PhoneProp - * @throws IOException if the JSON string is invalid with respect to PhoneProp - */ - public static PhoneProp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PhoneProp.class); - } - - /** - * Convert an instance of PhoneProp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/ReadMessageRequest.java b/java/src/main/java/org/openapitools/client/model/ReadMessageRequest.java deleted file mode 100644 index 1207bb5..0000000 --- a/java/src/main/java/org/openapitools/client/model/ReadMessageRequest.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * ReadMessageRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class ReadMessageRequest { - public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; - @SerializedName(SERIALIZED_NAME_MESSAGE_ID) - private String messageId; - - public ReadMessageRequest() { - } - - public ReadMessageRequest messageId(String messageId) { - - this.messageId = messageId; - return this; - } - - /** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @return messageId - **/ - @javax.annotation.Nullable - public String getMessageId() { - return messageId; - } - - - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadMessageRequest readMessageRequest = (ReadMessageRequest) o; - return Objects.equals(this.messageId, readMessageRequest.messageId); - } - - @Override - public int hashCode() { - return Objects.hash(messageId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadMessageRequest {\n"); - sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messageId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReadMessageRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReadMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReadMessageRequest is not found in the empty JSON string", ReadMessageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReadMessageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadMessageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadMessageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadMessageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReadMessageRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReadMessageRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReadMessageRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReadMessageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadMessageRequest - * @throws IOException if the JSON string is invalid with respect to ReadMessageRequest - */ - public static ReadMessageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadMessageRequest.class); - } - - /** - * Convert an instance of ReadMessageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/RemoveTemplateRequest.java b/java/src/main/java/org/openapitools/client/model/RemoveTemplateRequest.java deleted file mode 100644 index 2a8b835..0000000 --- a/java/src/main/java/org/openapitools/client/model/RemoveTemplateRequest.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * RemoveTemplateRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class RemoveTemplateRequest { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public RemoveTemplateRequest() { - } - - public RemoveTemplateRequest name(String name) { - - this.name = name; - return this; - } - - /** - * Template name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RemoveTemplateRequest removeTemplateRequest = (RemoveTemplateRequest) o; - return Objects.equals(this.name, removeTemplateRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RemoveTemplateRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RemoveTemplateRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RemoveTemplateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RemoveTemplateRequest is not found in the empty JSON string", RemoveTemplateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RemoveTemplateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RemoveTemplateRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RemoveTemplateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RemoveTemplateRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RemoveTemplateRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RemoveTemplateRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RemoveTemplateRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RemoveTemplateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RemoveTemplateRequest - * @throws IOException if the JSON string is invalid with respect to RemoveTemplateRequest - */ - public static RemoveTemplateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RemoveTemplateRequest.class); - } - - /** - * Convert an instance of RemoveTemplateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendContactRequest.java b/java/src/main/java/org/openapitools/client/model/SendContactRequest.java deleted file mode 100644 index 8013258..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendContactRequest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendContactRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendContactRequest { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_CONTACTS = "contacts"; - @SerializedName(SERIALIZED_NAME_CONTACTS) - private List contacts; - - public SendContactRequest() { - } - - public SendContactRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendContactRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendContactRequest contacts(List contacts) { - - this.contacts = contacts; - return this; - } - - public SendContactRequest addContactsItem(Object contactsItem) { - if (this.contacts == null) { - this.contacts = new ArrayList<>(); - } - this.contacts.add(contactsItem); - return this; - } - - /** - * Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] - * @return contacts - **/ - @javax.annotation.Nullable - public List getContacts() { - return contacts; - } - - - public void setContacts(List contacts) { - this.contacts = contacts; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendContactRequest sendContactRequest = (SendContactRequest) o; - return Objects.equals(this.chatId, sendContactRequest.chatId) && - Objects.equals(this.phone, sendContactRequest.phone) && - Objects.equals(this.contacts, sendContactRequest.contacts); - } - - @Override - public int hashCode() { - return Objects.hash(chatId, phone, contacts); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendContactRequest {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("contacts"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendContactRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendContactRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendContactRequest is not found in the empty JSON string", SendContactRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendContactRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendContactRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("contacts") != null && !jsonObj.get("contacts").isJsonNull() && !jsonObj.get("contacts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `contacts` to be an array in the JSON string but got `%s`", jsonObj.get("contacts").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendContactRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendContactRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendContactRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendContactRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendContactRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendContactRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendContactRequest - * @throws IOException if the JSON string is invalid with respect to SendContactRequest - */ - public static SendContactRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendContactRequest.class); - } - - /** - * Convert an instance of SendContactRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendFileRequest.java b/java/src/main/java/org/openapitools/client/model/SendFileRequest.java deleted file mode 100644 index 347ee27..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendFileRequest.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendFileRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendFileRequest { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_FILENAME = "filename"; - @SerializedName(SERIALIZED_NAME_FILENAME) - private String filename; - - public static final String SERIALIZED_NAME_CAPTION = "caption"; - @SerializedName(SERIALIZED_NAME_CAPTION) - private String caption; - - public SendFileRequest() { - } - - public SendFileRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendFileRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendFileRequest body(String body) { - - this.body = body; - return this; - } - - /** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @return body - **/ - @javax.annotation.Nonnull - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - public SendFileRequest filename(String filename) { - - this.filename = filename; - return this; - } - - /** - * File name, for *example 1.jpg* or *hello.xlsx* - * @return filename - **/ - @javax.annotation.Nonnull - public String getFilename() { - return filename; - } - - - public void setFilename(String filename) { - this.filename = filename; - } - - - public SendFileRequest caption(String caption) { - - this.caption = caption; - return this; - } - - /** - * Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - * @return caption - **/ - @javax.annotation.Nullable - public String getCaption() { - return caption; - } - - - public void setCaption(String caption) { - this.caption = caption; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendFileRequest sendFileRequest = (SendFileRequest) o; - return Objects.equals(this.chatId, sendFileRequest.chatId) && - Objects.equals(this.phone, sendFileRequest.phone) && - Objects.equals(this.body, sendFileRequest.body) && - Objects.equals(this.filename, sendFileRequest.filename) && - Objects.equals(this.caption, sendFileRequest.caption); - } - - @Override - public int hashCode() { - return Objects.hash(chatId, phone, body, filename, caption); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendFileRequest {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" filename: ").append(toIndentedString(filename)).append("\n"); - sb.append(" caption: ").append(toIndentedString(caption)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("body"); - openapiFields.add("filename"); - openapiFields.add("caption"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("body"); - openapiRequiredFields.add("filename"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendFileRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendFileRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendFileRequest is not found in the empty JSON string", SendFileRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendFileRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendFileRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendFileRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if (!jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - if (!jsonObj.get("filename").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `filename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filename").toString())); - } - if ((jsonObj.get("caption") != null && !jsonObj.get("caption").isJsonNull()) && !jsonObj.get("caption").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `caption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caption").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendFileRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendFileRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendFileRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendFileRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendFileRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendFileRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendFileRequest - * @throws IOException if the JSON string is invalid with respect to SendFileRequest - */ - public static SendFileRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendFileRequest.class); - } - - /** - * Convert an instance of SendFileRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendListRequest.java b/java/src/main/java/org/openapitools/client/model/SendListRequest.java deleted file mode 100644 index c2b95c0..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendListRequest.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendListRequestAllOfSections; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendListRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendListRequest { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_HEADER = "header"; - @SerializedName(SERIALIZED_NAME_HEADER) - private String header; - - public static final String SERIALIZED_NAME_FOOTER = "footer"; - @SerializedName(SERIALIZED_NAME_FOOTER) - private String footer; - - public static final String SERIALIZED_NAME_ACTION = "action"; - @SerializedName(SERIALIZED_NAME_ACTION) - private String action; - - public static final String SERIALIZED_NAME_SECTIONS = "sections"; - @SerializedName(SERIALIZED_NAME_SECTIONS) - private List sections = new ArrayList<>(); - - public SendListRequest() { - } - - public SendListRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendListRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendListRequest body(String body) { - - this.body = body; - return this; - } - - /** - * Main message text - * @return body - **/ - @javax.annotation.Nonnull - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - public SendListRequest header(String header) { - - this.header = header; - return this; - } - - /** - * Header will be located above message text - * @return header - **/ - @javax.annotation.Nullable - public String getHeader() { - return header; - } - - - public void setHeader(String header) { - this.header = header; - } - - - public SendListRequest footer(String footer) { - - this.footer = footer; - return this; - } - - /** - * Footer will be placed under message text - * @return footer - **/ - @javax.annotation.Nullable - public String getFooter() { - return footer; - } - - - public void setFooter(String footer) { - this.footer = footer; - } - - - public SendListRequest action(String action) { - - this.action = action; - return this; - } - - /** - * Action for open list - * @return action - **/ - @javax.annotation.Nonnull - public String getAction() { - return action; - } - - - public void setAction(String action) { - this.action = action; - } - - - public SendListRequest sections(List sections) { - - this.sections = sections; - return this; - } - - public SendListRequest addSectionsItem(SendListRequestAllOfSections sectionsItem) { - if (this.sections == null) { - this.sections = new ArrayList<>(); - } - this.sections.add(sectionsItem); - return this; - } - - /** - * Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] - * @return sections - **/ - @javax.annotation.Nonnull - public List getSections() { - return sections; - } - - - public void setSections(List sections) { - this.sections = sections; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendListRequest sendListRequest = (SendListRequest) o; - return Objects.equals(this.chatId, sendListRequest.chatId) && - Objects.equals(this.phone, sendListRequest.phone) && - Objects.equals(this.body, sendListRequest.body) && - Objects.equals(this.header, sendListRequest.header) && - Objects.equals(this.footer, sendListRequest.footer) && - Objects.equals(this.action, sendListRequest.action) && - Objects.equals(this.sections, sendListRequest.sections); - } - - @Override - public int hashCode() { - return Objects.hash(chatId, phone, body, header, footer, action, sections); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendListRequest {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" header: ").append(toIndentedString(header)).append("\n"); - sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" sections: ").append(toIndentedString(sections)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("body"); - openapiFields.add("header"); - openapiFields.add("footer"); - openapiFields.add("action"); - openapiFields.add("sections"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("body"); - openapiRequiredFields.add("action"); - openapiRequiredFields.add("sections"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendListRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendListRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendListRequest is not found in the empty JSON string", SendListRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendListRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendListRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendListRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if (!jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); - } - if ((jsonObj.get("footer") != null && !jsonObj.get("footer").isJsonNull()) && !jsonObj.get("footer").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `footer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("footer").toString())); - } - if (!jsonObj.get("action").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("sections").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `sections` to be an array in the JSON string but got `%s`", jsonObj.get("sections").toString())); - } - - JsonArray jsonArraysections = jsonObj.getAsJsonArray("sections"); - // validate the required field `sections` (array) - for (int i = 0; i < jsonArraysections.size(); i++) { - SendListRequestAllOfSections.validateJsonElement(jsonArraysections.get(i)); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendListRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendListRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendListRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendListRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendListRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendListRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendListRequest - * @throws IOException if the JSON string is invalid with respect to SendListRequest - */ - public static SendListRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendListRequest.class); - } - - /** - * Convert an instance of SendListRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendListRequestAllOfRows.java b/java/src/main/java/org/openapitools/client/model/SendListRequestAllOfRows.java deleted file mode 100644 index 8aa5b0f..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendListRequestAllOfRows.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendListRequestAllOfRows - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendListRequestAllOfRows { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public SendListRequestAllOfRows() { - } - - public SendListRequestAllOfRows id(String id) { - - this.id = id; - return this; - } - - /** - * Unique id for option, up to 200 symbols - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public SendListRequestAllOfRows title(String title) { - - this.title = title; - return this; - } - - /** - * Title of option, up to 24 symbols. - * @return title - **/ - @javax.annotation.Nonnull - public String getTitle() { - return title; - } - - - public void setTitle(String title) { - this.title = title; - } - - - public SendListRequestAllOfRows description(String description) { - - this.description = description; - return this; - } - - /** - * Description of option, up to 72 symbols - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendListRequestAllOfRows sendListRequestAllOfRows = (SendListRequestAllOfRows) o; - return Objects.equals(this.id, sendListRequestAllOfRows.id) && - Objects.equals(this.title, sendListRequestAllOfRows.title) && - Objects.equals(this.description, sendListRequestAllOfRows.description); - } - - @Override - public int hashCode() { - return Objects.hash(id, title, description); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendListRequestAllOfRows {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("title"); - openapiFields.add("description"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("title"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendListRequestAllOfRows - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendListRequestAllOfRows.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendListRequestAllOfRows is not found in the empty JSON string", SendListRequestAllOfRows.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendListRequestAllOfRows.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendListRequestAllOfRows` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendListRequestAllOfRows.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendListRequestAllOfRows.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendListRequestAllOfRows' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendListRequestAllOfRows.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendListRequestAllOfRows value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendListRequestAllOfRows read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendListRequestAllOfRows given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendListRequestAllOfRows - * @throws IOException if the JSON string is invalid with respect to SendListRequestAllOfRows - */ - public static SendListRequestAllOfRows fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendListRequestAllOfRows.class); - } - - /** - * Convert an instance of SendListRequestAllOfRows to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendListRequestAllOfSections.java b/java/src/main/java/org/openapitools/client/model/SendListRequestAllOfSections.java deleted file mode 100644 index 8c32c54..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendListRequestAllOfSections.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendListRequestAllOfRows; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendListRequestAllOfSections - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendListRequestAllOfSections { - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_ROWS = "rows"; - @SerializedName(SERIALIZED_NAME_ROWS) - private List rows = new ArrayList<>(); - - public SendListRequestAllOfSections() { - } - - public SendListRequestAllOfSections title(String title) { - - this.title = title; - return this; - } - - /** - * Title of section, up to 24 symbols. Required if there are more then 1 section - * @return title - **/ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - - public void setTitle(String title) { - this.title = title; - } - - - public SendListRequestAllOfSections rows(List rows) { - - this.rows = rows; - return this; - } - - public SendListRequestAllOfSections addRowsItem(SendListRequestAllOfRows rowsItem) { - if (this.rows == null) { - this.rows = new ArrayList<>(); - } - this.rows.add(rowsItem); - return this; - } - - /** - * Get rows - * @return rows - **/ - @javax.annotation.Nonnull - public List getRows() { - return rows; - } - - - public void setRows(List rows) { - this.rows = rows; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendListRequestAllOfSections sendListRequestAllOfSections = (SendListRequestAllOfSections) o; - return Objects.equals(this.title, sendListRequestAllOfSections.title) && - Objects.equals(this.rows, sendListRequestAllOfSections.rows); - } - - @Override - public int hashCode() { - return Objects.hash(title, rows); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendListRequestAllOfSections {\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" rows: ").append(toIndentedString(rows)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("title"); - openapiFields.add("rows"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("rows"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendListRequestAllOfSections - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendListRequestAllOfSections.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendListRequestAllOfSections is not found in the empty JSON string", SendListRequestAllOfSections.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendListRequestAllOfSections.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendListRequestAllOfSections` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendListRequestAllOfSections.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("rows").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `rows` to be an array in the JSON string but got `%s`", jsonObj.get("rows").toString())); - } - - JsonArray jsonArrayrows = jsonObj.getAsJsonArray("rows"); - // validate the required field `rows` (array) - for (int i = 0; i < jsonArrayrows.size(); i++) { - SendListRequestAllOfRows.validateJsonElement(jsonArrayrows.get(i)); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendListRequestAllOfSections.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendListRequestAllOfSections' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendListRequestAllOfSections.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendListRequestAllOfSections value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendListRequestAllOfSections read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendListRequestAllOfSections given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendListRequestAllOfSections - * @throws IOException if the JSON string is invalid with respect to SendListRequestAllOfSections - */ - public static SendListRequestAllOfSections fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendListRequestAllOfSections.class); - } - - /** - * Convert an instance of SendListRequestAllOfSections to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendLocationRequest.java b/java/src/main/java/org/openapitools/client/model/SendLocationRequest.java deleted file mode 100644 index 192dcbf..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendLocationRequest.java +++ /dev/null @@ -1,369 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendLocationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendLocationRequest { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_LAT = "lat"; - @SerializedName(SERIALIZED_NAME_LAT) - private String lat; - - public static final String SERIALIZED_NAME_LNG = "lng"; - @SerializedName(SERIALIZED_NAME_LNG) - private String lng; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public SendLocationRequest() { - } - - public SendLocationRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendLocationRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendLocationRequest lat(String lat) { - - this.lat = lat; - return this; - } - - /** - * Latitude of the location. Example: 45.018337 - * @return lat - **/ - @javax.annotation.Nonnull - public String getLat() { - return lat; - } - - - public void setLat(String lat) { - this.lat = lat; - } - - - public SendLocationRequest lng(String lng) { - - this.lng = lng; - return this; - } - - /** - * Longitude of the location. Example: -73.968285 - * @return lng - **/ - @javax.annotation.Nonnull - public String getLng() { - return lng; - } - - - public void setLng(String lng) { - this.lng = lng; - } - - - public SendLocationRequest address(String address) { - - this.address = address; - return this; - } - - /** - * Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public SendLocationRequest name(String name) { - - this.name = name; - return this; - } - - /** - * Name of the location. Example: Facebook HQ - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendLocationRequest sendLocationRequest = (SendLocationRequest) o; - return Objects.equals(this.chatId, sendLocationRequest.chatId) && - Objects.equals(this.phone, sendLocationRequest.phone) && - Objects.equals(this.lat, sendLocationRequest.lat) && - Objects.equals(this.lng, sendLocationRequest.lng) && - Objects.equals(this.address, sendLocationRequest.address) && - Objects.equals(this.name, sendLocationRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(chatId, phone, lat, lng, address, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendLocationRequest {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); - sb.append(" lng: ").append(toIndentedString(lng)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("lat"); - openapiFields.add("lng"); - openapiFields.add("address"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("lat"); - openapiRequiredFields.add("lng"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendLocationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendLocationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendLocationRequest is not found in the empty JSON string", SendLocationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendLocationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendLocationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendLocationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if (!jsonObj.get("lat").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lat").toString())); - } - if (!jsonObj.get("lng").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lng` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lng").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendLocationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendLocationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendLocationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendLocationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendLocationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendLocationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendLocationRequest - * @throws IOException if the JSON string is invalid with respect to SendLocationRequest - */ - public static SendLocationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendLocationRequest.class); - } - - /** - * Convert an instance of SendLocationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendMessageRequest.java b/java/src/main/java/org/openapitools/client/model/SendMessageRequest.java deleted file mode 100644 index d6c619c..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendMessageRequest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendMessageRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendMessageRequest { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public SendMessageRequest() { - } - - public SendMessageRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendMessageRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendMessageRequest body(String body) { - - this.body = body; - return this; - } - - /** - * Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - * @return body - **/ - @javax.annotation.Nonnull - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendMessageRequest sendMessageRequest = (SendMessageRequest) o; - return Objects.equals(this.chatId, sendMessageRequest.chatId) && - Objects.equals(this.phone, sendMessageRequest.phone) && - Objects.equals(this.body, sendMessageRequest.body); - } - - @Override - public int hashCode() { - return Objects.hash(chatId, phone, body); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendMessageRequest {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("body"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("body"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendMessageRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendMessageRequest is not found in the empty JSON string", SendMessageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendMessageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendMessageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendMessageRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if (!jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendMessageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendMessageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendMessageRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendMessageRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendMessageRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendMessageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendMessageRequest - * @throws IOException if the JSON string is invalid with respect to SendMessageRequest - */ - public static SendMessageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendMessageRequest.class); - } - - /** - * Convert an instance of SendMessageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendMessageStatus.java b/java/src/main/java/org/openapitools/client/model/SendMessageStatus.java deleted file mode 100644 index f5f6b6f..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendMessageStatus.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendMessageStatus - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendMessageStatus { - public static final String SERIALIZED_NAME_SENT = "sent"; - @SerializedName(SERIALIZED_NAME_SENT) - private Boolean sent; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public SendMessageStatus() { - } - - public SendMessageStatus sent(Boolean sent) { - - this.sent = sent; - return this; - } - - /** - * Get sent - * @return sent - **/ - @javax.annotation.Nullable - public Boolean getSent() { - return sent; - } - - - public void setSent(Boolean sent) { - this.sent = sent; - } - - - public SendMessageStatus id(String id) { - - this.id = id; - return this; - } - - /** - * unique message id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public SendMessageStatus message(String message) { - - this.message = message; - return this; - } - - /** - * Posting status message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public SendMessageStatus description(String description) { - - this.description = description; - return this; - } - - /** - * Result description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendMessageStatus sendMessageStatus = (SendMessageStatus) o; - return Objects.equals(this.sent, sendMessageStatus.sent) && - Objects.equals(this.id, sendMessageStatus.id) && - Objects.equals(this.message, sendMessageStatus.message) && - Objects.equals(this.description, sendMessageStatus.description); - } - - @Override - public int hashCode() { - return Objects.hash(sent, id, message, description); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendMessageStatus {\n"); - sb.append(" sent: ").append(toIndentedString(sent)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("sent"); - openapiFields.add("id"); - openapiFields.add("message"); - openapiFields.add("description"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendMessageStatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendMessageStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendMessageStatus is not found in the empty JSON string", SendMessageStatus.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendMessageStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendMessageStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendMessageStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendMessageStatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendMessageStatus.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendMessageStatus value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendMessageStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendMessageStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendMessageStatus - * @throws IOException if the JSON string is invalid with respect to SendMessageStatus - */ - public static SendMessageStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendMessageStatus.class); - } - - /** - * Convert an instance of SendMessageStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendProductRequest.java b/java/src/main/java/org/openapitools/client/model/SendProductRequest.java deleted file mode 100644 index 3f88052..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendProductRequest.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SendProductRequestAllOfAction; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendProductRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendProductRequest { - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_ACTION = "action"; - @SerializedName(SERIALIZED_NAME_ACTION) - private SendProductRequestAllOfAction action; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_FOOTER = "footer"; - @SerializedName(SERIALIZED_NAME_FOOTER) - private String footer; - - public static final String SERIALIZED_NAME_HEADER = "header"; - @SerializedName(SERIALIZED_NAME_HEADER) - private String header; - - public SendProductRequest() { - } - - public SendProductRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendProductRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendProductRequest action(SendProductRequestAllOfAction action) { - - this.action = action; - return this; - } - - /** - * Get action - * @return action - **/ - @javax.annotation.Nonnull - public SendProductRequestAllOfAction getAction() { - return action; - } - - - public void setAction(SendProductRequestAllOfAction action) { - this.action = action; - } - - - public SendProductRequest body(String body) { - - this.body = body; - return this; - } - - /** - * Text of message. Example: Some text. - * @return body - **/ - @javax.annotation.Nullable - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - public SendProductRequest footer(String footer) { - - this.footer = footer; - return this; - } - - /** - * Located under the message text. Example: Footer. - * @return footer - **/ - @javax.annotation.Nullable - public String getFooter() { - return footer; - } - - - public void setFooter(String footer) { - this.footer = footer; - } - - - public SendProductRequest header(String header) { - - this.header = header; - return this; - } - - /** - * Header of catalog. Example: Header. **Required when sending the catalog.** - * @return header - **/ - @javax.annotation.Nullable - public String getHeader() { - return header; - } - - - public void setHeader(String header) { - this.header = header; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendProductRequest sendProductRequest = (SendProductRequest) o; - return Objects.equals(this.chatId, sendProductRequest.chatId) && - Objects.equals(this.phone, sendProductRequest.phone) && - Objects.equals(this.action, sendProductRequest.action) && - Objects.equals(this.body, sendProductRequest.body) && - Objects.equals(this.footer, sendProductRequest.footer) && - Objects.equals(this.header, sendProductRequest.header); - } - - @Override - public int hashCode() { - return Objects.hash(chatId, phone, action, body, footer, header); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendProductRequest {\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); - sb.append(" header: ").append(toIndentedString(header)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("action"); - openapiFields.add("body"); - openapiFields.add("footer"); - openapiFields.add("header"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("action"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendProductRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendProductRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendProductRequest is not found in the empty JSON string", SendProductRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendProductRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendProductRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendProductRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - // validate the required field `action` - SendProductRequestAllOfAction.validateJsonElement(jsonObj.get("action")); - if ((jsonObj.get("body") != null && !jsonObj.get("body").isJsonNull()) && !jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - if ((jsonObj.get("footer") != null && !jsonObj.get("footer").isJsonNull()) && !jsonObj.get("footer").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `footer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("footer").toString())); - } - if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendProductRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendProductRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendProductRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendProductRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendProductRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendProductRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendProductRequest - * @throws IOException if the JSON string is invalid with respect to SendProductRequest - */ - public static SendProductRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendProductRequest.class); - } - - /** - * Convert an instance of SendProductRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfAction.java b/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfAction.java deleted file mode 100644 index 56d363b..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfAction.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendProductRequestAllOfActionSections; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendProductRequestAllOfAction { - public static final String SERIALIZED_NAME_CATALOG_ID = "catalog_id"; - @SerializedName(SERIALIZED_NAME_CATALOG_ID) - private String catalogId; - - public static final String SERIALIZED_NAME_PRODUCT_RETAILER_ID = "product_retailer_id"; - @SerializedName(SERIALIZED_NAME_PRODUCT_RETAILER_ID) - private String productRetailerId; - - public static final String SERIALIZED_NAME_SECTIONS = "sections"; - @SerializedName(SERIALIZED_NAME_SECTIONS) - private List sections; - - public SendProductRequestAllOfAction() { - } - - public SendProductRequestAllOfAction catalogId(String catalogId) { - - this.catalogId = catalogId; - return this; - } - - /** - * id of the catalog - * @return catalogId - **/ - @javax.annotation.Nullable - public String getCatalogId() { - return catalogId; - } - - - public void setCatalogId(String catalogId) { - this.catalogId = catalogId; - } - - - public SendProductRequestAllOfAction productRetailerId(String productRetailerId) { - - this.productRetailerId = productRetailerId; - return this; - } - - /** - * id of the product - * @return productRetailerId - **/ - @javax.annotation.Nullable - public String getProductRetailerId() { - return productRetailerId; - } - - - public void setProductRetailerId(String productRetailerId) { - this.productRetailerId = productRetailerId; - } - - - public SendProductRequestAllOfAction sections(List sections) { - - this.sections = sections; - return this; - } - - public SendProductRequestAllOfAction addSectionsItem(SendProductRequestAllOfActionSections sectionsItem) { - if (this.sections == null) { - this.sections = new ArrayList<>(); - } - this.sections.add(sectionsItem); - return this; - } - - /** - * Get sections - * @return sections - **/ - @javax.annotation.Nullable - public List getSections() { - return sections; - } - - - public void setSections(List sections) { - this.sections = sections; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendProductRequestAllOfAction sendProductRequestAllOfAction = (SendProductRequestAllOfAction) o; - return Objects.equals(this.catalogId, sendProductRequestAllOfAction.catalogId) && - Objects.equals(this.productRetailerId, sendProductRequestAllOfAction.productRetailerId) && - Objects.equals(this.sections, sendProductRequestAllOfAction.sections); - } - - @Override - public int hashCode() { - return Objects.hash(catalogId, productRetailerId, sections); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendProductRequestAllOfAction {\n"); - sb.append(" catalogId: ").append(toIndentedString(catalogId)).append("\n"); - sb.append(" productRetailerId: ").append(toIndentedString(productRetailerId)).append("\n"); - sb.append(" sections: ").append(toIndentedString(sections)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("catalog_id"); - openapiFields.add("product_retailer_id"); - openapiFields.add("sections"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendProductRequestAllOfAction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendProductRequestAllOfAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendProductRequestAllOfAction is not found in the empty JSON string", SendProductRequestAllOfAction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendProductRequestAllOfAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendProductRequestAllOfAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("catalog_id") != null && !jsonObj.get("catalog_id").isJsonNull()) && !jsonObj.get("catalog_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `catalog_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("catalog_id").toString())); - } - if ((jsonObj.get("product_retailer_id") != null && !jsonObj.get("product_retailer_id").isJsonNull()) && !jsonObj.get("product_retailer_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `product_retailer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_retailer_id").toString())); - } - if (jsonObj.get("sections") != null && !jsonObj.get("sections").isJsonNull()) { - JsonArray jsonArraysections = jsonObj.getAsJsonArray("sections"); - if (jsonArraysections != null) { - // ensure the json data is an array - if (!jsonObj.get("sections").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `sections` to be an array in the JSON string but got `%s`", jsonObj.get("sections").toString())); - } - - // validate the optional field `sections` (array) - for (int i = 0; i < jsonArraysections.size(); i++) { - SendProductRequestAllOfActionSections.validateJsonElement(jsonArraysections.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendProductRequestAllOfAction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendProductRequestAllOfAction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendProductRequestAllOfAction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendProductRequestAllOfAction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendProductRequestAllOfAction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendProductRequestAllOfAction given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendProductRequestAllOfAction - * @throws IOException if the JSON string is invalid with respect to SendProductRequestAllOfAction - */ - public static SendProductRequestAllOfAction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendProductRequestAllOfAction.class); - } - - /** - * Convert an instance of SendProductRequestAllOfAction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItems.java b/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItems.java deleted file mode 100644 index 012645c..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItems.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendProductRequestAllOfActionProductItems - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendProductRequestAllOfActionProductItems { - public static final String SERIALIZED_NAME_PRODUCT_RETAILER_ID = "product_retailer_id"; - @SerializedName(SERIALIZED_NAME_PRODUCT_RETAILER_ID) - private String productRetailerId; - - public SendProductRequestAllOfActionProductItems() { - } - - public SendProductRequestAllOfActionProductItems productRetailerId(String productRetailerId) { - - this.productRetailerId = productRetailerId; - return this; - } - - /** - * id of the product - * @return productRetailerId - **/ - @javax.annotation.Nullable - public String getProductRetailerId() { - return productRetailerId; - } - - - public void setProductRetailerId(String productRetailerId) { - this.productRetailerId = productRetailerId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendProductRequestAllOfActionProductItems sendProductRequestAllOfActionProductItems = (SendProductRequestAllOfActionProductItems) o; - return Objects.equals(this.productRetailerId, sendProductRequestAllOfActionProductItems.productRetailerId); - } - - @Override - public int hashCode() { - return Objects.hash(productRetailerId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendProductRequestAllOfActionProductItems {\n"); - sb.append(" productRetailerId: ").append(toIndentedString(productRetailerId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("product_retailer_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendProductRequestAllOfActionProductItems - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendProductRequestAllOfActionProductItems.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendProductRequestAllOfActionProductItems is not found in the empty JSON string", SendProductRequestAllOfActionProductItems.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendProductRequestAllOfActionProductItems.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendProductRequestAllOfActionProductItems` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("product_retailer_id") != null && !jsonObj.get("product_retailer_id").isJsonNull()) && !jsonObj.get("product_retailer_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `product_retailer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_retailer_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendProductRequestAllOfActionProductItems.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendProductRequestAllOfActionProductItems' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendProductRequestAllOfActionProductItems.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendProductRequestAllOfActionProductItems value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendProductRequestAllOfActionProductItems read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendProductRequestAllOfActionProductItems given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendProductRequestAllOfActionProductItems - * @throws IOException if the JSON string is invalid with respect to SendProductRequestAllOfActionProductItems - */ - public static SendProductRequestAllOfActionProductItems fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendProductRequestAllOfActionProductItems.class); - } - - /** - * Convert an instance of SendProductRequestAllOfActionProductItems to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionSections.java b/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionSections.java deleted file mode 100644 index 6da5813..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendProductRequestAllOfActionSections.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendProductRequestAllOfActionProductItems; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendProductRequestAllOfActionSections - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendProductRequestAllOfActionSections { - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_PRODUCT_ITEMS = "product_items"; - @SerializedName(SERIALIZED_NAME_PRODUCT_ITEMS) - private List productItems; - - public SendProductRequestAllOfActionSections() { - } - - public SendProductRequestAllOfActionSections title(String title) { - - this.title = title; - return this; - } - - /** - * Title of the section. Example: the-section-title - * @return title - **/ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - - public void setTitle(String title) { - this.title = title; - } - - - public SendProductRequestAllOfActionSections productItems(List productItems) { - - this.productItems = productItems; - return this; - } - - public SendProductRequestAllOfActionSections addProductItemsItem(SendProductRequestAllOfActionProductItems productItemsItem) { - if (this.productItems == null) { - this.productItems = new ArrayList<>(); - } - this.productItems.add(productItemsItem); - return this; - } - - /** - * Get productItems - * @return productItems - **/ - @javax.annotation.Nullable - public List getProductItems() { - return productItems; - } - - - public void setProductItems(List productItems) { - this.productItems = productItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendProductRequestAllOfActionSections sendProductRequestAllOfActionSections = (SendProductRequestAllOfActionSections) o; - return Objects.equals(this.title, sendProductRequestAllOfActionSections.title) && - Objects.equals(this.productItems, sendProductRequestAllOfActionSections.productItems); - } - - @Override - public int hashCode() { - return Objects.hash(title, productItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendProductRequestAllOfActionSections {\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" productItems: ").append(toIndentedString(productItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("title"); - openapiFields.add("product_items"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendProductRequestAllOfActionSections - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendProductRequestAllOfActionSections.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendProductRequestAllOfActionSections is not found in the empty JSON string", SendProductRequestAllOfActionSections.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendProductRequestAllOfActionSections.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendProductRequestAllOfActionSections` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - if (jsonObj.get("product_items") != null && !jsonObj.get("product_items").isJsonNull()) { - JsonArray jsonArrayproductItems = jsonObj.getAsJsonArray("product_items"); - if (jsonArrayproductItems != null) { - // ensure the json data is an array - if (!jsonObj.get("product_items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `product_items` to be an array in the JSON string but got `%s`", jsonObj.get("product_items").toString())); - } - - // validate the optional field `product_items` (array) - for (int i = 0; i < jsonArrayproductItems.size(); i++) { - SendProductRequestAllOfActionProductItems.validateJsonElement(jsonArrayproductItems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendProductRequestAllOfActionSections.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendProductRequestAllOfActionSections' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendProductRequestAllOfActionSections.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendProductRequestAllOfActionSections value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendProductRequestAllOfActionSections read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendProductRequestAllOfActionSections given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendProductRequestAllOfActionSections - * @throws IOException if the JSON string is invalid with respect to SendProductRequestAllOfActionSections - */ - public static SendProductRequestAllOfActionSections fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendProductRequestAllOfActionSections.class); - } - - /** - * Convert an instance of SendProductRequestAllOfActionSections to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequest.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequest.java deleted file mode 100644 index 61761c1..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequest.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendTemplateRequestAllOfLanguage; -import org.openapitools.client.model.SendTemplateRequestAllOfParams; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendTemplateRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequest { - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - private String namespace; - - public static final String SERIALIZED_NAME_CHAT_ID = "chatId"; - @SerializedName(SERIALIZED_NAME_CHAT_ID) - private String chatId; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Integer phone; - - public static final String SERIALIZED_NAME_TEMPLATE = "template"; - @SerializedName(SERIALIZED_NAME_TEMPLATE) - private String template; - - public static final String SERIALIZED_NAME_LANGUAGE = "language"; - @SerializedName(SERIALIZED_NAME_LANGUAGE) - private SendTemplateRequestAllOfLanguage language; - - public static final String SERIALIZED_NAME_PARAMS = "params"; - @SerializedName(SERIALIZED_NAME_PARAMS) - private List params; - - public SendTemplateRequest() { - } - - public SendTemplateRequest namespace(String namespace) { - - this.namespace = namespace; - return this; - } - - /** - * Can be found by method /templates - * @return namespace - **/ - @javax.annotation.Nonnull - public String getNamespace() { - return namespace; - } - - - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - - public SendTemplateRequest chatId(String chatId) { - - this.chatId = chatId; - return this; - } - - /** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @return chatId - **/ - @javax.annotation.Nullable - public String getChatId() { - return chatId; - } - - - public void setChatId(String chatId) { - this.chatId = chatId; - } - - - public SendTemplateRequest phone(Integer phone) { - - this.phone = phone; - return this; - } - - /** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @return phone - **/ - @javax.annotation.Nullable - public Integer getPhone() { - return phone; - } - - - public void setPhone(Integer phone) { - this.phone = phone; - } - - - public SendTemplateRequest template(String template) { - - this.template = template; - return this; - } - - /** - * Name of template - * @return template - **/ - @javax.annotation.Nonnull - public String getTemplate() { - return template; - } - - - public void setTemplate(String template) { - this.template = template; - } - - - public SendTemplateRequest language(SendTemplateRequestAllOfLanguage language) { - - this.language = language; - return this; - } - - /** - * Get language - * @return language - **/ - @javax.annotation.Nonnull - public SendTemplateRequestAllOfLanguage getLanguage() { - return language; - } - - - public void setLanguage(SendTemplateRequestAllOfLanguage language) { - this.language = language; - } - - - public SendTemplateRequest params(List params) { - - this.params = params; - return this; - } - - public SendTemplateRequest addParamsItem(SendTemplateRequestAllOfParams paramsItem) { - if (this.params == null) { - this.params = new ArrayList<>(); - } - this.params.add(paramsItem); - return this; - } - - /** - * Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** - * @return params - **/ - @javax.annotation.Nullable - public List getParams() { - return params; - } - - - public void setParams(List params) { - this.params = params; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequest sendTemplateRequest = (SendTemplateRequest) o; - return Objects.equals(this.namespace, sendTemplateRequest.namespace) && - Objects.equals(this.chatId, sendTemplateRequest.chatId) && - Objects.equals(this.phone, sendTemplateRequest.phone) && - Objects.equals(this.template, sendTemplateRequest.template) && - Objects.equals(this.language, sendTemplateRequest.language) && - Objects.equals(this.params, sendTemplateRequest.params); - } - - @Override - public int hashCode() { - return Objects.hash(namespace, chatId, phone, template, language, params); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequest {\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" chatId: ").append(toIndentedString(chatId)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" template: ").append(toIndentedString(template)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("namespace"); - openapiFields.add("chatId"); - openapiFields.add("phone"); - openapiFields.add("template"); - openapiFields.add("language"); - openapiFields.add("params"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("namespace"); - openapiRequiredFields.add("template"); - openapiRequiredFields.add("language"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequest is not found in the empty JSON string", SendTemplateRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendTemplateRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); - } - if ((jsonObj.get("chatId") != null && !jsonObj.get("chatId").isJsonNull()) && !jsonObj.get("chatId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chatId").toString())); - } - if (!jsonObj.get("template").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `template` to be a primitive type in the JSON string but got `%s`", jsonObj.get("template").toString())); - } - // validate the required field `language` - SendTemplateRequestAllOfLanguage.validateJsonElement(jsonObj.get("language")); - if (jsonObj.get("params") != null && !jsonObj.get("params").isJsonNull()) { - JsonArray jsonArrayparams = jsonObj.getAsJsonArray("params"); - if (jsonArrayparams != null) { - // ensure the json data is an array - if (!jsonObj.get("params").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `params` to be an array in the JSON string but got `%s`", jsonObj.get("params").toString())); - } - - // validate the optional field `params` (array) - for (int i = 0; i < jsonArrayparams.size(); i++) { - SendTemplateRequestAllOfParams.validateJsonElement(jsonArrayparams.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequest - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequest - */ - public static SendTemplateRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequest.class); - } - - /** - * Convert an instance of SendTemplateRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrency.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrency.java deleted file mode 100644 index d43e7e4..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrency.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendTemplateRequestAllOfCurrency - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequestAllOfCurrency { - public static final String SERIALIZED_NAME_CURRENCY_CODE = "currency_code"; - @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) - private String currencyCode; - - public static final String SERIALIZED_NAME_AMOUNT1000 = "amount_1000"; - @SerializedName(SERIALIZED_NAME_AMOUNT1000) - private Integer amount1000; - - public SendTemplateRequestAllOfCurrency() { - } - - public SendTemplateRequestAllOfCurrency currencyCode(String currencyCode) { - - this.currencyCode = currencyCode; - return this; - } - - /** - * Get currencyCode - * @return currencyCode - **/ - @javax.annotation.Nullable - public String getCurrencyCode() { - return currencyCode; - } - - - public void setCurrencyCode(String currencyCode) { - this.currencyCode = currencyCode; - } - - - public SendTemplateRequestAllOfCurrency amount1000(Integer amount1000) { - - this.amount1000 = amount1000; - return this; - } - - /** - * Get amount1000 - * @return amount1000 - **/ - @javax.annotation.Nullable - public Integer getAmount1000() { - return amount1000; - } - - - public void setAmount1000(Integer amount1000) { - this.amount1000 = amount1000; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequestAllOfCurrency sendTemplateRequestAllOfCurrency = (SendTemplateRequestAllOfCurrency) o; - return Objects.equals(this.currencyCode, sendTemplateRequestAllOfCurrency.currencyCode) && - Objects.equals(this.amount1000, sendTemplateRequestAllOfCurrency.amount1000); - } - - @Override - public int hashCode() { - return Objects.hash(currencyCode, amount1000); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequestAllOfCurrency {\n"); - sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); - sb.append(" amount1000: ").append(toIndentedString(amount1000)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("currency_code"); - openapiFields.add("amount_1000"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequestAllOfCurrency - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequestAllOfCurrency.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequestAllOfCurrency is not found in the empty JSON string", SendTemplateRequestAllOfCurrency.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequestAllOfCurrency.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequestAllOfCurrency` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("currency_code") != null && !jsonObj.get("currency_code").isJsonNull()) && !jsonObj.get("currency_code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency_code").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequestAllOfCurrency.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequestAllOfCurrency' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequestAllOfCurrency.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequestAllOfCurrency value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequestAllOfCurrency read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequestAllOfCurrency given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequestAllOfCurrency - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequestAllOfCurrency - */ - public static SendTemplateRequestAllOfCurrency fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequestAllOfCurrency.class); - } - - /** - * Convert an instance of SendTemplateRequestAllOfCurrency to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTime.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTime.java deleted file mode 100644 index 183256e..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTime.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SendTemplateRequestAllOfDateTimeComponent; -import org.openapitools.client.model.SendTemplateRequestAllOfDateTimeUnixEpoch; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendTemplateRequestAllOfDateTime - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequestAllOfDateTime { - public static final String SERIALIZED_NAME_COMPONENT = "component"; - @SerializedName(SERIALIZED_NAME_COMPONENT) - private SendTemplateRequestAllOfDateTimeComponent component; - - public static final String SERIALIZED_NAME_UNIX_EPOCH = "unix_epoch"; - @SerializedName(SERIALIZED_NAME_UNIX_EPOCH) - private SendTemplateRequestAllOfDateTimeUnixEpoch unixEpoch; - - public SendTemplateRequestAllOfDateTime() { - } - - public SendTemplateRequestAllOfDateTime component(SendTemplateRequestAllOfDateTimeComponent component) { - - this.component = component; - return this; - } - - /** - * Get component - * @return component - **/ - @javax.annotation.Nullable - public SendTemplateRequestAllOfDateTimeComponent getComponent() { - return component; - } - - - public void setComponent(SendTemplateRequestAllOfDateTimeComponent component) { - this.component = component; - } - - - public SendTemplateRequestAllOfDateTime unixEpoch(SendTemplateRequestAllOfDateTimeUnixEpoch unixEpoch) { - - this.unixEpoch = unixEpoch; - return this; - } - - /** - * Get unixEpoch - * @return unixEpoch - **/ - @javax.annotation.Nullable - public SendTemplateRequestAllOfDateTimeUnixEpoch getUnixEpoch() { - return unixEpoch; - } - - - public void setUnixEpoch(SendTemplateRequestAllOfDateTimeUnixEpoch unixEpoch) { - this.unixEpoch = unixEpoch; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequestAllOfDateTime sendTemplateRequestAllOfDateTime = (SendTemplateRequestAllOfDateTime) o; - return Objects.equals(this.component, sendTemplateRequestAllOfDateTime.component) && - Objects.equals(this.unixEpoch, sendTemplateRequestAllOfDateTime.unixEpoch); - } - - @Override - public int hashCode() { - return Objects.hash(component, unixEpoch); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequestAllOfDateTime {\n"); - sb.append(" component: ").append(toIndentedString(component)).append("\n"); - sb.append(" unixEpoch: ").append(toIndentedString(unixEpoch)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("component"); - openapiFields.add("unix_epoch"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequestAllOfDateTime - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequestAllOfDateTime.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequestAllOfDateTime is not found in the empty JSON string", SendTemplateRequestAllOfDateTime.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequestAllOfDateTime.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequestAllOfDateTime` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `component` - if (jsonObj.get("component") != null && !jsonObj.get("component").isJsonNull()) { - SendTemplateRequestAllOfDateTimeComponent.validateJsonElement(jsonObj.get("component")); - } - // validate the optional field `unix_epoch` - if (jsonObj.get("unix_epoch") != null && !jsonObj.get("unix_epoch").isJsonNull()) { - SendTemplateRequestAllOfDateTimeUnixEpoch.validateJsonElement(jsonObj.get("unix_epoch")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequestAllOfDateTime.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequestAllOfDateTime' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequestAllOfDateTime.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequestAllOfDateTime value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequestAllOfDateTime read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequestAllOfDateTime given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequestAllOfDateTime - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequestAllOfDateTime - */ - public static SendTemplateRequestAllOfDateTime fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequestAllOfDateTime.class); - } - - /** - * Convert an instance of SendTemplateRequestAllOfDateTime to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponent.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponent.java deleted file mode 100644 index 9fbe54a..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponent.java +++ /dev/null @@ -1,497 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendTemplateRequestAllOfDateTimeComponent - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequestAllOfDateTimeComponent { - /** - * Gets or Sets dayOfWeek - */ - @JsonAdapter(DayOfWeekEnum.Adapter.class) - public enum DayOfWeekEnum { - MONDAY("MONDAY"), - - TUESDAY("TUESDAY"), - - WEDNESDAY("WEDNESDAY"), - - THURSDAY("THURSDAY"), - - FRIDAY("FRIDAY"), - - SATURDAY("SATURDAY"), - - SUNDAY("SUNDAY"), - - _1("1"), - - _2("2"), - - _3("3"), - - _4("4"), - - _5("5"), - - _6("6"), - - _7("7"); - - private String value; - - DayOfWeekEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DayOfWeekEnum fromValue(String value) { - for (DayOfWeekEnum b : DayOfWeekEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DayOfWeekEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DayOfWeekEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DayOfWeekEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; - @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) - private DayOfWeekEnum dayOfWeek; - - public static final String SERIALIZED_NAME_YEAR = "year"; - @SerializedName(SERIALIZED_NAME_YEAR) - private Integer year; - - public static final String SERIALIZED_NAME_MONTH = "month"; - @SerializedName(SERIALIZED_NAME_MONTH) - private Integer month; - - public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; - @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) - private Integer dayOfMonth; - - public static final String SERIALIZED_NAME_HOUR = "hour"; - @SerializedName(SERIALIZED_NAME_HOUR) - private Integer hour; - - public static final String SERIALIZED_NAME_MINUTE = "minute"; - @SerializedName(SERIALIZED_NAME_MINUTE) - private Integer minute; - - /** - * Gets or Sets calendar - */ - @JsonAdapter(CalendarEnum.Adapter.class) - public enum CalendarEnum { - GREGORIAN("GREGORIAN"), - - SOLAR_HIJRI("SOLAR_HIJRI"); - - private String value; - - CalendarEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CalendarEnum fromValue(String value) { - for (CalendarEnum b : CalendarEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CalendarEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CalendarEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CalendarEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CALENDAR = "calendar"; - @SerializedName(SERIALIZED_NAME_CALENDAR) - private CalendarEnum calendar; - - public SendTemplateRequestAllOfDateTimeComponent() { - } - - public SendTemplateRequestAllOfDateTimeComponent dayOfWeek(DayOfWeekEnum dayOfWeek) { - - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Get dayOfWeek - * @return dayOfWeek - **/ - @javax.annotation.Nullable - public DayOfWeekEnum getDayOfWeek() { - return dayOfWeek; - } - - - public void setDayOfWeek(DayOfWeekEnum dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - - public SendTemplateRequestAllOfDateTimeComponent year(Integer year) { - - this.year = year; - return this; - } - - /** - * Get year - * @return year - **/ - @javax.annotation.Nullable - public Integer getYear() { - return year; - } - - - public void setYear(Integer year) { - this.year = year; - } - - - public SendTemplateRequestAllOfDateTimeComponent month(Integer month) { - - this.month = month; - return this; - } - - /** - * Get month - * @return month - **/ - @javax.annotation.Nullable - public Integer getMonth() { - return month; - } - - - public void setMonth(Integer month) { - this.month = month; - } - - - public SendTemplateRequestAllOfDateTimeComponent dayOfMonth(Integer dayOfMonth) { - - this.dayOfMonth = dayOfMonth; - return this; - } - - /** - * Get dayOfMonth - * @return dayOfMonth - **/ - @javax.annotation.Nullable - public Integer getDayOfMonth() { - return dayOfMonth; - } - - - public void setDayOfMonth(Integer dayOfMonth) { - this.dayOfMonth = dayOfMonth; - } - - - public SendTemplateRequestAllOfDateTimeComponent hour(Integer hour) { - - this.hour = hour; - return this; - } - - /** - * Get hour - * @return hour - **/ - @javax.annotation.Nullable - public Integer getHour() { - return hour; - } - - - public void setHour(Integer hour) { - this.hour = hour; - } - - - public SendTemplateRequestAllOfDateTimeComponent minute(Integer minute) { - - this.minute = minute; - return this; - } - - /** - * Get minute - * @return minute - **/ - @javax.annotation.Nullable - public Integer getMinute() { - return minute; - } - - - public void setMinute(Integer minute) { - this.minute = minute; - } - - - public SendTemplateRequestAllOfDateTimeComponent calendar(CalendarEnum calendar) { - - this.calendar = calendar; - return this; - } - - /** - * Get calendar - * @return calendar - **/ - @javax.annotation.Nullable - public CalendarEnum getCalendar() { - return calendar; - } - - - public void setCalendar(CalendarEnum calendar) { - this.calendar = calendar; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequestAllOfDateTimeComponent sendTemplateRequestAllOfDateTimeComponent = (SendTemplateRequestAllOfDateTimeComponent) o; - return Objects.equals(this.dayOfWeek, sendTemplateRequestAllOfDateTimeComponent.dayOfWeek) && - Objects.equals(this.year, sendTemplateRequestAllOfDateTimeComponent.year) && - Objects.equals(this.month, sendTemplateRequestAllOfDateTimeComponent.month) && - Objects.equals(this.dayOfMonth, sendTemplateRequestAllOfDateTimeComponent.dayOfMonth) && - Objects.equals(this.hour, sendTemplateRequestAllOfDateTimeComponent.hour) && - Objects.equals(this.minute, sendTemplateRequestAllOfDateTimeComponent.minute) && - Objects.equals(this.calendar, sendTemplateRequestAllOfDateTimeComponent.calendar); - } - - @Override - public int hashCode() { - return Objects.hash(dayOfWeek, year, month, dayOfMonth, hour, minute, calendar); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequestAllOfDateTimeComponent {\n"); - sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); - sb.append(" year: ").append(toIndentedString(year)).append("\n"); - sb.append(" month: ").append(toIndentedString(month)).append("\n"); - sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); - sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); - sb.append(" calendar: ").append(toIndentedString(calendar)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("day_of_week"); - openapiFields.add("year"); - openapiFields.add("month"); - openapiFields.add("day_of_month"); - openapiFields.add("hour"); - openapiFields.add("minute"); - openapiFields.add("calendar"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequestAllOfDateTimeComponent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequestAllOfDateTimeComponent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequestAllOfDateTimeComponent is not found in the empty JSON string", SendTemplateRequestAllOfDateTimeComponent.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequestAllOfDateTimeComponent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequestAllOfDateTimeComponent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("day_of_week") != null && !jsonObj.get("day_of_week").isJsonNull()) && !jsonObj.get("day_of_week").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `day_of_week` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day_of_week").toString())); - } - if ((jsonObj.get("calendar") != null && !jsonObj.get("calendar").isJsonNull()) && !jsonObj.get("calendar").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `calendar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendar").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequestAllOfDateTimeComponent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequestAllOfDateTimeComponent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequestAllOfDateTimeComponent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequestAllOfDateTimeComponent value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequestAllOfDateTimeComponent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequestAllOfDateTimeComponent given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequestAllOfDateTimeComponent - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequestAllOfDateTimeComponent - */ - public static SendTemplateRequestAllOfDateTimeComponent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequestAllOfDateTimeComponent.class); - } - - /** - * Convert an instance of SendTemplateRequestAllOfDateTimeComponent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpoch.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpoch.java deleted file mode 100644 index da92248..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpoch.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendTemplateRequestAllOfDateTimeUnixEpoch - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequestAllOfDateTimeUnixEpoch { - public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; - @SerializedName(SERIALIZED_NAME_TIMESTAMP) - private Integer timestamp; - - public SendTemplateRequestAllOfDateTimeUnixEpoch() { - } - - public SendTemplateRequestAllOfDateTimeUnixEpoch timestamp(Integer timestamp) { - - this.timestamp = timestamp; - return this; - } - - /** - * Get timestamp - * @return timestamp - **/ - @javax.annotation.Nullable - public Integer getTimestamp() { - return timestamp; - } - - - public void setTimestamp(Integer timestamp) { - this.timestamp = timestamp; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequestAllOfDateTimeUnixEpoch sendTemplateRequestAllOfDateTimeUnixEpoch = (SendTemplateRequestAllOfDateTimeUnixEpoch) o; - return Objects.equals(this.timestamp, sendTemplateRequestAllOfDateTimeUnixEpoch.timestamp); - } - - @Override - public int hashCode() { - return Objects.hash(timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequestAllOfDateTimeUnixEpoch {\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("timestamp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequestAllOfDateTimeUnixEpoch - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequestAllOfDateTimeUnixEpoch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequestAllOfDateTimeUnixEpoch is not found in the empty JSON string", SendTemplateRequestAllOfDateTimeUnixEpoch.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequestAllOfDateTimeUnixEpoch.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequestAllOfDateTimeUnixEpoch` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequestAllOfDateTimeUnixEpoch.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequestAllOfDateTimeUnixEpoch' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequestAllOfDateTimeUnixEpoch.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequestAllOfDateTimeUnixEpoch value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequestAllOfDateTimeUnixEpoch read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequestAllOfDateTimeUnixEpoch - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequestAllOfDateTimeUnixEpoch - */ - public static SendTemplateRequestAllOfDateTimeUnixEpoch fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequestAllOfDateTimeUnixEpoch.class); - } - - /** - * Convert an instance of SendTemplateRequestAllOfDateTimeUnixEpoch to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguage.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguage.java deleted file mode 100644 index b4000f8..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguage.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.TemplateLanguageProp; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequestAllOfLanguage { - /** - * Gets or Sets policy - */ - @JsonAdapter(PolicyEnum.Adapter.class) - public enum PolicyEnum { - DETERMINISTIC("deterministic"); - - private String value; - - PolicyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyEnum fromValue(String value) { - for (PolicyEnum b : PolicyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_POLICY = "policy"; - @SerializedName(SERIALIZED_NAME_POLICY) - private PolicyEnum policy; - - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private TemplateLanguageProp code; - - public SendTemplateRequestAllOfLanguage() { - } - - public SendTemplateRequestAllOfLanguage policy(PolicyEnum policy) { - - this.policy = policy; - return this; - } - - /** - * Get policy - * @return policy - **/ - @javax.annotation.Nullable - public PolicyEnum getPolicy() { - return policy; - } - - - public void setPolicy(PolicyEnum policy) { - this.policy = policy; - } - - - public SendTemplateRequestAllOfLanguage code(TemplateLanguageProp code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public TemplateLanguageProp getCode() { - return code; - } - - - public void setCode(TemplateLanguageProp code) { - this.code = code; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequestAllOfLanguage sendTemplateRequestAllOfLanguage = (SendTemplateRequestAllOfLanguage) o; - return Objects.equals(this.policy, sendTemplateRequestAllOfLanguage.policy) && - Objects.equals(this.code, sendTemplateRequestAllOfLanguage.code); - } - - @Override - public int hashCode() { - return Objects.hash(policy, code); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequestAllOfLanguage {\n"); - sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("policy"); - openapiFields.add("code"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequestAllOfLanguage - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequestAllOfLanguage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequestAllOfLanguage is not found in the empty JSON string", SendTemplateRequestAllOfLanguage.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequestAllOfLanguage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequestAllOfLanguage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("policy") != null && !jsonObj.get("policy").isJsonNull()) && !jsonObj.get("policy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequestAllOfLanguage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequestAllOfLanguage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequestAllOfLanguage.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequestAllOfLanguage value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequestAllOfLanguage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequestAllOfLanguage given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequestAllOfLanguage - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequestAllOfLanguage - */ - public static SendTemplateRequestAllOfLanguage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequestAllOfLanguage.class); - } - - /** - * Convert an instance of SendTemplateRequestAllOfLanguage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfParams.java b/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfParams.java deleted file mode 100644 index 4fcca66..0000000 --- a/java/src/main/java/org/openapitools/client/model/SendTemplateRequestAllOfParams.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SendTemplateRequestAllOfCurrency; -import org.openapitools.client.model.SendTemplateRequestAllOfDateTime; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SendTemplateRequestAllOfParams - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SendTemplateRequestAllOfParams { - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private String _default; - - public static final String SERIALIZED_NAME_CURRENCY = "currency"; - @SerializedName(SERIALIZED_NAME_CURRENCY) - private SendTemplateRequestAllOfCurrency currency; - - public static final String SERIALIZED_NAME_DATE_TIME = "date_time"; - @SerializedName(SERIALIZED_NAME_DATE_TIME) - private SendTemplateRequestAllOfDateTime dateTime; - - public SendTemplateRequestAllOfParams() { - } - - public SendTemplateRequestAllOfParams _default(String _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public String getDefault() { - return _default; - } - - - public void setDefault(String _default) { - this._default = _default; - } - - - public SendTemplateRequestAllOfParams currency(SendTemplateRequestAllOfCurrency currency) { - - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @javax.annotation.Nullable - public SendTemplateRequestAllOfCurrency getCurrency() { - return currency; - } - - - public void setCurrency(SendTemplateRequestAllOfCurrency currency) { - this.currency = currency; - } - - - public SendTemplateRequestAllOfParams dateTime(SendTemplateRequestAllOfDateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - public SendTemplateRequestAllOfDateTime getDateTime() { - return dateTime; - } - - - public void setDateTime(SendTemplateRequestAllOfDateTime dateTime) { - this.dateTime = dateTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendTemplateRequestAllOfParams sendTemplateRequestAllOfParams = (SendTemplateRequestAllOfParams) o; - return Objects.equals(this._default, sendTemplateRequestAllOfParams._default) && - Objects.equals(this.currency, sendTemplateRequestAllOfParams.currency) && - Objects.equals(this.dateTime, sendTemplateRequestAllOfParams.dateTime); - } - - @Override - public int hashCode() { - return Objects.hash(_default, currency, dateTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendTemplateRequestAllOfParams {\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("default"); - openapiFields.add("currency"); - openapiFields.add("date_time"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendTemplateRequestAllOfParams - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendTemplateRequestAllOfParams.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SendTemplateRequestAllOfParams is not found in the empty JSON string", SendTemplateRequestAllOfParams.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendTemplateRequestAllOfParams.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendTemplateRequestAllOfParams` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("default") != null && !jsonObj.get("default").isJsonNull()) && !jsonObj.get("default").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default").toString())); - } - // validate the optional field `currency` - if (jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) { - SendTemplateRequestAllOfCurrency.validateJsonElement(jsonObj.get("currency")); - } - // validate the optional field `date_time` - if (jsonObj.get("date_time") != null && !jsonObj.get("date_time").isJsonNull()) { - SendTemplateRequestAllOfDateTime.validateJsonElement(jsonObj.get("date_time")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendTemplateRequestAllOfParams.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendTemplateRequestAllOfParams' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SendTemplateRequestAllOfParams.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SendTemplateRequestAllOfParams value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendTemplateRequestAllOfParams read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SendTemplateRequestAllOfParams given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendTemplateRequestAllOfParams - * @throws IOException if the JSON string is invalid with respect to SendTemplateRequestAllOfParams - */ - public static SendTemplateRequestAllOfParams fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendTemplateRequestAllOfParams.class); - } - - /** - * Convert an instance of SendTemplateRequestAllOfParams to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SetCommerce.java b/java/src/main/java/org/openapitools/client/model/SetCommerce.java deleted file mode 100644 index ced78a3..0000000 --- a/java/src/main/java/org/openapitools/client/model/SetCommerce.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SetCommerce - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SetCommerce { - public static final String SERIALIZED_NAME_SUCCESS = "success"; - @SerializedName(SERIALIZED_NAME_SUCCESS) - private Boolean success; - - public SetCommerce() { - } - - public SetCommerce success(Boolean success) { - - this.success = success; - return this; - } - - /** - * Get success - * @return success - **/ - @javax.annotation.Nullable - public Boolean getSuccess() { - return success; - } - - - public void setSuccess(Boolean success) { - this.success = success; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetCommerce setCommerce = (SetCommerce) o; - return Objects.equals(this.success, setCommerce.success); - } - - @Override - public int hashCode() { - return Objects.hash(success); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetCommerce {\n"); - sb.append(" success: ").append(toIndentedString(success)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("success"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SetCommerce - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SetCommerce.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetCommerce is not found in the empty JSON string", SetCommerce.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SetCommerce.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetCommerce` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetCommerce.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetCommerce' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetCommerce.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetCommerce value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetCommerce read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetCommerce given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetCommerce - * @throws IOException if the JSON string is invalid with respect to SetCommerce - */ - public static SetCommerce fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetCommerce.class); - } - - /** - * Convert an instance of SetCommerce to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SetMe.java b/java/src/main/java/org/openapitools/client/model/SetMe.java deleted file mode 100644 index 25651b4..0000000 --- a/java/src/main/java/org/openapitools/client/model/SetMe.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SetMe - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SetMe { - public static final String SERIALIZED_NAME_RESULT = "result"; - @SerializedName(SERIALIZED_NAME_RESULT) - private String result; - - public SetMe() { - } - - public SetMe result(String result) { - - this.result = result; - return this; - } - - /** - * Get result - * @return result - **/ - @javax.annotation.Nullable - public String getResult() { - return result; - } - - - public void setResult(String result) { - this.result = result; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetMe setMe = (SetMe) o; - return Objects.equals(this.result, setMe.result); - } - - @Override - public int hashCode() { - return Objects.hash(result); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetMe {\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("result"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SetMe - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SetMe.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetMe is not found in the empty JSON string", SetMe.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SetMe.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetMe` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetMe.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetMe' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetMe.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetMe value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetMe read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetMe given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetMe - * @throws IOException if the JSON string is invalid with respect to SetMe - */ - public static SetMe fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetMe.class); - } - - /** - * Convert an instance of SetMe to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SetMeRequest.java b/java/src/main/java/org/openapitools/client/model/SetMeRequest.java deleted file mode 100644 index bca8e74..0000000 --- a/java/src/main/java/org/openapitools/client/model/SetMeRequest.java +++ /dev/null @@ -1,473 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SetMeRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SetMeRequest { - public static final String SERIALIZED_NAME_ABOUT = "about"; - @SerializedName(SERIALIZED_NAME_ABOUT) - private String about; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private String phone; - - /** - * Industry of the business - */ - @JsonAdapter(VerticalEnum.Adapter.class) - public enum VerticalEnum { - AUTOMOTIVE("Automotive"), - - BEAUTY_SPA_AND_SALON("Beauty, Spa and Salon"), - - CLOTHING_AND_APPAREL("Clothing and Apparel"), - - EDUCATION("Education"), - - ENTERTAINMENT("Entertainment"), - - EVENT_PLANNING_AND_SERVICE("Event Planning and Service"), - - FINANCE_AND_BANKING("Finance and Banking"), - - FOOD_AND_GROCERY("Food and Grocery"), - - PUBLIC_SERVICE("Public Service"), - - HOTEL_AND_LODGING("Hotel and Lodging"), - - MEDICAL_AND_HEALTH("Medical and Health"), - - NON_PROFIT("Non-profit"), - - PROFESSIONAL_SERVICES("Professional Services"), - - SHOPPING_AND_RETAIL("Shopping and Retail"), - - TRAVEL_AND_TRANSPORTATION("Travel and Transportation"), - - RESTAURANT("Restaurant"), - - OTHER("Other"), - - EMPTY(""); - - private String value; - - VerticalEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VerticalEnum fromValue(String value) { - for (VerticalEnum b : VerticalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VerticalEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VerticalEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VerticalEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_VERTICAL = "vertical"; - @SerializedName(SERIALIZED_NAME_VERTICAL) - private VerticalEnum vertical; - - public static final String SERIALIZED_NAME_PHOTO = "photo"; - @SerializedName(SERIALIZED_NAME_PHOTO) - private String photo; - - public SetMeRequest() { - } - - public SetMeRequest about(String about) { - - this.about = about; - return this; - } - - /** - * Profile`s About section. - * @return about - **/ - @javax.annotation.Nullable - public String getAbout() { - return about; - } - - - public void setAbout(String about) { - this.about = about; - } - - - public SetMeRequest address(String address) { - - this.address = address; - return this; - } - - /** - * Address of the business - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public SetMeRequest description(String description) { - - this.description = description; - return this; - } - - /** - * Description of the business. Max 256 characters - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public SetMeRequest email(String email) { - - this.email = email; - return this; - } - - /** - * Business email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public SetMeRequest phone(String phone) { - - this.phone = phone; - return this; - } - - /** - * Linked phone number - * @return phone - **/ - @javax.annotation.Nullable - public String getPhone() { - return phone; - } - - - public void setPhone(String phone) { - this.phone = phone; - } - - - public SetMeRequest vertical(VerticalEnum vertical) { - - this.vertical = vertical; - return this; - } - - /** - * Industry of the business - * @return vertical - **/ - @javax.annotation.Nullable - public VerticalEnum getVertical() { - return vertical; - } - - - public void setVertical(VerticalEnum vertical) { - this.vertical = vertical; - } - - - public SetMeRequest photo(String photo) { - - this.photo = photo; - return this; - } - - /** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @return photo - **/ - @javax.annotation.Nullable - public String getPhoto() { - return photo; - } - - - public void setPhoto(String photo) { - this.photo = photo; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetMeRequest setMeRequest = (SetMeRequest) o; - return Objects.equals(this.about, setMeRequest.about) && - Objects.equals(this.address, setMeRequest.address) && - Objects.equals(this.description, setMeRequest.description) && - Objects.equals(this.email, setMeRequest.email) && - Objects.equals(this.phone, setMeRequest.phone) && - Objects.equals(this.vertical, setMeRequest.vertical) && - Objects.equals(this.photo, setMeRequest.photo); - } - - @Override - public int hashCode() { - return Objects.hash(about, address, description, email, phone, vertical, photo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetMeRequest {\n"); - sb.append(" about: ").append(toIndentedString(about)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" vertical: ").append(toIndentedString(vertical)).append("\n"); - sb.append(" photo: ").append(toIndentedString(photo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("about"); - openapiFields.add("address"); - openapiFields.add("description"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("vertical"); - openapiFields.add("photo"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SetMeRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SetMeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetMeRequest is not found in the empty JSON string", SetMeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SetMeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetMeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("about") != null && !jsonObj.get("about").isJsonNull()) && !jsonObj.get("about").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `about` to be a primitive type in the JSON string but got `%s`", jsonObj.get("about").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); - } - if ((jsonObj.get("vertical") != null && !jsonObj.get("vertical").isJsonNull()) && !jsonObj.get("vertical").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vertical` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vertical").toString())); - } - if ((jsonObj.get("photo") != null && !jsonObj.get("photo").isJsonNull()) && !jsonObj.get("photo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `photo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("photo").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetMeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetMeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetMeRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetMeRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetMeRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetMeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetMeRequest - * @throws IOException if the JSON string is invalid with respect to SetMeRequest - */ - public static SetMeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetMeRequest.class); - } - - /** - * Convert an instance of SetMeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SetSettings200Response.java b/java/src/main/java/org/openapitools/client/model/SetSettings200Response.java deleted file mode 100644 index 268ceba..0000000 --- a/java/src/main/java/org/openapitools/client/model/SetSettings200Response.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SetSettings200ResponseAllOfUpdate; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SetSettings200Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SetSettings200Response { - public static final String SERIALIZED_NAME_WEBHOOK_URL = "webhookUrl"; - @SerializedName(SERIALIZED_NAME_WEBHOOK_URL) - private String webhookUrl; - - public static final String SERIALIZED_NAME_UPDATE = "update"; - @SerializedName(SERIALIZED_NAME_UPDATE) - private SetSettings200ResponseAllOfUpdate update; - - public SetSettings200Response() { - } - - public SetSettings200Response webhookUrl(String webhookUrl) { - - this.webhookUrl = webhookUrl; - return this; - } - - /** - * Get webhookUrl - * @return webhookUrl - **/ - @javax.annotation.Nullable - public String getWebhookUrl() { - return webhookUrl; - } - - - public void setWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - } - - - public SetSettings200Response update(SetSettings200ResponseAllOfUpdate update) { - - this.update = update; - return this; - } - - /** - * Get update - * @return update - **/ - @javax.annotation.Nonnull - public SetSettings200ResponseAllOfUpdate getUpdate() { - return update; - } - - - public void setUpdate(SetSettings200ResponseAllOfUpdate update) { - this.update = update; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetSettings200Response setSettings200Response = (SetSettings200Response) o; - return Objects.equals(this.webhookUrl, setSettings200Response.webhookUrl) && - Objects.equals(this.update, setSettings200Response.update); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(webhookUrl, update); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetSettings200Response {\n"); - sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); - sb.append(" update: ").append(toIndentedString(update)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("webhookUrl"); - openapiFields.add("update"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("update"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SetSettings200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SetSettings200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetSettings200Response is not found in the empty JSON string", SetSettings200Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SetSettings200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetSettings200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SetSettings200Response.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("webhookUrl") != null && !jsonObj.get("webhookUrl").isJsonNull()) && !jsonObj.get("webhookUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `webhookUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webhookUrl").toString())); - } - // validate the required field `update` - SetSettings200ResponseAllOfUpdate.validateJsonElement(jsonObj.get("update")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetSettings200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetSettings200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetSettings200Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetSettings200Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetSettings200Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetSettings200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetSettings200Response - * @throws IOException if the JSON string is invalid with respect to SetSettings200Response - */ - public static SetSettings200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetSettings200Response.class); - } - - /** - * Convert an instance of SetSettings200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdate.java b/java/src/main/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdate.java deleted file mode 100644 index 3c9f99e..0000000 --- a/java/src/main/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdate.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SetSettings200ResponseAllOfUpdate - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SetSettings200ResponseAllOfUpdate { - public static final String SERIALIZED_NAME_WEBHOOK_URL = "webhookUrl"; - @SerializedName(SERIALIZED_NAME_WEBHOOK_URL) - private String webhookUrl; - - public SetSettings200ResponseAllOfUpdate() { - } - - public SetSettings200ResponseAllOfUpdate webhookUrl(String webhookUrl) { - - this.webhookUrl = webhookUrl; - return this; - } - - /** - * Get webhookUrl - * @return webhookUrl - **/ - @javax.annotation.Nullable - public String getWebhookUrl() { - return webhookUrl; - } - - - public void setWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetSettings200ResponseAllOfUpdate setSettings200ResponseAllOfUpdate = (SetSettings200ResponseAllOfUpdate) o; - return Objects.equals(this.webhookUrl, setSettings200ResponseAllOfUpdate.webhookUrl); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(webhookUrl); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetSettings200ResponseAllOfUpdate {\n"); - sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("webhookUrl"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SetSettings200ResponseAllOfUpdate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SetSettings200ResponseAllOfUpdate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetSettings200ResponseAllOfUpdate is not found in the empty JSON string", SetSettings200ResponseAllOfUpdate.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SetSettings200ResponseAllOfUpdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetSettings200ResponseAllOfUpdate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("webhookUrl") != null && !jsonObj.get("webhookUrl").isJsonNull()) && !jsonObj.get("webhookUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `webhookUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webhookUrl").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetSettings200ResponseAllOfUpdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetSettings200ResponseAllOfUpdate' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetSettings200ResponseAllOfUpdate.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetSettings200ResponseAllOfUpdate value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetSettings200ResponseAllOfUpdate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetSettings200ResponseAllOfUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetSettings200ResponseAllOfUpdate - * @throws IOException if the JSON string is invalid with respect to SetSettings200ResponseAllOfUpdate - */ - public static SetSettings200ResponseAllOfUpdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetSettings200ResponseAllOfUpdate.class); - } - - /** - * Convert an instance of SetSettings200ResponseAllOfUpdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/SetWebhookStatus.java b/java/src/main/java/org/openapitools/client/model/SetWebhookStatus.java deleted file mode 100644 index 4e9f85a..0000000 --- a/java/src/main/java/org/openapitools/client/model/SetWebhookStatus.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * SetWebhookStatus - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class SetWebhookStatus { - public static final String SERIALIZED_NAME_SET = "set"; - @SerializedName(SERIALIZED_NAME_SET) - private Boolean set; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public SetWebhookStatus() { - } - - public SetWebhookStatus set(Boolean set) { - - this.set = set; - return this; - } - - /** - * Flag indicating that the current request has changed webhook - * @return set - **/ - @javax.annotation.Nullable - public Boolean getSet() { - return set; - } - - - public void setSet(Boolean set) { - this.set = set; - } - - - public SetWebhookStatus message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetWebhookStatus setWebhookStatus = (SetWebhookStatus) o; - return Objects.equals(this.set, setWebhookStatus.set) && - Objects.equals(this.message, setWebhookStatus.message); - } - - @Override - public int hashCode() { - return Objects.hash(set, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetWebhookStatus {\n"); - sb.append(" set: ").append(toIndentedString(set)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("set"); - openapiFields.add("message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SetWebhookStatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SetWebhookStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetWebhookStatus is not found in the empty JSON string", SetWebhookStatus.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SetWebhookStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetWebhookStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetWebhookStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetWebhookStatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetWebhookStatus.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetWebhookStatus value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetWebhookStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetWebhookStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetWebhookStatus - * @throws IOException if the JSON string is invalid with respect to SetWebhookStatus - */ - public static SetWebhookStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetWebhookStatus.class); - } - - /** - * Convert an instance of SetWebhookStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/Settings.java b/java/src/main/java/org/openapitools/client/model/Settings.java deleted file mode 100644 index f3acf73..0000000 --- a/java/src/main/java/org/openapitools/client/model/Settings.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Settings - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class Settings { - public static final String SERIALIZED_NAME_WEBHOOK_URL = "webhookUrl"; - @SerializedName(SERIALIZED_NAME_WEBHOOK_URL) - private String webhookUrl; - - public Settings() { - } - - public Settings webhookUrl(String webhookUrl) { - - this.webhookUrl = webhookUrl; - return this; - } - - /** - * Get webhookUrl - * @return webhookUrl - **/ - @javax.annotation.Nullable - public String getWebhookUrl() { - return webhookUrl; - } - - - public void setWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Settings settings = (Settings) o; - return Objects.equals(this.webhookUrl, settings.webhookUrl); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(webhookUrl); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Settings {\n"); - sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("webhookUrl"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Settings - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Settings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Settings is not found in the empty JSON string", Settings.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Settings.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Settings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("webhookUrl") != null && !jsonObj.get("webhookUrl").isJsonNull()) && !jsonObj.get("webhookUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `webhookUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webhookUrl").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Settings.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Settings' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Settings.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Settings value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Settings read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Settings given an JSON string - * - * @param jsonString JSON string - * @return An instance of Settings - * @throws IOException if the JSON string is invalid with respect to Settings - */ - public static Settings fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Settings.class); - } - - /** - * Convert an instance of Settings to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/TemplateCategoryProp.java b/java/src/main/java/org/openapitools/client/model/TemplateCategoryProp.java deleted file mode 100644 index f871ca0..0000000 --- a/java/src/main/java/org/openapitools/client/model/TemplateCategoryProp.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Template category - */ -@JsonAdapter(TemplateCategoryProp.Adapter.class) -public enum TemplateCategoryProp { - - MARKETING("MARKETING"), - - TRANSACTIONAL("TRANSACTIONAL"), - - OTP("OTP"); - - private String value; - - TemplateCategoryProp(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TemplateCategoryProp fromValue(String value) { - for (TemplateCategoryProp b : TemplateCategoryProp.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TemplateCategoryProp enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TemplateCategoryProp read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TemplateCategoryProp.fromValue(value); - } - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/TemplateComponentsProp.java b/java/src/main/java/org/openapitools/client/model/TemplateComponentsProp.java deleted file mode 100644 index 156d9fc..0000000 --- a/java/src/main/java/org/openapitools/client/model/TemplateComponentsProp.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.TemplateComponentsPropInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * Array of template components - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class TemplateComponentsProp extends ArrayList { - public TemplateComponentsProp() { - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateComponentsProp {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TemplateComponentsProp - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TemplateComponentsProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TemplateComponentsProp is not found in the empty JSON string", TemplateComponentsProp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TemplateComponentsProp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplateComponentsProp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TemplateComponentsProp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TemplateComponentsProp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TemplateComponentsProp.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TemplateComponentsProp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TemplateComponentsProp read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TemplateComponentsProp given an JSON string - * - * @param jsonString JSON string - * @return An instance of TemplateComponentsProp - * @throws IOException if the JSON string is invalid with respect to TemplateComponentsProp - */ - public static TemplateComponentsProp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TemplateComponentsProp.class); - } - - /** - * Convert an instance of TemplateComponentsProp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInner.java b/java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInner.java deleted file mode 100644 index e5aecb2..0000000 --- a/java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInner.java +++ /dev/null @@ -1,453 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.TemplateComponentsPropInnerButtonsInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * TemplateComponentsPropInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class TemplateComponentsPropInner { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BODY("BODY"), - - HEADER("HEADER"), - - FOOTER("FOOTER"), - - BUTTONS("BUTTONS"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - /** - * Only for HEADER type - */ - @JsonAdapter(FormatEnum.Adapter.class) - public enum FormatEnum { - TEXT("TEXT"), - - IMAGE("IMAGE"), - - DOCUMENT("DOCUMENT"), - - VIDEO("VIDEO"); - - private String value; - - FormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FormatEnum fromValue(String value) { - for (FormatEnum b : FormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FormatEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FormatEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - private FormatEnum format; - - public static final String SERIALIZED_NAME_TEXT = "text"; - @SerializedName(SERIALIZED_NAME_TEXT) - private String text; - - public static final String SERIALIZED_NAME_EXAMPLE = "example"; - @SerializedName(SERIALIZED_NAME_EXAMPLE) - private Object example; - - public static final String SERIALIZED_NAME_BUTTONS = "buttons"; - @SerializedName(SERIALIZED_NAME_BUTTONS) - private List buttons; - - public TemplateComponentsPropInner() { - } - - public TemplateComponentsPropInner type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public TemplateComponentsPropInner format(FormatEnum format) { - - this.format = format; - return this; - } - - /** - * Only for HEADER type - * @return format - **/ - @javax.annotation.Nullable - public FormatEnum getFormat() { - return format; - } - - - public void setFormat(FormatEnum format) { - this.format = format; - } - - - public TemplateComponentsPropInner text(String text) { - - this.text = text; - return this; - } - - /** - * Get text - * @return text - **/ - @javax.annotation.Nullable - public String getText() { - return text; - } - - - public void setText(String text) { - this.text = text; - } - - - public TemplateComponentsPropInner example(Object example) { - - this.example = example; - return this; - } - - /** - * Get example - * @return example - **/ - @javax.annotation.Nullable - public Object getExample() { - return example; - } - - - public void setExample(Object example) { - this.example = example; - } - - - public TemplateComponentsPropInner buttons(List buttons) { - - this.buttons = buttons; - return this; - } - - public TemplateComponentsPropInner addButtonsItem(TemplateComponentsPropInnerButtonsInner buttonsItem) { - if (this.buttons == null) { - this.buttons = new ArrayList<>(); - } - this.buttons.add(buttonsItem); - return this; - } - - /** - * Get buttons - * @return buttons - **/ - @javax.annotation.Nullable - public List getButtons() { - return buttons; - } - - - public void setButtons(List buttons) { - this.buttons = buttons; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateComponentsPropInner templateComponentsPropInner = (TemplateComponentsPropInner) o; - return Objects.equals(this.type, templateComponentsPropInner.type) && - Objects.equals(this.format, templateComponentsPropInner.format) && - Objects.equals(this.text, templateComponentsPropInner.text) && - Objects.equals(this.example, templateComponentsPropInner.example) && - Objects.equals(this.buttons, templateComponentsPropInner.buttons); - } - - @Override - public int hashCode() { - return Objects.hash(type, format, text, example, buttons); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateComponentsPropInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" example: ").append(toIndentedString(example)).append("\n"); - sb.append(" buttons: ").append(toIndentedString(buttons)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("format"); - openapiFields.add("text"); - openapiFields.add("example"); - openapiFields.add("buttons"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TemplateComponentsPropInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TemplateComponentsPropInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TemplateComponentsPropInner is not found in the empty JSON string", TemplateComponentsPropInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TemplateComponentsPropInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplateComponentsPropInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); - } - if (jsonObj.get("buttons") != null && !jsonObj.get("buttons").isJsonNull()) { - JsonArray jsonArraybuttons = jsonObj.getAsJsonArray("buttons"); - if (jsonArraybuttons != null) { - // ensure the json data is an array - if (!jsonObj.get("buttons").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `buttons` to be an array in the JSON string but got `%s`", jsonObj.get("buttons").toString())); - } - - // validate the optional field `buttons` (array) - for (int i = 0; i < jsonArraybuttons.size(); i++) { - TemplateComponentsPropInnerButtonsInner.validateJsonElement(jsonArraybuttons.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TemplateComponentsPropInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TemplateComponentsPropInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TemplateComponentsPropInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TemplateComponentsPropInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TemplateComponentsPropInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TemplateComponentsPropInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of TemplateComponentsPropInner - * @throws IOException if the JSON string is invalid with respect to TemplateComponentsPropInner - */ - public static TemplateComponentsPropInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TemplateComponentsPropInner.class); - } - - /** - * Convert an instance of TemplateComponentsPropInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInner.java b/java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInner.java deleted file mode 100644 index ac56f0d..0000000 --- a/java/src/main/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInner.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * TemplateComponentsPropInnerButtonsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class TemplateComponentsPropInnerButtonsInner { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - PHONE_NUMBER("PHONE_NUMBER"), - - URL("URL"), - - QUICK_REPLY("QUICK_REPLY"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_TEXT = "text"; - @SerializedName(SERIALIZED_NAME_TEXT) - private String text; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "phone_number"; - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_EXAMPLE = "example"; - @SerializedName(SERIALIZED_NAME_EXAMPLE) - private List example; - - public TemplateComponentsPropInnerButtonsInner() { - } - - public TemplateComponentsPropInnerButtonsInner type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public TemplateComponentsPropInnerButtonsInner text(String text) { - - this.text = text; - return this; - } - - /** - * Get text - * @return text - **/ - @javax.annotation.Nullable - public String getText() { - return text; - } - - - public void setText(String text) { - this.text = text; - } - - - public TemplateComponentsPropInnerButtonsInner url(String url) { - - this.url = url; - return this; - } - - /** - * Get url - * @return url - **/ - @javax.annotation.Nullable - public String getUrl() { - return url; - } - - - public void setUrl(String url) { - this.url = url; - } - - - public TemplateComponentsPropInnerButtonsInner phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get phoneNumber - * @return phoneNumber - **/ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - - public TemplateComponentsPropInnerButtonsInner example(List example) { - - this.example = example; - return this; - } - - public TemplateComponentsPropInnerButtonsInner addExampleItem(Object exampleItem) { - if (this.example == null) { - this.example = new ArrayList<>(); - } - this.example.add(exampleItem); - return this; - } - - /** - * Get example - * @return example - **/ - @javax.annotation.Nullable - public List getExample() { - return example; - } - - - public void setExample(List example) { - this.example = example; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateComponentsPropInnerButtonsInner templateComponentsPropInnerButtonsInner = (TemplateComponentsPropInnerButtonsInner) o; - return Objects.equals(this.type, templateComponentsPropInnerButtonsInner.type) && - Objects.equals(this.text, templateComponentsPropInnerButtonsInner.text) && - Objects.equals(this.url, templateComponentsPropInnerButtonsInner.url) && - Objects.equals(this.phoneNumber, templateComponentsPropInnerButtonsInner.phoneNumber) && - Objects.equals(this.example, templateComponentsPropInnerButtonsInner.example); - } - - @Override - public int hashCode() { - return Objects.hash(type, text, url, phoneNumber, example); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateComponentsPropInnerButtonsInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" example: ").append(toIndentedString(example)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("url"); - openapiFields.add("phone_number"); - openapiFields.add("example"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TemplateComponentsPropInnerButtonsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TemplateComponentsPropInnerButtonsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TemplateComponentsPropInnerButtonsInner is not found in the empty JSON string", TemplateComponentsPropInnerButtonsInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TemplateComponentsPropInnerButtonsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplateComponentsPropInnerButtonsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); - } - if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); - } - if ((jsonObj.get("phone_number") != null && !jsonObj.get("phone_number").isJsonNull()) && !jsonObj.get("phone_number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone_number").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("example") != null && !jsonObj.get("example").isJsonNull() && !jsonObj.get("example").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `example` to be an array in the JSON string but got `%s`", jsonObj.get("example").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TemplateComponentsPropInnerButtonsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TemplateComponentsPropInnerButtonsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TemplateComponentsPropInnerButtonsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TemplateComponentsPropInnerButtonsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TemplateComponentsPropInnerButtonsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TemplateComponentsPropInnerButtonsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of TemplateComponentsPropInnerButtonsInner - * @throws IOException if the JSON string is invalid with respect to TemplateComponentsPropInnerButtonsInner - */ - public static TemplateComponentsPropInnerButtonsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TemplateComponentsPropInnerButtonsInner.class); - } - - /** - * Convert an instance of TemplateComponentsPropInnerButtonsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/TemplateLanguageProp.java b/java/src/main/java/org/openapitools/client/model/TemplateLanguageProp.java deleted file mode 100644 index 3d27577..0000000 --- a/java/src/main/java/org/openapitools/client/model/TemplateLanguageProp.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Template language - */ -@JsonAdapter(TemplateLanguageProp.Adapter.class) -public enum TemplateLanguageProp { - - AF("af"), - - SQ("sq"), - - AR("ar"), - - AZ("az"), - - BN("bn"), - - BG("bg"), - - CA("ca"), - - ZH_CN("zh_CN"), - - ZH_HK("zh_HK"), - - ZH_TW("zh_TW"), - - HR("hr"), - - CS("cs"), - - DA("da"), - - NL("nl"), - - EN("en"), - - EN_GB("en_GB"), - - EN_US("en_US"), - - ET("et"), - - FIL("fil"), - - FI("fi"), - - FR("fr"), - - DE("de"), - - EL("el"), - - GU("gu"), - - HE("he"), - - HI("hi"), - - HU("hu"), - - ID("id"), - - GA("ga"), - - IT("it"), - - JA("ja"), - - KN("kn"), - - KK("kk"), - - KO("ko"), - - LO("lo"), - - LV("lv"), - - LT("lt"), - - MK("mk"), - - MS("ms"), - - MR("mr"), - - NB("nb"), - - FA("fa"), - - PL("pl"), - - PT_BR("pt_BR"), - - PT_PT("pt_PT"), - - PA("pa"), - - RO("ro"), - - RU("ru"), - - SR("sr"), - - SK("sk"), - - SL("sl"), - - ES("es"), - - ES_AR("es_AR"), - - ES_ES("es_ES"), - - ES_MX("es_MX"), - - SW("sw"), - - SV("sv"), - - TA("ta"), - - TE("te"), - - TH("th"), - - TR("tr"), - - UK("uk"), - - UR("ur"), - - UZ("uz"), - - VI("vi"); - - private String value; - - TemplateLanguageProp(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TemplateLanguageProp fromValue(String value) { - for (TemplateLanguageProp b : TemplateLanguageProp.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TemplateLanguageProp enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TemplateLanguageProp read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TemplateLanguageProp.fromValue(value); - } - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/TemplateNamespaceField.java b/java/src/main/java/org/openapitools/client/model/TemplateNamespaceField.java deleted file mode 100644 index 325276e..0000000 --- a/java/src/main/java/org/openapitools/client/model/TemplateNamespaceField.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * TemplateNamespaceField - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class TemplateNamespaceField { - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - private String namespace; - - public TemplateNamespaceField() { - } - - public TemplateNamespaceField namespace(String namespace) { - - this.namespace = namespace; - return this; - } - - /** - * Get namespace - * @return namespace - **/ - @javax.annotation.Nullable - public String getNamespace() { - return namespace; - } - - - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateNamespaceField templateNamespaceField = (TemplateNamespaceField) o; - return Objects.equals(this.namespace, templateNamespaceField.namespace); - } - - @Override - public int hashCode() { - return Objects.hash(namespace); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateNamespaceField {\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("namespace"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TemplateNamespaceField - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TemplateNamespaceField.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TemplateNamespaceField is not found in the empty JSON string", TemplateNamespaceField.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TemplateNamespaceField.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplateNamespaceField` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TemplateNamespaceField.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TemplateNamespaceField' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TemplateNamespaceField.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TemplateNamespaceField value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TemplateNamespaceField read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TemplateNamespaceField given an JSON string - * - * @param jsonString JSON string - * @return An instance of TemplateNamespaceField - * @throws IOException if the JSON string is invalid with respect to TemplateNamespaceField - */ - public static TemplateNamespaceField fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TemplateNamespaceField.class); - } - - /** - * Convert an instance of TemplateNamespaceField to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/UploadMedia.java b/java/src/main/java/org/openapitools/client/model/UploadMedia.java deleted file mode 100644 index 070d9ee..0000000 --- a/java/src/main/java/org/openapitools/client/model/UploadMedia.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * UploadMedia - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class UploadMedia { - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public UploadMedia() { - } - - public UploadMedia body(String body) { - - this.body = body; - return this; - } - - /** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @return body - **/ - @javax.annotation.Nonnull - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadMedia uploadMedia = (UploadMedia) o; - return Objects.equals(this.body, uploadMedia.body); - } - - @Override - public int hashCode() { - return Objects.hash(body); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UploadMedia {\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("body"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("body"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UploadMedia - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UploadMedia.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UploadMedia is not found in the empty JSON string", UploadMedia.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UploadMedia.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UploadMedia` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UploadMedia.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UploadMedia.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UploadMedia' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UploadMedia.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UploadMedia value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UploadMedia read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UploadMedia given an JSON string - * - * @param jsonString JSON string - * @return An instance of UploadMedia - * @throws IOException if the JSON string is invalid with respect to UploadMedia - */ - public static UploadMedia fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UploadMedia.class); - } - - /** - * Convert an instance of UploadMedia to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/main/java/org/openapitools/client/model/WebhookUrl.java b/java/src/main/java/org/openapitools/client/model/WebhookUrl.java deleted file mode 100644 index de487c1..0000000 --- a/java/src/main/java/org/openapitools/client/model/WebhookUrl.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import io.onemessage.JSON; - -/** - * WebhookUrl - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T20:55:21.249421086+07:00[Asia/Bangkok]") -public class WebhookUrl { - public static final String SERIALIZED_NAME_WEBHOOK_URL = "webhookUrl"; - @SerializedName(SERIALIZED_NAME_WEBHOOK_URL) - private String webhookUrl; - - public WebhookUrl() { - } - - public WebhookUrl webhookUrl(String webhookUrl) { - - this.webhookUrl = webhookUrl; - return this; - } - - /** - * Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - * @return webhookUrl - **/ - @javax.annotation.Nonnull - public String getWebhookUrl() { - return webhookUrl; - } - - - public void setWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebhookUrl webhookUrl = (WebhookUrl) o; - return Objects.equals(this.webhookUrl, webhookUrl.webhookUrl); - } - - @Override - public int hashCode() { - return Objects.hash(webhookUrl); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WebhookUrl {\n"); - sb.append(" webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("webhookUrl"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("webhookUrl"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WebhookUrl - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WebhookUrl.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookUrl is not found in the empty JSON string", WebhookUrl.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WebhookUrl.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebhookUrl` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : WebhookUrl.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("webhookUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `webhookUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webhookUrl").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WebhookUrl.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WebhookUrl' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WebhookUrl.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WebhookUrl value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WebhookUrl read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WebhookUrl given an JSON string - * - * @param jsonString JSON string - * @return An instance of WebhookUrl - * @throws IOException if the JSON string is invalid with respect to WebhookUrl - */ - public static WebhookUrl fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WebhookUrl.class); - } - - /** - * Convert an instance of WebhookUrl to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java/src/test/java/org/openapitools/client/api/ChannelApiTest.java b/java/src/test/java/org/openapitools/client/api/ChannelApiTest.java deleted file mode 100644 index 222b2f6..0000000 --- a/java/src/test/java/org/openapitools/client/api/ChannelApiTest.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ChannelExtendedStatistics; -import org.openapitools.client.model.ChannelStatistics; -import org.openapitools.client.model.ChannelStatus; -import org.openapitools.client.model.GetCommerce; -import org.openapitools.client.model.GetIP; -import org.openapitools.client.model.GetMe; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.SetMe; -import org.openapitools.client.model.SetMeRequest; -import org.openapitools.client.model.SetSettings200Response; -import org.openapitools.client.model.Settings; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ChannelApi - */ -@Disabled -public class ChannelApiTest { - - private final ChannelApi api = new ChannelApi(); - - /** - * Get Commerce Settings - * - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getCommerceTest() throws ApiException { - GetCommerce response = api.getCommerce(); - // TODO: test validations - } - - /** - * Get Extended Channel statistics - * - * Get channel usage extended statistics - * - * @throws ApiException if the Api call fails - */ - @Test - public void getExtendedStatisticsTest() throws ApiException { - ChannelExtendedStatistics response = api.getExtendedStatistics(); - // TODO: test validations - } - - /** - * Get Profile Info - * - * Use this edge to retrieve your profile's About info - * - * @throws ApiException if the Api call fails - */ - @Test - public void getMeTest() throws ApiException { - GetMe response = api.getMe(); - // TODO: test validations - } - - /** - * Get Settings - * - * **webhookUrl** - Http or https URL for receiving notifications. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSettingsTest() throws ApiException { - Settings response = api.getSettings(); - // TODO: test validations - } - - /** - * Get Channel statistics - * - * Get channel usage statistics - * - * @throws ApiException if the Api call fails - */ - @Test - public void getStatisticsTest() throws ApiException { - String date = null; - ChannelStatistics response = api.getStatistics(date); - // TODO: test validations - } - - /** - * Get Status - * - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * - * @throws ApiException if the Api call fails - */ - @Test - public void getStatusTest() throws ApiException { - ChannelStatus response = api.getStatus(); - // TODO: test validations - } - - /** - * Get channel server IP - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void outputIPTest() throws ApiException { - GetIP response = api.outputIP(); - // TODO: test validations - } - - /** - * Change user info - * - * Change user info - * - * @throws ApiException if the Api call fails - */ - @Test - public void setMeTest() throws ApiException { - SetMeRequest setMeRequest = null; - SetMe response = api.setMe(setMeRequest); - // TODO: test validations - } - - /** - * Set settings - * - * **webhookUrl** - Http or https URL for receiving notifications. - * - * @throws ApiException if the Api call fails - */ - @Test - public void setSettingsTest() throws ApiException { - Settings settings = null; - SetSettings200Response response = api.setSettings(settings); - // TODO: test validations - } - -} diff --git a/java/src/test/java/org/openapitools/client/api/MediaApiTest.java b/java/src/test/java/org/openapitools/client/api/MediaApiTest.java deleted file mode 100644 index 93f5969..0000000 --- a/java/src/test/java/org/openapitools/client/api/MediaApiTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.MediaId; -import org.openapitools.client.model.UploadMedia; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MediaApi - */ -@Disabled -public class MediaApiTest { - - private final MediaApi api = new MediaApi(); - - /** - * Upload media & get mediaId - * - * Upload media and get mediaId. Uploaded media can be sent in template - * - * @throws ApiException if the Api call fails - */ - @Test - public void uploadMediaTest() throws ApiException { - UploadMedia uploadMedia = null; - MediaId response = api.uploadMedia(uploadMedia); - // TODO: test validations - } - -} diff --git a/java/src/test/java/org/openapitools/client/api/MessagingApiTest.java b/java/src/test/java/org/openapitools/client/api/MessagingApiTest.java deleted file mode 100644 index a6c4cb8..0000000 --- a/java/src/test/java/org/openapitools/client/api/MessagingApiTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.GetMessages; -import org.openapitools.client.model.ReadMessageRequest; -import org.openapitools.client.model.SendContactRequest; -import org.openapitools.client.model.SendFileRequest; -import org.openapitools.client.model.SendListRequest; -import org.openapitools.client.model.SendLocationRequest; -import org.openapitools.client.model.SendMessageRequest; -import org.openapitools.client.model.SendMessageStatus; -import org.openapitools.client.model.SetMe; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MessagingApi - */ -@Disabled -public class MessagingApiTest { - - private final MessagingApi api = new MessagingApi(); - - /** - * Get messages list - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void messagesListTest() throws ApiException { - Boolean last = null; - Integer lastMessageNumber = null; - Integer firstMessageNumber = null; - Integer limit = null; - String chatId = null; - Integer minTime = null; - Integer maxTime = null; - String msgId = null; - GetMessages response = api.messagesList(last, lastMessageNumber, firstMessageNumber, limit, chatId, minTime, maxTime, msgId); - // TODO: test validations - } - - /** - * Mark message as read - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void readMessageTest() throws ApiException { - ReadMessageRequest readMessageRequest = null; - SetMe response = api.readMessage(readMessageRequest); - // TODO: test validations - } - - /** - * Send a Contact - * - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendContactTest() throws ApiException { - SendContactRequest sendContactRequest = null; - SendMessageStatus response = api.sendContact(sendContactRequest); - // TODO: test validations - } - - /** - * Send a File - * - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendFileTest() throws ApiException { - SendFileRequest sendFileRequest = null; - SendMessageStatus response = api.sendFile(sendFileRequest); - // TODO: test validations - } - - /** - * Send List Message - * - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendListTest() throws ApiException { - SendListRequest sendListRequest = null; - SendMessageStatus response = api.sendList(sendListRequest); - // TODO: test validations - } - - /** - * Send a Location - * - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendLocationTest() throws ApiException { - SendLocationRequest sendLocationRequest = null; - SendMessageStatus response = api.sendLocation(sendLocationRequest); - // TODO: test validations - } - - /** - * Send a Message - * - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendMessageTest() throws ApiException { - SendMessageRequest sendMessageRequest = null; - SendMessageStatus response = api.sendMessage(sendMessageRequest); - // TODO: test validations - } - -} diff --git a/java/src/test/java/org/openapitools/client/api/ProductsCatalogsApiTest.java b/java/src/test/java/org/openapitools/client/api/ProductsCatalogsApiTest.java deleted file mode 100644 index b14a937..0000000 --- a/java/src/test/java/org/openapitools/client/api/ProductsCatalogsApiTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Commerce; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.SendMessageStatus; -import org.openapitools.client.model.SendProductRequest; -import org.openapitools.client.model.SetCommerce; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ProductsCatalogsApi - */ -@Disabled -public class ProductsCatalogsApiTest { - - private final ProductsCatalogsApi api = new ProductsCatalogsApi(); - - /** - * Send a Product - * - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendProductTest() throws ApiException { - SendProductRequest sendProductRequest = null; - SendMessageStatus response = api.sendProduct(sendProductRequest); - // TODO: test validations - } - - /** - * Set Commerce Settings - * - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * - * @throws ApiException if the Api call fails - */ - @Test - public void setCommerceTest() throws ApiException { - Commerce commerce = null; - SetCommerce response = api.setCommerce(commerce); - // TODO: test validations - } - -} diff --git a/java/src/test/java/org/openapitools/client/api/TemplatesApiTest.java b/java/src/test/java/org/openapitools/client/api/TemplatesApiTest.java deleted file mode 100644 index 4d6eee3..0000000 --- a/java/src/test/java/org/openapitools/client/api/TemplatesApiTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.AddTemplateRequest; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.GetTemplates; -import org.openapitools.client.model.RemoveTemplateRequest; -import org.openapitools.client.model.SendMessageStatus; -import org.openapitools.client.model.SendTemplateRequest; -import org.openapitools.client.model.SetMe; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for TemplatesApi - */ -@Disabled -public class TemplatesApiTest { - - private final TemplatesApi api = new TemplatesApi(); - - /** - * Create template - * - * Create new template for sending. - * - * @throws ApiException if the Api call fails - */ - @Test - public void addTemplateTest() throws ApiException { - AddTemplateRequest addTemplateRequest = null; - Object response = api.addTemplate(addTemplateRequest); - // TODO: test validations - } - - /** - * Remove template - * - * Deleted template can not be restored. - * - * @throws ApiException if the Api call fails - */ - @Test - public void removeTemplateTest() throws ApiException { - RemoveTemplateRequest removeTemplateRequest = null; - SetMe response = api.removeTemplate(removeTemplateRequest); - // TODO: test validations - } - - /** - * Send Template Message - * - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * - * @throws ApiException if the Api call fails - */ - @Test - public void sendTemplateTest() throws ApiException { - SendTemplateRequest sendTemplateRequest = null; - SendMessageStatus response = api.sendTemplate(sendTemplateRequest); - // TODO: test validations - } - - /** - * Get templates list - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void templatesListTest() throws ApiException { - GetTemplates response = api.templatesList(); - // TODO: test validations - } - -} diff --git a/java/src/test/java/org/openapitools/client/api/WebhooksApiTest.java b/java/src/test/java/org/openapitools/client/api/WebhooksApiTest.java deleted file mode 100644 index 3d4007a..0000000 --- a/java/src/test/java/org/openapitools/client/api/WebhooksApiTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.GetAckInfo; -import org.openapitools.client.model.GetMe401Response; -import org.openapitools.client.model.SetWebhookStatus; -import org.openapitools.client.model.WebhookUrl; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for WebhooksApi - */ -@Disabled -public class WebhooksApiTest { - - private final WebhooksApi api = new WebhooksApi(); - - /** - * Check ACKs - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void ackHookInfoTest() throws ApiException { - String messageId = null; - GetAckInfo response = api.ackHookInfo(messageId); - // TODO: test validations - } - - /** - * Set webhook - * - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * - * @throws ApiException if the Api call fails - */ - @Test - public void setWebhookTest() throws ApiException { - WebhookUrl webhookUrl = null; - SetWebhookStatus response = api.setWebhook(webhookUrl); - // TODO: test validations - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/AckTest.java b/java/src/test/java/org/openapitools/client/model/AckTest.java deleted file mode 100644 index f943b73..0000000 --- a/java/src/test/java/org/openapitools/client/model/AckTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Ack - */ -public class AckTest { - private final Ack model = new Ack(); - - /** - * Model tests for Ack - */ - @Test - public void testAck() { - // TODO: test Ack - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/AddTemplateRequestTest.java b/java/src/test/java/org/openapitools/client/model/AddTemplateRequestTest.java deleted file mode 100644 index 9721d59..0000000 --- a/java/src/test/java/org/openapitools/client/model/AddTemplateRequestTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.TemplateCategoryProp; -import org.openapitools.client.model.TemplateComponentsProp; -import org.openapitools.client.model.TemplateLanguageProp; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AddTemplateRequest - */ -public class AddTemplateRequestTest { - private final AddTemplateRequest model = new AddTemplateRequest(); - - /** - * Model tests for AddTemplateRequest - */ - @Test - public void testAddTemplateRequest() { - // TODO: test AddTemplateRequest - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** - * Test the property 'components' - */ - @Test - public void componentsTest() { - // TODO: test components - } - - /** - * Test the property 'language' - */ - @Test - public void languageTest() { - // TODO: test language - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsInnerTest.java b/java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsInnerTest.java deleted file mode 100644 index 5394815..0000000 --- a/java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsInnerTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChannelExtendedStatisticsInner - */ -public class ChannelExtendedStatisticsInnerTest { - private final ChannelExtendedStatisticsInner model = new ChannelExtendedStatisticsInner(); - - /** - * Model tests for ChannelExtendedStatisticsInner - */ - @Test - public void testChannelExtendedStatisticsInner() { - // TODO: test ChannelExtendedStatisticsInner - } - - /** - * Test the property 'businessInitiatedPaidQuantity' - */ - @Test - public void businessInitiatedPaidQuantityTest() { - // TODO: test businessInitiatedPaidQuantity - } - - /** - * Test the property 'businessInitiatedPrice' - */ - @Test - public void businessInitiatedPriceTest() { - // TODO: test businessInitiatedPrice - } - - /** - * Test the property 'businessInitiatedQuantity' - */ - @Test - public void businessInitiatedQuantityTest() { - // TODO: test businessInitiatedQuantity - } - - /** - * Test the property 'freeEntryPoint' - */ - @Test - public void freeEntryPointTest() { - // TODO: test freeEntryPoint - } - - /** - * Test the property 'freeQuantity' - */ - @Test - public void freeQuantityTest() { - // TODO: test freeQuantity - } - - /** - * Test the property 'freeTier' - */ - @Test - public void freeTierTest() { - // TODO: test freeTier - } - - /** - * Test the property 'paidQuantity' - */ - @Test - public void paidQuantityTest() { - // TODO: test paidQuantity - } - - /** - * Test the property 'periodDate' - */ - @Test - public void periodDateTest() { - // TODO: test periodDate - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'totalPrice' - */ - @Test - public void totalPriceTest() { - // TODO: test totalPrice - } - - /** - * Test the property 'userInitiatedPaidQuantity' - */ - @Test - public void userInitiatedPaidQuantityTest() { - // TODO: test userInitiatedPaidQuantity - } - - /** - * Test the property 'userInitiatedPrice' - */ - @Test - public void userInitiatedPriceTest() { - // TODO: test userInitiatedPrice - } - - /** - * Test the property 'userInitiatedQuantity' - */ - @Test - public void userInitiatedQuantityTest() { - // TODO: test userInitiatedQuantity - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsTest.java b/java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsTest.java deleted file mode 100644 index da33f42..0000000 --- a/java/src/test/java/org/openapitools/client/model/ChannelExtendedStatisticsTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ChannelExtendedStatisticsInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChannelExtendedStatistics - */ -public class ChannelExtendedStatisticsTest { - private final ChannelExtendedStatistics model = new ChannelExtendedStatistics(); - - /** - * Model tests for ChannelExtendedStatistics - */ - @Test - public void testChannelExtendedStatistics() { - // TODO: test ChannelExtendedStatistics - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ChannelStatisticsTest.java b/java/src/test/java/org/openapitools/client/model/ChannelStatisticsTest.java deleted file mode 100644 index 81af3ca..0000000 --- a/java/src/test/java/org/openapitools/client/model/ChannelStatisticsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChannelStatistics - */ -public class ChannelStatisticsTest { - private final ChannelStatistics model = new ChannelStatistics(); - - /** - * Model tests for ChannelStatistics - */ - @Test - public void testChannelStatistics() { - // TODO: test ChannelStatistics - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - - /** - * Test the property 'templatesCost' - */ - @Test - public void templatesCostTest() { - // TODO: test templatesCost - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ChannelStatusTest.java b/java/src/test/java/org/openapitools/client/model/ChannelStatusTest.java deleted file mode 100644 index ee3de80..0000000 --- a/java/src/test/java/org/openapitools/client/model/ChannelStatusTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChannelStatus - */ -public class ChannelStatusTest { - private final ChannelStatus model = new ChannelStatus(); - - /** - * Model tests for ChannelStatus - */ - @Test - public void testChannelStatus() { - // TODO: test ChannelStatus - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ChatIdPropTest.java b/java/src/test/java/org/openapitools/client/model/ChatIdPropTest.java deleted file mode 100644 index df495b4..0000000 --- a/java/src/test/java/org/openapitools/client/model/ChatIdPropTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChatIdProp - */ -public class ChatIdPropTest { - private final ChatIdProp model = new ChatIdProp(); - - /** - * Model tests for ChatIdProp - */ - @Test - public void testChatIdProp() { - // TODO: test ChatIdProp - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/CommerceParamsTest.java b/java/src/test/java/org/openapitools/client/model/CommerceParamsTest.java deleted file mode 100644 index a03774c..0000000 --- a/java/src/test/java/org/openapitools/client/model/CommerceParamsTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CommerceParams - */ -public class CommerceParamsTest { - private final CommerceParams model = new CommerceParams(); - - /** - * Model tests for CommerceParams - */ - @Test - public void testCommerceParams() { - // TODO: test CommerceParams - } - - /** - * Test the property 'isCartEnabled' - */ - @Test - public void isCartEnabledTest() { - // TODO: test isCartEnabled - } - - /** - * Test the property 'isCatalogVisible' - */ - @Test - public void isCatalogVisibleTest() { - // TODO: test isCatalogVisible - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/CommerceTest.java b/java/src/test/java/org/openapitools/client/model/CommerceTest.java deleted file mode 100644 index 5ef2809..0000000 --- a/java/src/test/java/org/openapitools/client/model/CommerceTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CommerceParams; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Commerce - */ -public class CommerceTest { - private final Commerce model = new Commerce(); - - /** - * Model tests for Commerce - */ - @Test - public void testCommerce() { - // TODO: test Commerce - } - - /** - * Test the property 'params' - */ - @Test - public void paramsTest() { - // TODO: test params - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ContactsContactsInnerTest.java b/java/src/test/java/org/openapitools/client/model/ContactsContactsInnerTest.java deleted file mode 100644 index 5362816..0000000 --- a/java/src/test/java/org/openapitools/client/model/ContactsContactsInnerTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ContactsContactsInner - */ -public class ContactsContactsInnerTest { - private final ContactsContactsInner model = new ContactsContactsInner(); - - /** - * Model tests for ContactsContactsInner - */ - @Test - public void testContactsContactsInner() { - // TODO: test ContactsContactsInner - } - - /** - * Test the property 'input' - */ - @Test - public void inputTest() { - // TODO: test input - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'waId' - */ - @Test - public void waIdTest() { - // TODO: test waId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ContactsRequestTest.java b/java/src/test/java/org/openapitools/client/model/ContactsRequestTest.java deleted file mode 100644 index a9dbd9d..0000000 --- a/java/src/test/java/org/openapitools/client/model/ContactsRequestTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ContactsRequest - */ -public class ContactsRequestTest { - private final ContactsRequest model = new ContactsRequest(); - - /** - * Model tests for ContactsRequest - */ - @Test - public void testContactsRequest() { - // TODO: test ContactsRequest - } - - /** - * Test the property 'blocking' - */ - @Test - public void blockingTest() { - // TODO: test blocking - } - - /** - * Test the property 'forceCheck' - */ - @Test - public void forceCheckTest() { - // TODO: test forceCheck - } - - /** - * Test the property 'contacts' - */ - @Test - public void contactsTest() { - // TODO: test contacts - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ContactsTest.java b/java/src/test/java/org/openapitools/client/model/ContactsTest.java deleted file mode 100644 index f3e0d04..0000000 --- a/java/src/test/java/org/openapitools/client/model/ContactsTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ContactsContactsInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Contacts - */ -public class ContactsTest { - private final Contacts model = new Contacts(); - - /** - * Model tests for Contacts - */ - @Test - public void testContacts() { - // TODO: test Contacts - } - - /** - * Test the property 'contacts' - */ - @Test - public void contactsTest() { - // TODO: test contacts - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetAckInfoHooksInnerTest.java b/java/src/test/java/org/openapitools/client/model/GetAckInfoHooksInnerTest.java deleted file mode 100644 index 4485fc8..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetAckInfoHooksInnerTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetAckInfoHooksInner - */ -public class GetAckInfoHooksInnerTest { - private final GetAckInfoHooksInner model = new GetAckInfoHooksInner(); - - /** - * Model tests for GetAckInfoHooksInner - */ - @Test - public void testGetAckInfoHooksInner() { - // TODO: test GetAckInfoHooksInner - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'pricing' - */ - @Test - public void pricingTest() { - // TODO: test pricing - } - - /** - * Test the property 'timestamp' - */ - @Test - public void timestampTest() { - // TODO: test timestamp - } - - /** - * Test the property 'conversation' - */ - @Test - public void conversationTest() { - // TODO: test conversation - } - - /** - * Test the property 'recipientId' - */ - @Test - public void recipientIdTest() { - // TODO: test recipientId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetAckInfoTest.java b/java/src/test/java/org/openapitools/client/model/GetAckInfoTest.java deleted file mode 100644 index e33ce5f..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetAckInfoTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.GetAckInfoHooksInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetAckInfo - */ -public class GetAckInfoTest { - private final GetAckInfo model = new GetAckInfo(); - - /** - * Model tests for GetAckInfo - */ - @Test - public void testGetAckInfo() { - // TODO: test GetAckInfo - } - - /** - * Test the property 'hooks' - */ - @Test - public void hooksTest() { - // TODO: test hooks - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetCommerceInnerTest.java b/java/src/test/java/org/openapitools/client/model/GetCommerceInnerTest.java deleted file mode 100644 index 7e014a8..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetCommerceInnerTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetCommerceInner - */ -public class GetCommerceInnerTest { - private final GetCommerceInner model = new GetCommerceInner(); - - /** - * Model tests for GetCommerceInner - */ - @Test - public void testGetCommerceInner() { - // TODO: test GetCommerceInner - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'isCartEnabled' - */ - @Test - public void isCartEnabledTest() { - // TODO: test isCartEnabled - } - - /** - * Test the property 'isCatalogVisible' - */ - @Test - public void isCatalogVisibleTest() { - // TODO: test isCatalogVisible - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetCommerceTest.java b/java/src/test/java/org/openapitools/client/model/GetCommerceTest.java deleted file mode 100644 index 0c02d26..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetCommerceTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.GetCommerceInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetCommerce - */ -public class GetCommerceTest { - private final GetCommerce model = new GetCommerce(); - - /** - * Model tests for GetCommerce - */ - @Test - public void testGetCommerce() { - // TODO: test GetCommerce - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetIPTest.java b/java/src/test/java/org/openapitools/client/model/GetIPTest.java deleted file mode 100644 index eeaf218..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetIPTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetIP - */ -public class GetIPTest { - private final GetIP model = new GetIP(); - - /** - * Model tests for GetIP - */ - @Test - public void testGetIP() { - // TODO: test GetIP - } - - /** - * Test the property 'result' - */ - @Test - public void resultTest() { - // TODO: test result - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetMe401ResponseTest.java b/java/src/test/java/org/openapitools/client/model/GetMe401ResponseTest.java deleted file mode 100644 index 96598fc..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetMe401ResponseTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetMe401Response - */ -public class GetMe401ResponseTest { - private final GetMe401Response model = new GetMe401Response(); - - /** - * Model tests for GetMe401Response - */ - @Test - public void testGetMe401Response() { - // TODO: test GetMe401Response - } - - /** - * Test the property 'error' - */ - @Test - public void errorTest() { - // TODO: test error - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetMeTest.java b/java/src/test/java/org/openapitools/client/model/GetMeTest.java deleted file mode 100644 index ccfa1e2..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetMeTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetMe - */ -public class GetMeTest { - private final GetMe model = new GetMe(); - - /** - * Model tests for GetMe - */ - @Test - public void testGetMe() { - // TODO: test GetMe - } - - /** - * Test the property 'about' - */ - @Test - public void aboutTest() { - // TODO: test about - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'vertical' - */ - @Test - public void verticalTest() { - // TODO: test vertical - } - - /** - * Test the property 'photo' - */ - @Test - public void photoTest() { - // TODO: test photo - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetMessagesMessagesInnerTest.java b/java/src/test/java/org/openapitools/client/model/GetMessagesMessagesInnerTest.java deleted file mode 100644 index 8c68132..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetMessagesMessagesInnerTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetMessagesMessagesInner - */ -public class GetMessagesMessagesInnerTest { - private final GetMessagesMessagesInner model = new GetMessagesMessagesInner(); - - /** - * Model tests for GetMessagesMessagesInner - */ - @Test - public void testGetMessagesMessagesInner() { - // TODO: test GetMessagesMessagesInner - } - - /** - * Test the property 'messageNumber' - */ - @Test - public void messageNumberTest() { - // TODO: test messageNumber - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** - * Test the property 'fromMe' - */ - @Test - public void fromMeTest() { - // TODO: test fromMe - } - - /** - * Test the property 'self' - */ - @Test - public void selfTest() { - // TODO: test self - } - - /** - * Test the property 'isForwarded' - */ - @Test - public void isForwardedTest() { - // TODO: test isForwarded - } - - /** - * Test the property 'author' - */ - @Test - public void authorTest() { - // TODO: test author - } - - /** - * Test the property 'time' - */ - @Test - public void timeTest() { - // TODO: test time - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'senderName' - */ - @Test - public void senderNameTest() { - // TODO: test senderName - } - - /** - * Test the property 'caption' - */ - @Test - public void captionTest() { - // TODO: test caption - } - - /** - * Test the property 'quotedMsgId' - */ - @Test - public void quotedMsgIdTest() { - // TODO: test quotedMsgId - } - - /** - * Test the property 'metadata' - */ - @Test - public void metadataTest() { - // TODO: test metadata - } - - /** - * Test the property 'chatName' - */ - @Test - public void chatNameTest() { - // TODO: test chatName - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetMessagesTest.java b/java/src/test/java/org/openapitools/client/model/GetMessagesTest.java deleted file mode 100644 index 5ce12f3..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetMessagesTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.GetMessagesMessagesInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetMessages - */ -public class GetMessagesTest { - private final GetMessages model = new GetMessages(); - - /** - * Model tests for GetMessages - */ - @Test - public void testGetMessages() { - // TODO: test GetMessages - } - - /** - * Test the property 'messages' - */ - @Test - public void messagesTest() { - // TODO: test messages - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetTemplatesTemplatesInnerTest.java b/java/src/test/java/org/openapitools/client/model/GetTemplatesTemplatesInnerTest.java deleted file mode 100644 index 8f7ecff..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetTemplatesTemplatesInnerTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.TemplateCategoryProp; -import org.openapitools.client.model.TemplateComponentsProp; -import org.openapitools.client.model.TemplateLanguageProp; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetTemplatesTemplatesInner - */ -public class GetTemplatesTemplatesInnerTest { - private final GetTemplatesTemplatesInner model = new GetTemplatesTemplatesInner(); - - /** - * Model tests for GetTemplatesTemplatesInner - */ - @Test - public void testGetTemplatesTemplatesInner() { - // TODO: test GetTemplatesTemplatesInner - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** - * Test the property 'components' - */ - @Test - public void componentsTest() { - // TODO: test components - } - - /** - * Test the property 'language' - */ - @Test - public void languageTest() { - // TODO: test language - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - - /** - * Test the property 'rejectedReason' - */ - @Test - public void rejectedReasonTest() { - // TODO: test rejectedReason - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/GetTemplatesTest.java b/java/src/test/java/org/openapitools/client/model/GetTemplatesTest.java deleted file mode 100644 index 885c1ba..0000000 --- a/java/src/test/java/org/openapitools/client/model/GetTemplatesTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.GetTemplatesTemplatesInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GetTemplates - */ -public class GetTemplatesTest { - private final GetTemplates model = new GetTemplates(); - - /** - * Model tests for GetTemplates - */ - @Test - public void testGetTemplates() { - // TODO: test GetTemplates - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'templates' - */ - @Test - public void templatesTest() { - // TODO: test templates - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/MeComponentsTest.java b/java/src/test/java/org/openapitools/client/model/MeComponentsTest.java deleted file mode 100644 index 986634a..0000000 --- a/java/src/test/java/org/openapitools/client/model/MeComponentsTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MeComponents - */ -public class MeComponentsTest { - private final MeComponents model = new MeComponents(); - - /** - * Model tests for MeComponents - */ - @Test - public void testMeComponents() { - // TODO: test MeComponents - } - - /** - * Test the property 'about' - */ - @Test - public void aboutTest() { - // TODO: test about - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'vertical' - */ - @Test - public void verticalTest() { - // TODO: test vertical - } - - /** - * Test the property 'photo' - */ - @Test - public void photoTest() { - // TODO: test photo - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/MediaIdTest.java b/java/src/test/java/org/openapitools/client/model/MediaIdTest.java deleted file mode 100644 index 5fdd589..0000000 --- a/java/src/test/java/org/openapitools/client/model/MediaIdTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MediaId - */ -public class MediaIdTest { - private final MediaId model = new MediaId(); - - /** - * Model tests for MediaId - */ - @Test - public void testMediaId() { - // TODO: test MediaId - } - - /** - * Test the property 'mediaId' - */ - @Test - public void mediaIdTest() { - // TODO: test mediaId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/MessageIdPropTest.java b/java/src/test/java/org/openapitools/client/model/MessageIdPropTest.java deleted file mode 100644 index 6b13a6b..0000000 --- a/java/src/test/java/org/openapitools/client/model/MessageIdPropTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MessageIdProp - */ -public class MessageIdPropTest { - private final MessageIdProp model = new MessageIdProp(); - - /** - * Model tests for MessageIdProp - */ - @Test - public void testMessageIdProp() { - // TODO: test MessageIdProp - } - - /** - * Test the property 'messageId' - */ - @Test - public void messageIdTest() { - // TODO: test messageId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/MessageTest.java b/java/src/test/java/org/openapitools/client/model/MessageTest.java deleted file mode 100644 index c5946d7..0000000 --- a/java/src/test/java/org/openapitools/client/model/MessageTest.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Message - */ -public class MessageTest { - private final Message model = new Message(); - - /** - * Model tests for Message - */ - @Test - public void testMessage() { - // TODO: test Message - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** - * Test the property 'fromMe' - */ - @Test - public void fromMeTest() { - // TODO: test fromMe - } - - /** - * Test the property 'self' - */ - @Test - public void selfTest() { - // TODO: test self - } - - /** - * Test the property 'isForwarded' - */ - @Test - public void isForwardedTest() { - // TODO: test isForwarded - } - - /** - * Test the property 'author' - */ - @Test - public void authorTest() { - // TODO: test author - } - - /** - * Test the property 'time' - */ - @Test - public void timeTest() { - // TODO: test time - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'senderName' - */ - @Test - public void senderNameTest() { - // TODO: test senderName - } - - /** - * Test the property 'caption' - */ - @Test - public void captionTest() { - // TODO: test caption - } - - /** - * Test the property 'quotedMsgId' - */ - @Test - public void quotedMsgIdTest() { - // TODO: test quotedMsgId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/PhonePropTest.java b/java/src/test/java/org/openapitools/client/model/PhonePropTest.java deleted file mode 100644 index 7ddd1b1..0000000 --- a/java/src/test/java/org/openapitools/client/model/PhonePropTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PhoneProp - */ -public class PhonePropTest { - private final PhoneProp model = new PhoneProp(); - - /** - * Model tests for PhoneProp - */ - @Test - public void testPhoneProp() { - // TODO: test PhoneProp - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/ReadMessageRequestTest.java b/java/src/test/java/org/openapitools/client/model/ReadMessageRequestTest.java deleted file mode 100644 index ce044d0..0000000 --- a/java/src/test/java/org/openapitools/client/model/ReadMessageRequestTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ReadMessageRequest - */ -public class ReadMessageRequestTest { - private final ReadMessageRequest model = new ReadMessageRequest(); - - /** - * Model tests for ReadMessageRequest - */ - @Test - public void testReadMessageRequest() { - // TODO: test ReadMessageRequest - } - - /** - * Test the property 'messageId' - */ - @Test - public void messageIdTest() { - // TODO: test messageId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/RemoveTemplateRequestTest.java b/java/src/test/java/org/openapitools/client/model/RemoveTemplateRequestTest.java deleted file mode 100644 index ec5ed06..0000000 --- a/java/src/test/java/org/openapitools/client/model/RemoveTemplateRequestTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for RemoveTemplateRequest - */ -public class RemoveTemplateRequestTest { - private final RemoveTemplateRequest model = new RemoveTemplateRequest(); - - /** - * Model tests for RemoveTemplateRequest - */ - @Test - public void testRemoveTemplateRequest() { - // TODO: test RemoveTemplateRequest - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendContactRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendContactRequestTest.java deleted file mode 100644 index 169df3a..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendContactRequestTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendContactRequest - */ -public class SendContactRequestTest { - private final SendContactRequest model = new SendContactRequest(); - - /** - * Model tests for SendContactRequest - */ - @Test - public void testSendContactRequest() { - // TODO: test SendContactRequest - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'contacts' - */ - @Test - public void contactsTest() { - // TODO: test contacts - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendFileRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendFileRequestTest.java deleted file mode 100644 index ab1ccff..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendFileRequestTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendFileRequest - */ -public class SendFileRequestTest { - private final SendFileRequest model = new SendFileRequest(); - - /** - * Model tests for SendFileRequest - */ - @Test - public void testSendFileRequest() { - // TODO: test SendFileRequest - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** - * Test the property 'filename' - */ - @Test - public void filenameTest() { - // TODO: test filename - } - - /** - * Test the property 'caption' - */ - @Test - public void captionTest() { - // TODO: test caption - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendListRequestAllOfRowsTest.java b/java/src/test/java/org/openapitools/client/model/SendListRequestAllOfRowsTest.java deleted file mode 100644 index 5597fb4..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendListRequestAllOfRowsTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendListRequestAllOfRows - */ -public class SendListRequestAllOfRowsTest { - private final SendListRequestAllOfRows model = new SendListRequestAllOfRows(); - - /** - * Model tests for SendListRequestAllOfRows - */ - @Test - public void testSendListRequestAllOfRows() { - // TODO: test SendListRequestAllOfRows - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'title' - */ - @Test - public void titleTest() { - // TODO: test title - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendListRequestAllOfSectionsTest.java b/java/src/test/java/org/openapitools/client/model/SendListRequestAllOfSectionsTest.java deleted file mode 100644 index 30607f3..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendListRequestAllOfSectionsTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendListRequestAllOfRows; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendListRequestAllOfSections - */ -public class SendListRequestAllOfSectionsTest { - private final SendListRequestAllOfSections model = new SendListRequestAllOfSections(); - - /** - * Model tests for SendListRequestAllOfSections - */ - @Test - public void testSendListRequestAllOfSections() { - // TODO: test SendListRequestAllOfSections - } - - /** - * Test the property 'title' - */ - @Test - public void titleTest() { - // TODO: test title - } - - /** - * Test the property 'rows' - */ - @Test - public void rowsTest() { - // TODO: test rows - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendListRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendListRequestTest.java deleted file mode 100644 index 2054cc1..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendListRequestTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendListRequestAllOfSections; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendListRequest - */ -public class SendListRequestTest { - private final SendListRequest model = new SendListRequest(); - - /** - * Model tests for SendListRequest - */ - @Test - public void testSendListRequest() { - // TODO: test SendListRequest - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** - * Test the property 'header' - */ - @Test - public void headerTest() { - // TODO: test header - } - - /** - * Test the property 'footer' - */ - @Test - public void footerTest() { - // TODO: test footer - } - - /** - * Test the property 'action' - */ - @Test - public void actionTest() { - // TODO: test action - } - - /** - * Test the property 'sections' - */ - @Test - public void sectionsTest() { - // TODO: test sections - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendLocationRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendLocationRequestTest.java deleted file mode 100644 index 1669368..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendLocationRequestTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendLocationRequest - */ -public class SendLocationRequestTest { - private final SendLocationRequest model = new SendLocationRequest(); - - /** - * Model tests for SendLocationRequest - */ - @Test - public void testSendLocationRequest() { - // TODO: test SendLocationRequest - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'lat' - */ - @Test - public void latTest() { - // TODO: test lat - } - - /** - * Test the property 'lng' - */ - @Test - public void lngTest() { - // TODO: test lng - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendMessageRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendMessageRequestTest.java deleted file mode 100644 index dae0574..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendMessageRequestTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendMessageRequest - */ -public class SendMessageRequestTest { - private final SendMessageRequest model = new SendMessageRequest(); - - /** - * Model tests for SendMessageRequest - */ - @Test - public void testSendMessageRequest() { - // TODO: test SendMessageRequest - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendMessageStatusTest.java b/java/src/test/java/org/openapitools/client/model/SendMessageStatusTest.java deleted file mode 100644 index 6a8074d..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendMessageStatusTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendMessageStatus - */ -public class SendMessageStatusTest { - private final SendMessageStatus model = new SendMessageStatus(); - - /** - * Model tests for SendMessageStatus - */ - @Test - public void testSendMessageStatus() { - // TODO: test SendMessageStatus - } - - /** - * Test the property 'sent' - */ - @Test - public void sentTest() { - // TODO: test sent - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItemsTest.java b/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItemsTest.java deleted file mode 100644 index 0172617..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionProductItemsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendProductRequestAllOfActionProductItems - */ -public class SendProductRequestAllOfActionProductItemsTest { - private final SendProductRequestAllOfActionProductItems model = new SendProductRequestAllOfActionProductItems(); - - /** - * Model tests for SendProductRequestAllOfActionProductItems - */ - @Test - public void testSendProductRequestAllOfActionProductItems() { - // TODO: test SendProductRequestAllOfActionProductItems - } - - /** - * Test the property 'productRetailerId' - */ - @Test - public void productRetailerIdTest() { - // TODO: test productRetailerId - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionSectionsTest.java b/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionSectionsTest.java deleted file mode 100644 index 2385998..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionSectionsTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendProductRequestAllOfActionProductItems; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendProductRequestAllOfActionSections - */ -public class SendProductRequestAllOfActionSectionsTest { - private final SendProductRequestAllOfActionSections model = new SendProductRequestAllOfActionSections(); - - /** - * Model tests for SendProductRequestAllOfActionSections - */ - @Test - public void testSendProductRequestAllOfActionSections() { - // TODO: test SendProductRequestAllOfActionSections - } - - /** - * Test the property 'title' - */ - @Test - public void titleTest() { - // TODO: test title - } - - /** - * Test the property 'productItems' - */ - @Test - public void productItemsTest() { - // TODO: test productItems - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionTest.java b/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionTest.java deleted file mode 100644 index dfaec1b..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendProductRequestAllOfActionTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendProductRequestAllOfActionSections; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendProductRequestAllOfAction - */ -public class SendProductRequestAllOfActionTest { - private final SendProductRequestAllOfAction model = new SendProductRequestAllOfAction(); - - /** - * Model tests for SendProductRequestAllOfAction - */ - @Test - public void testSendProductRequestAllOfAction() { - // TODO: test SendProductRequestAllOfAction - } - - /** - * Test the property 'catalogId' - */ - @Test - public void catalogIdTest() { - // TODO: test catalogId - } - - /** - * Test the property 'productRetailerId' - */ - @Test - public void productRetailerIdTest() { - // TODO: test productRetailerId - } - - /** - * Test the property 'sections' - */ - @Test - public void sectionsTest() { - // TODO: test sections - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendProductRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendProductRequestTest.java deleted file mode 100644 index 60d828b..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendProductRequestTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SendProductRequestAllOfAction; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendProductRequest - */ -public class SendProductRequestTest { - private final SendProductRequest model = new SendProductRequest(); - - /** - * Model tests for SendProductRequest - */ - @Test - public void testSendProductRequest() { - // TODO: test SendProductRequest - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'action' - */ - @Test - public void actionTest() { - // TODO: test action - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** - * Test the property 'footer' - */ - @Test - public void footerTest() { - // TODO: test footer - } - - /** - * Test the property 'header' - */ - @Test - public void headerTest() { - // TODO: test header - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrencyTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrencyTest.java deleted file mode 100644 index 4f7e775..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfCurrencyTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequestAllOfCurrency - */ -public class SendTemplateRequestAllOfCurrencyTest { - private final SendTemplateRequestAllOfCurrency model = new SendTemplateRequestAllOfCurrency(); - - /** - * Model tests for SendTemplateRequestAllOfCurrency - */ - @Test - public void testSendTemplateRequestAllOfCurrency() { - // TODO: test SendTemplateRequestAllOfCurrency - } - - /** - * Test the property 'currencyCode' - */ - @Test - public void currencyCodeTest() { - // TODO: test currencyCode - } - - /** - * Test the property 'amount1000' - */ - @Test - public void amount1000Test() { - // TODO: test amount1000 - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponentTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponentTest.java deleted file mode 100644 index 46382f4..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeComponentTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequestAllOfDateTimeComponent - */ -public class SendTemplateRequestAllOfDateTimeComponentTest { - private final SendTemplateRequestAllOfDateTimeComponent model = new SendTemplateRequestAllOfDateTimeComponent(); - - /** - * Model tests for SendTemplateRequestAllOfDateTimeComponent - */ - @Test - public void testSendTemplateRequestAllOfDateTimeComponent() { - // TODO: test SendTemplateRequestAllOfDateTimeComponent - } - - /** - * Test the property 'dayOfWeek' - */ - @Test - public void dayOfWeekTest() { - // TODO: test dayOfWeek - } - - /** - * Test the property 'year' - */ - @Test - public void yearTest() { - // TODO: test year - } - - /** - * Test the property 'month' - */ - @Test - public void monthTest() { - // TODO: test month - } - - /** - * Test the property 'dayOfMonth' - */ - @Test - public void dayOfMonthTest() { - // TODO: test dayOfMonth - } - - /** - * Test the property 'hour' - */ - @Test - public void hourTest() { - // TODO: test hour - } - - /** - * Test the property 'minute' - */ - @Test - public void minuteTest() { - // TODO: test minute - } - - /** - * Test the property 'calendar' - */ - @Test - public void calendarTest() { - // TODO: test calendar - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeTest.java deleted file mode 100644 index 2a95056..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SendTemplateRequestAllOfDateTimeComponent; -import org.openapitools.client.model.SendTemplateRequestAllOfDateTimeUnixEpoch; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequestAllOfDateTime - */ -public class SendTemplateRequestAllOfDateTimeTest { - private final SendTemplateRequestAllOfDateTime model = new SendTemplateRequestAllOfDateTime(); - - /** - * Model tests for SendTemplateRequestAllOfDateTime - */ - @Test - public void testSendTemplateRequestAllOfDateTime() { - // TODO: test SendTemplateRequestAllOfDateTime - } - - /** - * Test the property 'component' - */ - @Test - public void componentTest() { - // TODO: test component - } - - /** - * Test the property 'unixEpoch' - */ - @Test - public void unixEpochTest() { - // TODO: test unixEpoch - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpochTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpochTest.java deleted file mode 100644 index c0c5477..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfDateTimeUnixEpochTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequestAllOfDateTimeUnixEpoch - */ -public class SendTemplateRequestAllOfDateTimeUnixEpochTest { - private final SendTemplateRequestAllOfDateTimeUnixEpoch model = new SendTemplateRequestAllOfDateTimeUnixEpoch(); - - /** - * Model tests for SendTemplateRequestAllOfDateTimeUnixEpoch - */ - @Test - public void testSendTemplateRequestAllOfDateTimeUnixEpoch() { - // TODO: test SendTemplateRequestAllOfDateTimeUnixEpoch - } - - /** - * Test the property 'timestamp' - */ - @Test - public void timestampTest() { - // TODO: test timestamp - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguageTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguageTest.java deleted file mode 100644 index 31e5c2b..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfLanguageTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.TemplateLanguageProp; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequestAllOfLanguage - */ -public class SendTemplateRequestAllOfLanguageTest { - private final SendTemplateRequestAllOfLanguage model = new SendTemplateRequestAllOfLanguage(); - - /** - * Model tests for SendTemplateRequestAllOfLanguage - */ - @Test - public void testSendTemplateRequestAllOfLanguage() { - // TODO: test SendTemplateRequestAllOfLanguage - } - - /** - * Test the property 'policy' - */ - @Test - public void policyTest() { - // TODO: test policy - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfParamsTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfParamsTest.java deleted file mode 100644 index e9bf7b9..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestAllOfParamsTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SendTemplateRequestAllOfCurrency; -import org.openapitools.client.model.SendTemplateRequestAllOfDateTime; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequestAllOfParams - */ -public class SendTemplateRequestAllOfParamsTest { - private final SendTemplateRequestAllOfParams model = new SendTemplateRequestAllOfParams(); - - /** - * Model tests for SendTemplateRequestAllOfParams - */ - @Test - public void testSendTemplateRequestAllOfParams() { - // TODO: test SendTemplateRequestAllOfParams - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** - * Test the property 'currency' - */ - @Test - public void currencyTest() { - // TODO: test currency - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestTest.java b/java/src/test/java/org/openapitools/client/model/SendTemplateRequestTest.java deleted file mode 100644 index 33bf3ce..0000000 --- a/java/src/test/java/org/openapitools/client/model/SendTemplateRequestTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.SendTemplateRequestAllOfLanguage; -import org.openapitools.client.model.SendTemplateRequestAllOfParams; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SendTemplateRequest - */ -public class SendTemplateRequestTest { - private final SendTemplateRequest model = new SendTemplateRequest(); - - /** - * Model tests for SendTemplateRequest - */ - @Test - public void testSendTemplateRequest() { - // TODO: test SendTemplateRequest - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - - /** - * Test the property 'chatId' - */ - @Test - public void chatIdTest() { - // TODO: test chatId - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'template' - */ - @Test - public void templateTest() { - // TODO: test template - } - - /** - * Test the property 'language' - */ - @Test - public void languageTest() { - // TODO: test language - } - - /** - * Test the property 'params' - */ - @Test - public void paramsTest() { - // TODO: test params - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SetCommerceTest.java b/java/src/test/java/org/openapitools/client/model/SetCommerceTest.java deleted file mode 100644 index e01d8e2..0000000 --- a/java/src/test/java/org/openapitools/client/model/SetCommerceTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SetCommerce - */ -public class SetCommerceTest { - private final SetCommerce model = new SetCommerce(); - - /** - * Model tests for SetCommerce - */ - @Test - public void testSetCommerce() { - // TODO: test SetCommerce - } - - /** - * Test the property 'success' - */ - @Test - public void successTest() { - // TODO: test success - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SetMeRequestTest.java b/java/src/test/java/org/openapitools/client/model/SetMeRequestTest.java deleted file mode 100644 index 2613782..0000000 --- a/java/src/test/java/org/openapitools/client/model/SetMeRequestTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SetMeRequest - */ -public class SetMeRequestTest { - private final SetMeRequest model = new SetMeRequest(); - - /** - * Model tests for SetMeRequest - */ - @Test - public void testSetMeRequest() { - // TODO: test SetMeRequest - } - - /** - * Test the property 'about' - */ - @Test - public void aboutTest() { - // TODO: test about - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'vertical' - */ - @Test - public void verticalTest() { - // TODO: test vertical - } - - /** - * Test the property 'photo' - */ - @Test - public void photoTest() { - // TODO: test photo - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SetMeTest.java b/java/src/test/java/org/openapitools/client/model/SetMeTest.java deleted file mode 100644 index 010d05e..0000000 --- a/java/src/test/java/org/openapitools/client/model/SetMeTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SetMe - */ -public class SetMeTest { - private final SetMe model = new SetMe(); - - /** - * Model tests for SetMe - */ - @Test - public void testSetMe() { - // TODO: test SetMe - } - - /** - * Test the property 'result' - */ - @Test - public void resultTest() { - // TODO: test result - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdateTest.java b/java/src/test/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdateTest.java deleted file mode 100644 index 0209dc4..0000000 --- a/java/src/test/java/org/openapitools/client/model/SetSettings200ResponseAllOfUpdateTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SetSettings200ResponseAllOfUpdate - */ -public class SetSettings200ResponseAllOfUpdateTest { - private final SetSettings200ResponseAllOfUpdate model = new SetSettings200ResponseAllOfUpdate(); - - /** - * Model tests for SetSettings200ResponseAllOfUpdate - */ - @Test - public void testSetSettings200ResponseAllOfUpdate() { - // TODO: test SetSettings200ResponseAllOfUpdate - } - - /** - * Test the property 'webhookUrl' - */ - @Test - public void webhookUrlTest() { - // TODO: test webhookUrl - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SetSettings200ResponseTest.java b/java/src/test/java/org/openapitools/client/model/SetSettings200ResponseTest.java deleted file mode 100644 index 1a9cb8f..0000000 --- a/java/src/test/java/org/openapitools/client/model/SetSettings200ResponseTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.SetSettings200ResponseAllOfUpdate; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SetSettings200Response - */ -public class SetSettings200ResponseTest { - private final SetSettings200Response model = new SetSettings200Response(); - - /** - * Model tests for SetSettings200Response - */ - @Test - public void testSetSettings200Response() { - // TODO: test SetSettings200Response - } - - /** - * Test the property 'webhookUrl' - */ - @Test - public void webhookUrlTest() { - // TODO: test webhookUrl - } - - /** - * Test the property 'update' - */ - @Test - public void updateTest() { - // TODO: test update - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SetWebhookStatusTest.java b/java/src/test/java/org/openapitools/client/model/SetWebhookStatusTest.java deleted file mode 100644 index bea6783..0000000 --- a/java/src/test/java/org/openapitools/client/model/SetWebhookStatusTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SetWebhookStatus - */ -public class SetWebhookStatusTest { - private final SetWebhookStatus model = new SetWebhookStatus(); - - /** - * Model tests for SetWebhookStatus - */ - @Test - public void testSetWebhookStatus() { - // TODO: test SetWebhookStatus - } - - /** - * Test the property 'set' - */ - @Test - public void setTest() { - // TODO: test set - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/SettingsTest.java b/java/src/test/java/org/openapitools/client/model/SettingsTest.java deleted file mode 100644 index e66f7c1..0000000 --- a/java/src/test/java/org/openapitools/client/model/SettingsTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Settings - */ -public class SettingsTest { - private final Settings model = new Settings(); - - /** - * Model tests for Settings - */ - @Test - public void testSettings() { - // TODO: test Settings - } - - /** - * Test the property 'webhookUrl' - */ - @Test - public void webhookUrlTest() { - // TODO: test webhookUrl - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/TemplateCategoryPropTest.java b/java/src/test/java/org/openapitools/client/model/TemplateCategoryPropTest.java deleted file mode 100644 index 42d7d79..0000000 --- a/java/src/test/java/org/openapitools/client/model/TemplateCategoryPropTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TemplateCategoryProp - */ -public class TemplateCategoryPropTest { - /** - * Model tests for TemplateCategoryProp - */ - @Test - public void testTemplateCategoryProp() { - // TODO: test TemplateCategoryProp - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInnerTest.java b/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInnerTest.java deleted file mode 100644 index c936803..0000000 --- a/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerButtonsInnerTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TemplateComponentsPropInnerButtonsInner - */ -public class TemplateComponentsPropInnerButtonsInnerTest { - private final TemplateComponentsPropInnerButtonsInner model = new TemplateComponentsPropInnerButtonsInner(); - - /** - * Model tests for TemplateComponentsPropInnerButtonsInner - */ - @Test - public void testTemplateComponentsPropInnerButtonsInner() { - // TODO: test TemplateComponentsPropInnerButtonsInner - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'text' - */ - @Test - public void textTest() { - // TODO: test text - } - - /** - * Test the property 'url' - */ - @Test - public void urlTest() { - // TODO: test url - } - - /** - * Test the property 'phoneNumber' - */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** - * Test the property 'example' - */ - @Test - public void exampleTest() { - // TODO: test example - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerTest.java b/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerTest.java deleted file mode 100644 index 25af6b0..0000000 --- a/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropInnerTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.TemplateComponentsPropInnerButtonsInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TemplateComponentsPropInner - */ -public class TemplateComponentsPropInnerTest { - private final TemplateComponentsPropInner model = new TemplateComponentsPropInner(); - - /** - * Model tests for TemplateComponentsPropInner - */ - @Test - public void testTemplateComponentsPropInner() { - // TODO: test TemplateComponentsPropInner - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'text' - */ - @Test - public void textTest() { - // TODO: test text - } - - /** - * Test the property 'example' - */ - @Test - public void exampleTest() { - // TODO: test example - } - - /** - * Test the property 'buttons' - */ - @Test - public void buttonsTest() { - // TODO: test buttons - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropTest.java b/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropTest.java deleted file mode 100644 index 6e92b2b..0000000 --- a/java/src/test/java/org/openapitools/client/model/TemplateComponentsPropTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.TemplateComponentsPropInner; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TemplateComponentsProp - */ -public class TemplateComponentsPropTest { - private final TemplateComponentsProp model = new TemplateComponentsProp(); - - /** - * Model tests for TemplateComponentsProp - */ - @Test - public void testTemplateComponentsProp() { - // TODO: test TemplateComponentsProp - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/TemplateLanguagePropTest.java b/java/src/test/java/org/openapitools/client/model/TemplateLanguagePropTest.java deleted file mode 100644 index 72aa4b5..0000000 --- a/java/src/test/java/org/openapitools/client/model/TemplateLanguagePropTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TemplateLanguageProp - */ -public class TemplateLanguagePropTest { - /** - * Model tests for TemplateLanguageProp - */ - @Test - public void testTemplateLanguageProp() { - // TODO: test TemplateLanguageProp - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/TemplateNamespaceFieldTest.java b/java/src/test/java/org/openapitools/client/model/TemplateNamespaceFieldTest.java deleted file mode 100644 index b2cf576..0000000 --- a/java/src/test/java/org/openapitools/client/model/TemplateNamespaceFieldTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TemplateNamespaceField - */ -public class TemplateNamespaceFieldTest { - private final TemplateNamespaceField model = new TemplateNamespaceField(); - - /** - * Model tests for TemplateNamespaceField - */ - @Test - public void testTemplateNamespaceField() { - // TODO: test TemplateNamespaceField - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/UploadMediaTest.java b/java/src/test/java/org/openapitools/client/model/UploadMediaTest.java deleted file mode 100644 index 23a6ce9..0000000 --- a/java/src/test/java/org/openapitools/client/model/UploadMediaTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UploadMedia - */ -public class UploadMediaTest { - private final UploadMedia model = new UploadMedia(); - - /** - * Model tests for UploadMedia - */ - @Test - public void testUploadMedia() { - // TODO: test UploadMedia - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - -} diff --git a/java/src/test/java/org/openapitools/client/model/WebhookUrlTest.java b/java/src/test/java/org/openapitools/client/model/WebhookUrlTest.java deleted file mode 100644 index 4be4d88..0000000 --- a/java/src/test/java/org/openapitools/client/model/WebhookUrlTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for WebhookUrl - */ -public class WebhookUrlTest { - private final WebhookUrl model = new WebhookUrl(); - - /** - * Model tests for WebhookUrl - */ - @Test - public void testWebhookUrl() { - // TODO: test WebhookUrl - } - - /** - * Test the property 'webhookUrl' - */ - @Test - public void webhookUrlTest() { - // TODO: test webhookUrl - } - -} diff --git a/js/.babelrc b/js/.babelrc deleted file mode 100644 index 2a53a4f..0000000 --- a/js/.babelrc +++ /dev/null @@ -1,44 +0,0 @@ -{ - "targets":{"node":"14", - "esmodules": false - }, - "assumptions": { - "enumerableModuleMeta": true, - "privateFieldsAsSymbols": false, - "noIncompleteNsImportDetection": true, - "constantReexports": true, - "privateFieldsAsProperties": false - }, - - "presets": [ - "@babel/preset-env" - ], - "plugins": [ - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-json-strings", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - "@babel/plugin-proposal-optional-chaining", - [ - "@babel/plugin-proposal-pipeline-operator", - { - "proposal": "minimal" - } - ], - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-do-expressions", - "@babel/plugin-proposal-function-bind" - ] -} diff --git a/js/.gitignore b/js/.gitignore deleted file mode 100644 index 6a7d6d8..0000000 --- a/js/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* \ No newline at end of file diff --git a/js/.openapi-generator-ignore b/js/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/js/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/js/.openapi-generator/FILES b/js/.openapi-generator/FILES deleted file mode 100644 index 1408e44..0000000 --- a/js/.openapi-generator/FILES +++ /dev/null @@ -1,149 +0,0 @@ -.babelrc -.gitignore -.travis.yml -README.md -docs/Ack.md -docs/AddTemplateRequest.md -docs/ChannelApi.md -docs/ChannelExtendedStatistics.md -docs/ChannelExtendedStatisticsInner.md -docs/ChannelStatistics.md -docs/ChannelStatus.md -docs/ChatIdProp.md -docs/Commerce.md -docs/CommerceParams.md -docs/Contacts.md -docs/ContactsContactsInner.md -docs/ContactsRequest.md -docs/GetAckInfo.md -docs/GetAckInfoHooksInner.md -docs/GetCommerce.md -docs/GetCommerceInner.md -docs/GetIP.md -docs/GetMe.md -docs/GetMe401Response.md -docs/GetMessages.md -docs/GetMessagesMessagesInner.md -docs/GetTemplates.md -docs/GetTemplatesTemplatesInner.md -docs/MeComponents.md -docs/MediaApi.md -docs/MediaId.md -docs/Message.md -docs/MessageIdProp.md -docs/MessagingApi.md -docs/PhoneProp.md -docs/ProductsCatalogsApi.md -docs/ReadMessageRequest.md -docs/RemoveTemplateRequest.md -docs/SendContactRequest.md -docs/SendFileRequest.md -docs/SendListRequest.md -docs/SendListRequestAllOfRows.md -docs/SendListRequestAllOfSections.md -docs/SendLocationRequest.md -docs/SendMessageRequest.md -docs/SendMessageStatus.md -docs/SendProductRequest.md -docs/SendProductRequestAllOfAction.md -docs/SendProductRequestAllOfActionProductItems.md -docs/SendProductRequestAllOfActionSections.md -docs/SendTemplateRequest.md -docs/SendTemplateRequestAllOfCurrency.md -docs/SendTemplateRequestAllOfDateTime.md -docs/SendTemplateRequestAllOfDateTimeComponent.md -docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md -docs/SendTemplateRequestAllOfLanguage.md -docs/SendTemplateRequestAllOfParams.md -docs/SetCommerce.md -docs/SetMe.md -docs/SetMeRequest.md -docs/SetSettings200Response.md -docs/SetSettings200ResponseAllOfUpdate.md -docs/SetWebhookStatus.md -docs/Settings.md -docs/TemplateCategoryProp.md -docs/TemplateComponentsProp.md -docs/TemplateComponentsPropInner.md -docs/TemplateComponentsPropInnerButtonsInner.md -docs/TemplateLanguageProp.md -docs/TemplateNamespaceField.md -docs/TemplatesApi.md -docs/UploadMedia.md -docs/WebhookUrl.md -docs/WebhooksApi.md -git_push.sh -mocha.opts -package.json -src/ApiClient.js -src/api/ChannelApi.js -src/api/MediaApi.js -src/api/MessagingApi.js -src/api/ProductsCatalogsApi.js -src/api/TemplatesApi.js -src/api/WebhooksApi.js -src/index.js -src/model/Ack.js -src/model/AddTemplateRequest.js -src/model/ChannelExtendedStatistics.js -src/model/ChannelExtendedStatisticsInner.js -src/model/ChannelStatistics.js -src/model/ChannelStatus.js -src/model/ChatIdProp.js -src/model/Commerce.js -src/model/CommerceParams.js -src/model/Contacts.js -src/model/ContactsContactsInner.js -src/model/ContactsRequest.js -src/model/GetAckInfo.js -src/model/GetAckInfoHooksInner.js -src/model/GetCommerce.js -src/model/GetCommerceInner.js -src/model/GetIP.js -src/model/GetMe.js -src/model/GetMe401Response.js -src/model/GetMessages.js -src/model/GetMessagesMessagesInner.js -src/model/GetTemplates.js -src/model/GetTemplatesTemplatesInner.js -src/model/MeComponents.js -src/model/MediaId.js -src/model/Message.js -src/model/MessageIdProp.js -src/model/PhoneProp.js -src/model/ReadMessageRequest.js -src/model/RemoveTemplateRequest.js -src/model/SendContactRequest.js -src/model/SendFileRequest.js -src/model/SendListRequest.js -src/model/SendListRequestAllOfRows.js -src/model/SendListRequestAllOfSections.js -src/model/SendLocationRequest.js -src/model/SendMessageRequest.js -src/model/SendMessageStatus.js -src/model/SendProductRequest.js -src/model/SendProductRequestAllOfAction.js -src/model/SendProductRequestAllOfActionProductItems.js -src/model/SendProductRequestAllOfActionSections.js -src/model/SendTemplateRequest.js -src/model/SendTemplateRequestAllOfCurrency.js -src/model/SendTemplateRequestAllOfDateTime.js -src/model/SendTemplateRequestAllOfDateTimeComponent.js -src/model/SendTemplateRequestAllOfDateTimeUnixEpoch.js -src/model/SendTemplateRequestAllOfLanguage.js -src/model/SendTemplateRequestAllOfParams.js -src/model/SetCommerce.js -src/model/SetMe.js -src/model/SetMeRequest.js -src/model/SetSettings200Response.js -src/model/SetSettings200ResponseAllOfUpdate.js -src/model/SetWebhookStatus.js -src/model/Settings.js -src/model/TemplateCategoryProp.js -src/model/TemplateComponentsProp.js -src/model/TemplateComponentsPropInner.js -src/model/TemplateComponentsPropInnerButtonsInner.js -src/model/TemplateLanguageProp.js -src/model/TemplateNamespaceField.js -src/model/UploadMedia.js -src/model/WebhookUrl.js diff --git a/js/.openapi-generator/VERSION b/js/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/js/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/js/.travis.yml b/js/.travis.yml deleted file mode 100644 index 0968f7a..0000000 --- a/js/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -cache: npm -node_js: - - "6" - - "6.1" diff --git a/js/README.md b/js/README.md deleted file mode 100644 index 80c598d..0000000 --- a/js/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# one_msg_waba_sdk - -OneMsgWabaSdk - JavaScript client for one_msg_waba_sdk -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail -This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 2.39.5 -- Package version: 2.39.5 -- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen - -## Installation - -#### npm -install it via: - -```shell -npm install one_msg_waba_sdk --save -``` - - -##### Local development - -To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: - -```shell -npm install -``` - -Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: - -```shell -npm link -``` - -To use the link you just defined in your project, switch to the directory you want to use your one_msg_waba_sdk from, and run: - -```shell -npm link /path/to/ -``` - -Finally, you need to build the module: - -```shell -npm run build -``` - -### For browser - -The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following -the above steps with Node.js and installing browserify with `npm install -g browserify`, -perform the following (assuming *main.js* is your entry file): - -```shell -browserify main.js > bundle.js -``` - -Then include *bundle.js* in the HTML pages. - -### Webpack Configuration - -Using Webpack you may encounter the following error: "Module not found: Error: -Cannot resolve module", most certainly you should disable AMD loader. Add/merge -the following section to your webpack config: - -```javascript -module: { - rules: [ - { - parser: { - amd: false - } - } - ] -} -``` - -### Vite Configuration - -Using Vite you may encounter errors. You might need to add a babel plugin to your -`vite.config.js` -```javascript -import babel from 'vite-plugin-babel'; - -export default defineConfig({ - plugins: [babel()], -}) - -``` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following JS code: - -```javascript -import * as OneMsgWabaSdk from 'one_msg_waba_sdk' -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure path to your instance -defaultClient.basePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER/"; - -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = "YOUR_TOKEN_KEY_FOR_INSTANCE" - -let api = new OneMsgWabaSdk.ChannelApi() -api.getMe().then(data=>{ - console.log(data) -},err=>{ - console.error(err)}) - - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*OneMsgWabaSdk.ChannelApi* | [**getCommerce**](docs/ChannelApi.md#getCommerce) | **GET** /commerce | Get Commerce Settings -*OneMsgWabaSdk.ChannelApi* | [**getExtendedStatistics**](docs/ChannelApi.md#getExtendedStatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -*OneMsgWabaSdk.ChannelApi* | [**getMe**](docs/ChannelApi.md#getMe) | **GET** /me | Get Profile Info -*OneMsgWabaSdk.ChannelApi* | [**getSettings**](docs/ChannelApi.md#getSettings) | **GET** /settings | Get Settings -*OneMsgWabaSdk.ChannelApi* | [**getStatistics**](docs/ChannelApi.md#getStatistics) | **GET** /statistics | Get Channel statistics -*OneMsgWabaSdk.ChannelApi* | [**getStatus**](docs/ChannelApi.md#getStatus) | **GET** /status | Get Status -*OneMsgWabaSdk.ChannelApi* | [**outputIP**](docs/ChannelApi.md#outputIP) | **GET** /outputIP | Get channel server IP -*OneMsgWabaSdk.ChannelApi* | [**setMe**](docs/ChannelApi.md#setMe) | **POST** /me | Change user info -*OneMsgWabaSdk.ChannelApi* | [**setSettings**](docs/ChannelApi.md#setSettings) | **POST** /settings | Set settings -*OneMsgWabaSdk.MediaApi* | [**uploadMedia**](docs/MediaApi.md#uploadMedia) | **POST** /uploadMedia | Upload media & get mediaId -*OneMsgWabaSdk.MessagingApi* | [**messagesList**](docs/MessagingApi.md#messagesList) | **GET** /messages | Get messages list -*OneMsgWabaSdk.MessagingApi* | [**readMessage**](docs/MessagingApi.md#readMessage) | **POST** /readMessage | Mark message as read -*OneMsgWabaSdk.MessagingApi* | [**sendContact**](docs/MessagingApi.md#sendContact) | **POST** /sendContact | Send a Contact -*OneMsgWabaSdk.MessagingApi* | [**sendFile**](docs/MessagingApi.md#sendFile) | **POST** /sendFile | Send a File -*OneMsgWabaSdk.MessagingApi* | [**sendList**](docs/MessagingApi.md#sendList) | **POST** /sendList | Send List Message -*OneMsgWabaSdk.MessagingApi* | [**sendLocation**](docs/MessagingApi.md#sendLocation) | **POST** /sendLocation | Send a Location -*OneMsgWabaSdk.MessagingApi* | [**sendMessage**](docs/MessagingApi.md#sendMessage) | **POST** /sendMessage | Send a Message -*OneMsgWabaSdk.ProductsCatalogsApi* | [**sendProduct**](docs/ProductsCatalogsApi.md#sendProduct) | **POST** /sendProduct | Send a Product -*OneMsgWabaSdk.ProductsCatalogsApi* | [**setCommerce**](docs/ProductsCatalogsApi.md#setCommerce) | **POST** /commerce | Set Commerce Settings -*OneMsgWabaSdk.TemplatesApi* | [**addTemplate**](docs/TemplatesApi.md#addTemplate) | **POST** /addTemplate | Create template -*OneMsgWabaSdk.TemplatesApi* | [**removeTemplate**](docs/TemplatesApi.md#removeTemplate) | **POST** /removeTemplate | Remove template -*OneMsgWabaSdk.TemplatesApi* | [**sendTemplate**](docs/TemplatesApi.md#sendTemplate) | **POST** /sendTemplate | Send Template Message -*OneMsgWabaSdk.TemplatesApi* | [**templatesList**](docs/TemplatesApi.md#templatesList) | **GET** /templates | Get templates list -*OneMsgWabaSdk.WebhooksApi* | [**ackHookInfo**](docs/WebhooksApi.md#ackHookInfo) | **GET** /hookInfo | Check ACKs -*OneMsgWabaSdk.WebhooksApi* | [**setWebhook**](docs/WebhooksApi.md#setWebhook) | **POST** /webhook | Set webhook - - -## Documentation for Models - - - [OneMsgWabaSdk.Ack](docs/Ack.md) - - [OneMsgWabaSdk.AddTemplateRequest](docs/AddTemplateRequest.md) - - [OneMsgWabaSdk.ChannelExtendedStatistics](docs/ChannelExtendedStatistics.md) - - [OneMsgWabaSdk.ChannelExtendedStatisticsInner](docs/ChannelExtendedStatisticsInner.md) - - [OneMsgWabaSdk.ChannelStatistics](docs/ChannelStatistics.md) - - [OneMsgWabaSdk.ChannelStatus](docs/ChannelStatus.md) - - [OneMsgWabaSdk.ChatIdProp](docs/ChatIdProp.md) - - [OneMsgWabaSdk.Commerce](docs/Commerce.md) - - [OneMsgWabaSdk.CommerceParams](docs/CommerceParams.md) - - [OneMsgWabaSdk.Contacts](docs/Contacts.md) - - [OneMsgWabaSdk.ContactsContactsInner](docs/ContactsContactsInner.md) - - [OneMsgWabaSdk.ContactsRequest](docs/ContactsRequest.md) - - [OneMsgWabaSdk.GetAckInfo](docs/GetAckInfo.md) - - [OneMsgWabaSdk.GetAckInfoHooksInner](docs/GetAckInfoHooksInner.md) - - [OneMsgWabaSdk.GetCommerce](docs/GetCommerce.md) - - [OneMsgWabaSdk.GetCommerceInner](docs/GetCommerceInner.md) - - [OneMsgWabaSdk.GetIP](docs/GetIP.md) - - [OneMsgWabaSdk.GetMe](docs/GetMe.md) - - [OneMsgWabaSdk.GetMe401Response](docs/GetMe401Response.md) - - [OneMsgWabaSdk.GetMessages](docs/GetMessages.md) - - [OneMsgWabaSdk.GetMessagesMessagesInner](docs/GetMessagesMessagesInner.md) - - [OneMsgWabaSdk.GetTemplates](docs/GetTemplates.md) - - [OneMsgWabaSdk.GetTemplatesTemplatesInner](docs/GetTemplatesTemplatesInner.md) - - [OneMsgWabaSdk.MeComponents](docs/MeComponents.md) - - [OneMsgWabaSdk.MediaId](docs/MediaId.md) - - [OneMsgWabaSdk.Message](docs/Message.md) - - [OneMsgWabaSdk.MessageIdProp](docs/MessageIdProp.md) - - [OneMsgWabaSdk.PhoneProp](docs/PhoneProp.md) - - [OneMsgWabaSdk.ReadMessageRequest](docs/ReadMessageRequest.md) - - [OneMsgWabaSdk.RemoveTemplateRequest](docs/RemoveTemplateRequest.md) - - [OneMsgWabaSdk.SendContactRequest](docs/SendContactRequest.md) - - [OneMsgWabaSdk.SendFileRequest](docs/SendFileRequest.md) - - [OneMsgWabaSdk.SendListRequest](docs/SendListRequest.md) - - [OneMsgWabaSdk.SendListRequestAllOfRows](docs/SendListRequestAllOfRows.md) - - [OneMsgWabaSdk.SendListRequestAllOfSections](docs/SendListRequestAllOfSections.md) - - [OneMsgWabaSdk.SendLocationRequest](docs/SendLocationRequest.md) - - [OneMsgWabaSdk.SendMessageRequest](docs/SendMessageRequest.md) - - [OneMsgWabaSdk.SendMessageStatus](docs/SendMessageStatus.md) - - [OneMsgWabaSdk.SendProductRequest](docs/SendProductRequest.md) - - [OneMsgWabaSdk.SendProductRequestAllOfAction](docs/SendProductRequestAllOfAction.md) - - [OneMsgWabaSdk.SendProductRequestAllOfActionProductItems](docs/SendProductRequestAllOfActionProductItems.md) - - [OneMsgWabaSdk.SendProductRequestAllOfActionSections](docs/SendProductRequestAllOfActionSections.md) - - [OneMsgWabaSdk.SendTemplateRequest](docs/SendTemplateRequest.md) - - [OneMsgWabaSdk.SendTemplateRequestAllOfCurrency](docs/SendTemplateRequestAllOfCurrency.md) - - [OneMsgWabaSdk.SendTemplateRequestAllOfDateTime](docs/SendTemplateRequestAllOfDateTime.md) - - [OneMsgWabaSdk.SendTemplateRequestAllOfDateTimeComponent](docs/SendTemplateRequestAllOfDateTimeComponent.md) - - [OneMsgWabaSdk.SendTemplateRequestAllOfDateTimeUnixEpoch](docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md) - - [OneMsgWabaSdk.SendTemplateRequestAllOfLanguage](docs/SendTemplateRequestAllOfLanguage.md) - - [OneMsgWabaSdk.SendTemplateRequestAllOfParams](docs/SendTemplateRequestAllOfParams.md) - - [OneMsgWabaSdk.SetCommerce](docs/SetCommerce.md) - - [OneMsgWabaSdk.SetMe](docs/SetMe.md) - - [OneMsgWabaSdk.SetMeRequest](docs/SetMeRequest.md) - - [OneMsgWabaSdk.SetSettings200Response](docs/SetSettings200Response.md) - - [OneMsgWabaSdk.SetSettings200ResponseAllOfUpdate](docs/SetSettings200ResponseAllOfUpdate.md) - - [OneMsgWabaSdk.SetWebhookStatus](docs/SetWebhookStatus.md) - - [OneMsgWabaSdk.Settings](docs/Settings.md) - - [OneMsgWabaSdk.TemplateCategoryProp](docs/TemplateCategoryProp.md) - - [OneMsgWabaSdk.TemplateComponentsProp](docs/TemplateComponentsProp.md) - - [OneMsgWabaSdk.TemplateComponentsPropInner](docs/TemplateComponentsPropInner.md) - - [OneMsgWabaSdk.TemplateComponentsPropInnerButtonsInner](docs/TemplateComponentsPropInnerButtonsInner.md) - - [OneMsgWabaSdk.TemplateLanguageProp](docs/TemplateLanguageProp.md) - - [OneMsgWabaSdk.TemplateNamespaceField](docs/TemplateNamespaceField.md) - - [OneMsgWabaSdk.UploadMedia](docs/UploadMedia.md) - - [OneMsgWabaSdk.WebhookUrl](docs/WebhookUrl.md) - - -## Documentation for Authorization - - -Authentication schemes defined for the API: -### token - - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - diff --git a/js/docs/Ack.md b/js/docs/Ack.md deleted file mode 100644 index 182626c..0000000 --- a/js/docs/Ack.md +++ /dev/null @@ -1,24 +0,0 @@ -# OneMsgWabaSdk.Ack - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | unique id of message | [optional] -**chatId** | **String** | chat ID | [optional] -**status** | **String** | type of the message status | [optional] - - - -## Enum: StatusEnum - - -* `delivered` (value: `"delivered"`) - -* `viewed` (value: `"viewed"`) - -* `sent` (value: `"sent"`) - - - - diff --git a/js/docs/AddTemplateRequest.md b/js/docs/AddTemplateRequest.md deleted file mode 100644 index 411012f..0000000 --- a/js/docs/AddTemplateRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMsgWabaSdk.AddTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Name of template | [optional] -**category** | [**TemplateCategoryProp**](TemplateCategoryProp.md) | | [optional] -**components** | [**TemplateComponentsProp**](TemplateComponentsProp.md) | | [optional] -**language** | [**TemplateLanguageProp**](TemplateLanguageProp.md) | | [optional] - - diff --git a/js/docs/ChannelApi.md b/js/docs/ChannelApi.md deleted file mode 100644 index cfcc103..0000000 --- a/js/docs/ChannelApi.md +++ /dev/null @@ -1,445 +0,0 @@ -# OneMsgWabaSdk.ChannelApi - -All URIs are relative to *https://api.1msg.io/123* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getCommerce**](ChannelApi.md#getCommerce) | **GET** /commerce | Get Commerce Settings -[**getExtendedStatistics**](ChannelApi.md#getExtendedStatistics) | **GET** /extendedStatistics | Get Extended Channel statistics -[**getMe**](ChannelApi.md#getMe) | **GET** /me | Get Profile Info -[**getSettings**](ChannelApi.md#getSettings) | **GET** /settings | Get Settings -[**getStatistics**](ChannelApi.md#getStatistics) | **GET** /statistics | Get Channel statistics -[**getStatus**](ChannelApi.md#getStatus) | **GET** /status | Get Status -[**outputIP**](ChannelApi.md#outputIP) | **GET** /outputIP | Get channel server IP -[**setMe**](ChannelApi.md#setMe) | **POST** /me | Change user info -[**setSettings**](ChannelApi.md#setSettings) | **POST** /settings | Set settings - - - -## getCommerce - -> GetCommerce getCommerce() - -Get Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -apiInstance.getCommerce().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**GetCommerce**](GetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getExtendedStatistics - -> ChannelExtendedStatistics getExtendedStatistics() - -Get Extended Channel statistics - -Get channel usage extended statistics - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -apiInstance.getExtendedStatistics().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ChannelExtendedStatistics**](ChannelExtendedStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getMe - -> GetMe getMe() - -Get Profile Info - -Use this edge to retrieve your profile's About info - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -apiInstance.getMe().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**GetMe**](GetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getSettings - -> Settings getSettings() - -Get Settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -apiInstance.getSettings().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Settings**](Settings.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getStatistics - -> ChannelStatistics getStatistics(opts) - -Get Channel statistics - -Get channel usage statistics - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -let opts = { - 'date': 03.2022 // String | Month and year in format mm.YYYY. -}; -apiInstance.getStatistics(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **date** | **String**| Month and year in format mm.YYYY. | [optional] - -### Return type - -[**ChannelStatistics**](ChannelStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getStatus - -> ChannelStatus getStatus() - - Get Status - -Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -apiInstance.getStatus().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ChannelStatus**](ChannelStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## outputIP - -> GetIP outputIP() - -Get channel server IP - - - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -apiInstance.outputIP().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**GetIP**](GetIP.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## setMe - -> SetMe setMe(setMeRequest) - -Change user info - -Change user info - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -let setMeRequest = new OneMsgWabaSdk.SetMeRequest(); // SetMeRequest | -apiInstance.setMe(setMeRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **setMeRequest** | [**SetMeRequest**](SetMeRequest.md)| | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## setSettings - -> SetSettings200Response setSettings(settings) - -Set settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ChannelApi(); -let settings = new OneMsgWabaSdk.Settings(); // Settings | -apiInstance.setSettings(settings).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settings** | [**Settings**](Settings.md)| | - -### Return type - -[**SetSettings200Response**](SetSettings200Response.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/json, application/x-www-form-urlencoded -- **Accept**: application/json - diff --git a/js/docs/ChannelExtendedStatistics.md b/js/docs/ChannelExtendedStatistics.md deleted file mode 100644 index 4a8439f..0000000 --- a/js/docs/ChannelExtendedStatistics.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneMsgWabaSdk.ChannelExtendedStatistics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/js/docs/ChannelExtendedStatisticsInner.md b/js/docs/ChannelExtendedStatisticsInner.md deleted file mode 100644 index fde3403..0000000 --- a/js/docs/ChannelExtendedStatisticsInner.md +++ /dev/null @@ -1,21 +0,0 @@ -# OneMsgWabaSdk.ChannelExtendedStatisticsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**businessInitiatedPaidQuantity** | **Number** | | [optional] -**businessInitiatedPrice** | **Number** | | [optional] -**businessInitiatedQuantity** | **Number** | | [optional] -**freeEntryPoint** | **Number** | | [optional] -**freeQuantity** | **Number** | | [optional] -**freeTier** | **Number** | | [optional] -**paidQuantity** | **Number** | | [optional] -**periodDate** | **String** | | [optional] -**quantity** | **Number** | | [optional] -**totalPrice** | **Number** | | [optional] -**userInitiatedPaidQuantity** | **Number** | | [optional] -**userInitiatedPrice** | **Number** | | [optional] -**userInitiatedQuantity** | **Number** | | [optional] - - diff --git a/js/docs/ChannelStatistics.md b/js/docs/ChannelStatistics.md deleted file mode 100644 index ed6bff7..0000000 --- a/js/docs/ChannelStatistics.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.ChannelStatistics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date** | **String** | | [optional] -**templatesCost** | **Number** | | [optional] - - diff --git a/js/docs/ChannelStatus.md b/js/docs/ChannelStatus.md deleted file mode 100644 index 35dbe51..0000000 --- a/js/docs/ChannelStatus.md +++ /dev/null @@ -1,26 +0,0 @@ -# OneMsgWabaSdk.ChannelStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | channel Status | [optional] - - - -## Enum: StatusEnum - - -* `connected` (value: `"connected"`) - -* `connecting` (value: `"connecting"`) - -* `disconnected` (value: `"disconnected"`) - -* `uninitialized` (value: `"uninitialized"`) - -* `unregistered` (value: `"unregistered"`) - - - - diff --git a/js/docs/ChatIdProp.md b/js/docs/ChatIdProp.md deleted file mode 100644 index c6ba69d..0000000 --- a/js/docs/ChatIdProp.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.ChatIdProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] - - diff --git a/js/docs/Commerce.md b/js/docs/Commerce.md deleted file mode 100644 index e49828d..0000000 --- a/js/docs/Commerce.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.Commerce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**params** | [**CommerceParams**](CommerceParams.md) | | [optional] - - diff --git a/js/docs/CommerceParams.md b/js/docs/CommerceParams.md deleted file mode 100644 index 9f4c4c8..0000000 --- a/js/docs/CommerceParams.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.CommerceParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**isCartEnabled** | **Boolean** | | -**isCatalogVisible** | **Boolean** | | - - diff --git a/js/docs/Contacts.md b/js/docs/Contacts.md deleted file mode 100644 index d2eb2d3..0000000 --- a/js/docs/Contacts.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.Contacts - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contacts** | [**[ContactsContactsInner]**](ContactsContactsInner.md) | List of checked numbers | [optional] - - diff --git a/js/docs/ContactsContactsInner.md b/js/docs/ContactsContactsInner.md deleted file mode 100644 index 08db702..0000000 --- a/js/docs/ContactsContactsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.ContactsContactsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**input** | **String** | Sent value | [optional] -**status** | **String** | Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending | [optional] -**waId** | **String** | Formatted contact phone | [optional] - - diff --git a/js/docs/ContactsRequest.md b/js/docs/ContactsRequest.md deleted file mode 100644 index 015fe97..0000000 --- a/js/docs/ContactsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.ContactsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**blocking** | **String** | Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) | [optional] -**forceCheck** | **Boolean** | Using cache: *true* - ignore cache *false* - use cache (default) | [optional] -**contacts** | **[String]** | Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] | - - diff --git a/js/docs/GetAckInfo.md b/js/docs/GetAckInfo.md deleted file mode 100644 index b678706..0000000 --- a/js/docs/GetAckInfo.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.GetAckInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hooks** | [**[GetAckInfoHooksInner]**](GetAckInfoHooksInner.md) | | [optional] - - diff --git a/js/docs/GetAckInfoHooksInner.md b/js/docs/GetAckInfoHooksInner.md deleted file mode 100644 index 4f99ca6..0000000 --- a/js/docs/GetAckInfoHooksInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# OneMsgWabaSdk.GetAckInfoHooksInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**type** | **String** | | [optional] -**status** | **String** | | [optional] -**pricing** | **Object** | | [optional] -**timestamp** | **String** | | [optional] -**conversation** | **Object** | | [optional] -**recipientId** | **String** | | [optional] - - diff --git a/js/docs/GetCommerce.md b/js/docs/GetCommerce.md deleted file mode 100644 index a36f7a0..0000000 --- a/js/docs/GetCommerce.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneMsgWabaSdk.GetCommerce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/js/docs/GetCommerceInner.md b/js/docs/GetCommerceInner.md deleted file mode 100644 index edb13ee..0000000 --- a/js/docs/GetCommerceInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.GetCommerceInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**isCartEnabled** | **Boolean** | | [optional] -**isCatalogVisible** | **Boolean** | | [optional] - - diff --git a/js/docs/GetIP.md b/js/docs/GetIP.md deleted file mode 100644 index f25dd34..0000000 --- a/js/docs/GetIP.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.GetIP - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **String** | | [optional] - - diff --git a/js/docs/GetMe.md b/js/docs/GetMe.md deleted file mode 100644 index fc5903f..0000000 --- a/js/docs/GetMe.md +++ /dev/null @@ -1,56 +0,0 @@ -# OneMsgWabaSdk.GetMe - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **String** | Profile`s About section. | [optional] -**address** | **String** | Address of the business | [optional] -**description** | **String** | Description of the business. Max 256 characters | [optional] -**email** | **String** | Business email | [optional] -**phone** | **String** | Linked phone number | [optional] -**vertical** | **String** | Industry of the business | [optional] -**photo** | **String** | | [optional] - - - -## Enum: VerticalEnum - - -* `Automotive` (value: `"Automotive"`) - -* `Beauty, Spa and Salon` (value: `"Beauty, Spa and Salon"`) - -* `Clothing and Apparel` (value: `"Clothing and Apparel"`) - -* `Education` (value: `"Education"`) - -* `Entertainment` (value: `"Entertainment"`) - -* `Event Planning and Service` (value: `"Event Planning and Service"`) - -* `Finance and Banking` (value: `"Finance and Banking"`) - -* `Food and Grocery` (value: `"Food and Grocery"`) - -* `Public Service` (value: `"Public Service"`) - -* `Hotel and Lodging` (value: `"Hotel and Lodging"`) - -* `Medical and Health` (value: `"Medical and Health"`) - -* `Non-profit` (value: `"Non-profit"`) - -* `Professional Services` (value: `"Professional Services"`) - -* `Shopping and Retail` (value: `"Shopping and Retail"`) - -* `Travel and Transportation` (value: `"Travel and Transportation"`) - -* `Restaurant` (value: `"Restaurant"`) - -* `Other` (value: `"Other"`) - - - - diff --git a/js/docs/GetMe401Response.md b/js/docs/GetMe401Response.md deleted file mode 100644 index c58ab75..0000000 --- a/js/docs/GetMe401Response.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.GetMe401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **String** | | [optional] - - diff --git a/js/docs/GetMessages.md b/js/docs/GetMessages.md deleted file mode 100644 index c796f28..0000000 --- a/js/docs/GetMessages.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.GetMessages - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messages** | [**[GetMessagesMessagesInner]**](GetMessagesMessagesInner.md) | | [optional] - - diff --git a/js/docs/GetMessagesMessagesInner.md b/js/docs/GetMessagesMessagesInner.md deleted file mode 100644 index eadc33a..0000000 --- a/js/docs/GetMessagesMessagesInner.md +++ /dev/null @@ -1,23 +0,0 @@ -# OneMsgWabaSdk.GetMessagesMessagesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messageNumber** | **Number** | | [optional] -**id** | **String** | | [optional] -**body** | **String** | | [optional] -**fromMe** | **Boolean** | | [optional] -**self** | **Number** | | [optional] -**isForwarded** | **Number** | | [optional] -**author** | **String** | | [optional] -**time** | **Number** | | [optional] -**chatId** | **String** | | [optional] -**type** | **String** | | [optional] -**senderName** | **String** | | [optional] -**caption** | **String** | | [optional] -**quotedMsgId** | **String** | | [optional] -**metadata** | **Object** | | [optional] -**chatName** | **String** | | [optional] - - diff --git a/js/docs/GetTemplates.md b/js/docs/GetTemplates.md deleted file mode 100644 index 0627d20..0000000 --- a/js/docs/GetTemplates.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.GetTemplates - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **Number** | | [optional] -**templates** | [**[GetTemplatesTemplatesInner]**](GetTemplatesTemplatesInner.md) | | [optional] - - diff --git a/js/docs/GetTemplatesTemplatesInner.md b/js/docs/GetTemplatesTemplatesInner.md deleted file mode 100644 index 46779ef..0000000 --- a/js/docs/GetTemplatesTemplatesInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# OneMsgWabaSdk.GetTemplatesTemplatesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | [**TemplateCategoryProp**](TemplateCategoryProp.md) | | [optional] -**components** | [**TemplateComponentsProp**](TemplateComponentsProp.md) | | [optional] -**language** | [**TemplateLanguageProp**](TemplateLanguageProp.md) | | [optional] -**name** | **String** | | [optional] -**namespace** | **String** | Can be found by method /templates | [optional] -**rejectedReason** | **String** | | [optional] -**status** | **String** | | [optional] - - diff --git a/js/docs/MeComponents.md b/js/docs/MeComponents.md deleted file mode 100644 index 3345e9c..0000000 --- a/js/docs/MeComponents.md +++ /dev/null @@ -1,56 +0,0 @@ -# OneMsgWabaSdk.MeComponents - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **String** | Profile`s About section. | [optional] -**address** | **String** | Address of the business | [optional] -**description** | **String** | Description of the business. Max 256 characters | [optional] -**email** | **String** | Business email | [optional] -**phone** | **String** | Linked phone number | [optional] -**vertical** | **String** | Industry of the business | [optional] -**photo** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - - - -## Enum: VerticalEnum - - -* `Automotive` (value: `"Automotive"`) - -* `Beauty, Spa and Salon` (value: `"Beauty, Spa and Salon"`) - -* `Clothing and Apparel` (value: `"Clothing and Apparel"`) - -* `Education` (value: `"Education"`) - -* `Entertainment` (value: `"Entertainment"`) - -* `Event Planning and Service` (value: `"Event Planning and Service"`) - -* `Finance and Banking` (value: `"Finance and Banking"`) - -* `Food and Grocery` (value: `"Food and Grocery"`) - -* `Public Service` (value: `"Public Service"`) - -* `Hotel and Lodging` (value: `"Hotel and Lodging"`) - -* `Medical and Health` (value: `"Medical and Health"`) - -* `Non-profit` (value: `"Non-profit"`) - -* `Professional Services` (value: `"Professional Services"`) - -* `Shopping and Retail` (value: `"Shopping and Retail"`) - -* `Travel and Transportation` (value: `"Travel and Transportation"`) - -* `Restaurant` (value: `"Restaurant"`) - -* `Other` (value: `"Other"`) - - - - diff --git a/js/docs/MediaApi.md b/js/docs/MediaApi.md deleted file mode 100644 index a6d75a8..0000000 --- a/js/docs/MediaApi.md +++ /dev/null @@ -1,59 +0,0 @@ -# OneMsgWabaSdk.MediaApi - -All URIs are relative to *https://api.1msg.io/123* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**uploadMedia**](MediaApi.md#uploadMedia) | **POST** /uploadMedia | Upload media & get mediaId - - - -## uploadMedia - -> MediaId uploadMedia(uploadMedia) - -Upload media & get mediaId - -Upload media and get mediaId. Uploaded media can be sent in template - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MediaApi(); -let uploadMedia = new OneMsgWabaSdk.UploadMedia(); // UploadMedia | -apiInstance.uploadMedia(uploadMedia).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uploadMedia** | [**UploadMedia**](UploadMedia.md)| | - -### Return type - -[**MediaId**](MediaId.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - diff --git a/js/docs/MediaId.md b/js/docs/MediaId.md deleted file mode 100644 index c8431d1..0000000 --- a/js/docs/MediaId.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.MediaId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mediaId** | **String** | | [optional] - - diff --git a/js/docs/Message.md b/js/docs/Message.md deleted file mode 100644 index 027598d..0000000 --- a/js/docs/Message.md +++ /dev/null @@ -1,43 +0,0 @@ -# OneMsgWabaSdk.Message - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | unique id | [optional] -**body** | **String** | text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" | [optional] -**fromMe** | **Boolean** | true - outgoing, false - incoming | [optional] -**self** | **Number** | 1 - generated by api, 0 - generated by app | [optional] -**isForwarded** | **Boolean** | true - forwarded message, false - direct message | [optional] -**author** | **String** | Author ID of the message | [optional] -**time** | **Number** | send time, unix timestamp | [optional] -**chatId** | **String** | chat ID | [optional] -**type** | **String** | type of the message | [optional] -**senderName** | **String** | Sender name | [optional] -**caption** | **String** | File caption or filename | [optional] -**quotedMsgId** | **String** | ID of quoted message | [optional] - - - -## Enum: TypeEnum - - -* `chat` (value: `"chat"`) - -* `interactive` (value: `"interactive"`) - -* `image` (value: `"image"`) - -* `video` (value: `"video"`) - -* `document` (value: `"document"`) - -* `audio` (value: `"audio"`) - -* `sticker` (value: `"sticker"`) - -* `voice` (value: `"voice"`) - - - - diff --git a/js/docs/MessageIdProp.md b/js/docs/MessageIdProp.md deleted file mode 100644 index 2ef5332..0000000 --- a/js/docs/MessageIdProp.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.MessageIdProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messageId** | **String** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - - diff --git a/js/docs/MessagingApi.md b/js/docs/MessagingApi.md deleted file mode 100644 index 5f9a759..0000000 --- a/js/docs/MessagingApi.md +++ /dev/null @@ -1,383 +0,0 @@ -# OneMsgWabaSdk.MessagingApi - -All URIs are relative to *https://api.1msg.io/123* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**messagesList**](MessagingApi.md#messagesList) | **GET** /messages | Get messages list -[**readMessage**](MessagingApi.md#readMessage) | **POST** /readMessage | Mark message as read -[**sendContact**](MessagingApi.md#sendContact) | **POST** /sendContact | Send a Contact -[**sendFile**](MessagingApi.md#sendFile) | **POST** /sendFile | Send a File -[**sendList**](MessagingApi.md#sendList) | **POST** /sendList | Send List Message -[**sendLocation**](MessagingApi.md#sendLocation) | **POST** /sendLocation | Send a Location -[**sendMessage**](MessagingApi.md#sendMessage) | **POST** /sendMessage | Send a Message - - - -## messagesList - -> GetMessages messagesList(opts) - -Get messages list - - - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let opts = { - 'last': true, // Boolean | Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. - 'lastMessageNumber': 100, // Number | The lastMessageNumber parameter from the last response. Example: 100 - 'firstMessageNumber': 1, // Number | The firstMessageNumber parameter from the last response. Example: 1 - 'limit': 200, // Number | Sets length of the message list. Default 100. With value 0 returns all messages. - 'chatId': 556123122026@c.us, // String | Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us - 'minTime': 1665396610, // Number | Filter messages received after specified time. Example: 1665396610 - 'maxTime': 1665396610, // Number | Filter messages received before specified time. Example: 1665396610 - 'msgId': 0XzkmGNn4prUAQlzsHApGNRXQ0U // String | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U -}; -apiInstance.messagesList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **last** | **Boolean**| Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. | [optional] - **lastMessageNumber** | **Number**| The lastMessageNumber parameter from the last response. Example: 100 | [optional] - **firstMessageNumber** | **Number**| The firstMessageNumber parameter from the last response. Example: 1 | [optional] - **limit** | **Number**| Sets length of the message list. Default 100. With value 0 returns all messages. | [optional] - **chatId** | **String**| Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us | [optional] - **minTime** | **Number**| Filter messages received after specified time. Example: 1665396610 | [optional] - **maxTime** | **Number**| Filter messages received before specified time. Example: 1665396610 | [optional] - **msgId** | **String**| Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -### Return type - -[**GetMessages**](GetMessages.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## readMessage - -> SetMe readMessage(opts) - -Mark message as read - - - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let opts = { - 'readMessageRequest': new OneMsgWabaSdk.ReadMessageRequest() // ReadMessageRequest | -}; -apiInstance.readMessage(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **readMessageRequest** | [**ReadMessageRequest**](ReadMessageRequest.md)| | [optional] - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## sendContact - -> SendMessageStatus sendContact(sendContactRequest) - -Send a Contact - -Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let sendContactRequest = new OneMsgWabaSdk.SendContactRequest(); // SendContactRequest | -apiInstance.sendContact(sendContactRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendContactRequest** | [**SendContactRequest**](SendContactRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## sendFile - -> SendMessageStatus sendFile(sendFileRequest) - -Send a File - -Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let sendFileRequest = new OneMsgWabaSdk.SendFileRequest(); // SendFileRequest | -apiInstance.sendFile(sendFileRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendFileRequest** | [**SendFileRequest**](SendFileRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## sendList - -> SendMessageStatus sendList(sendListRequest) - -Send List Message - -Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let sendListRequest = new OneMsgWabaSdk.SendListRequest(); // SendListRequest | -apiInstance.sendList(sendListRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendListRequest** | [**SendListRequest**](SendListRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## sendLocation - -> SendMessageStatus sendLocation(sendLocationRequest) - -Send a Location - -Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let sendLocationRequest = new OneMsgWabaSdk.SendLocationRequest(); // SendLocationRequest | -apiInstance.sendLocation(sendLocationRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendLocationRequest** | [**SendLocationRequest**](SendLocationRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## sendMessage - -> SendMessageStatus sendMessage(sendMessageRequest) - -Send a Message - -Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.MessagingApi(); -let sendMessageRequest = new OneMsgWabaSdk.SendMessageRequest(); // SendMessageRequest | -apiInstance.sendMessage(sendMessageRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendMessageRequest** | [**SendMessageRequest**](SendMessageRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - diff --git a/js/docs/PhoneProp.md b/js/docs/PhoneProp.md deleted file mode 100644 index 25014b5..0000000 --- a/js/docs/PhoneProp.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.PhoneProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] - - diff --git a/js/docs/ProductsCatalogsApi.md b/js/docs/ProductsCatalogsApi.md deleted file mode 100644 index 6f1128b..0000000 --- a/js/docs/ProductsCatalogsApi.md +++ /dev/null @@ -1,110 +0,0 @@ -# OneMsgWabaSdk.ProductsCatalogsApi - -All URIs are relative to *https://api.1msg.io/123* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**sendProduct**](ProductsCatalogsApi.md#sendProduct) | **POST** /sendProduct | Send a Product -[**setCommerce**](ProductsCatalogsApi.md#setCommerce) | **POST** /commerce | Set Commerce Settings - - - -## sendProduct - -> SendMessageStatus sendProduct(sendProductRequest) - -Send a Product - -Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ProductsCatalogsApi(); -let sendProductRequest = new OneMsgWabaSdk.SendProductRequest(); // SendProductRequest | -apiInstance.sendProduct(sendProductRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendProductRequest** | [**SendProductRequest**](SendProductRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## setCommerce - -> SetCommerce setCommerce(commerce) - -Set Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.ProductsCatalogsApi(); -let commerce = new OneMsgWabaSdk.Commerce(); // Commerce | -apiInstance.setCommerce(commerce).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **commerce** | [**Commerce**](Commerce.md)| | - -### Return type - -[**SetCommerce**](SetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/json, application/x-www-form-urlencoded -- **Accept**: application/json - diff --git a/js/docs/ReadMessageRequest.md b/js/docs/ReadMessageRequest.md deleted file mode 100644 index 34b51aa..0000000 --- a/js/docs/ReadMessageRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.ReadMessageRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messageId** | **String** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - - diff --git a/js/docs/RemoveTemplateRequest.md b/js/docs/RemoveTemplateRequest.md deleted file mode 100644 index 592aec6..0000000 --- a/js/docs/RemoveTemplateRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.RemoveTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Template name | [optional] - - diff --git a/js/docs/SendContactRequest.md b/js/docs/SendContactRequest.md deleted file mode 100644 index 4c08fa7..0000000 --- a/js/docs/SendContactRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.SendContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**contacts** | **[Object]** | Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] | [optional] - - diff --git a/js/docs/SendFileRequest.md b/js/docs/SendFileRequest.md deleted file mode 100644 index 56e209b..0000000 --- a/js/docs/SendFileRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# OneMsgWabaSdk.SendFileRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | -**filename** | **String** | File name, for *example 1.jpg* or *hello.xlsx* | -**caption** | **String** | Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 | [optional] - - diff --git a/js/docs/SendListRequest.md b/js/docs/SendListRequest.md deleted file mode 100644 index 2079b4e..0000000 --- a/js/docs/SendListRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# OneMsgWabaSdk.SendListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **String** | Main message text | -**header** | **String** | Header will be located above message text | [optional] -**footer** | **String** | Footer will be placed under message text | [optional] -**action** | **String** | Action for open list | -**sections** | [**[SendListRequestAllOfSections]**](SendListRequestAllOfSections.md) | Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] | - - diff --git a/js/docs/SendListRequestAllOfRows.md b/js/docs/SendListRequestAllOfRows.md deleted file mode 100644 index b21131c..0000000 --- a/js/docs/SendListRequestAllOfRows.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.SendListRequestAllOfRows - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique id for option, up to 200 symbols | -**title** | **String** | Title of option, up to 24 symbols. | -**description** | **String** | Description of option, up to 72 symbols | [optional] - - diff --git a/js/docs/SendListRequestAllOfSections.md b/js/docs/SendListRequestAllOfSections.md deleted file mode 100644 index 96ff122..0000000 --- a/js/docs/SendListRequestAllOfSections.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.SendListRequestAllOfSections - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **String** | Title of section, up to 24 symbols. Required if there are more then 1 section | [optional] -**rows** | [**[SendListRequestAllOfRows]**](SendListRequestAllOfRows.md) | | - - diff --git a/js/docs/SendLocationRequest.md b/js/docs/SendLocationRequest.md deleted file mode 100644 index b617b74..0000000 --- a/js/docs/SendLocationRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneMsgWabaSdk.SendLocationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**lat** | **String** | Latitude of the location. Example: 45.018337 | -**lng** | **String** | Longitude of the location. Example: -73.968285 | -**address** | **String** | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 | [optional] -**name** | **String** | Name of the location. Example: Facebook HQ | [optional] - - diff --git a/js/docs/SendMessageRequest.md b/js/docs/SendMessageRequest.md deleted file mode 100644 index 3d914f0..0000000 --- a/js/docs/SendMessageRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.SendMessageRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **String** | Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 | - - diff --git a/js/docs/SendMessageStatus.md b/js/docs/SendMessageStatus.md deleted file mode 100644 index 880b8f2..0000000 --- a/js/docs/SendMessageStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMsgWabaSdk.SendMessageStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sent** | **Boolean** | | [optional] -**id** | **String** | unique message id | [optional] -**message** | **String** | Posting status message | [optional] -**description** | **String** | Result description | [optional] - - diff --git a/js/docs/SendProductRequest.md b/js/docs/SendProductRequest.md deleted file mode 100644 index c26e859..0000000 --- a/js/docs/SendProductRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneMsgWabaSdk.SendProductRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**action** | [**SendProductRequestAllOfAction**](SendProductRequestAllOfAction.md) | | -**body** | **String** | Text of message. Example: Some text. | [optional] -**footer** | **String** | Located under the message text. Example: Footer. | [optional] -**header** | **String** | Header of catalog. Example: Header. **Required when sending the catalog.** | [optional] - - diff --git a/js/docs/SendProductRequestAllOfAction.md b/js/docs/SendProductRequestAllOfAction.md deleted file mode 100644 index 714b8df..0000000 --- a/js/docs/SendProductRequestAllOfAction.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.SendProductRequestAllOfAction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**catalogId** | **String** | id of the catalog | [optional] -**productRetailerId** | **String** | id of the product | [optional] -**sections** | [**[SendProductRequestAllOfActionSections]**](SendProductRequestAllOfActionSections.md) | | [optional] - - diff --git a/js/docs/SendProductRequestAllOfActionProductItems.md b/js/docs/SendProductRequestAllOfActionProductItems.md deleted file mode 100644 index 4b2649e..0000000 --- a/js/docs/SendProductRequestAllOfActionProductItems.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.SendProductRequestAllOfActionProductItems - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**productRetailerId** | **String** | id of the product | [optional] - - diff --git a/js/docs/SendProductRequestAllOfActionSections.md b/js/docs/SendProductRequestAllOfActionSections.md deleted file mode 100644 index 00fcbde..0000000 --- a/js/docs/SendProductRequestAllOfActionSections.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.SendProductRequestAllOfActionSections - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **String** | Title of the section. Example: the-section-title | [optional] -**productItems** | [**[SendProductRequestAllOfActionProductItems]**](SendProductRequestAllOfActionProductItems.md) | | [optional] - - diff --git a/js/docs/SendTemplateRequest.md b/js/docs/SendTemplateRequest.md deleted file mode 100644 index f681e44..0000000 --- a/js/docs/SendTemplateRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | **String** | Can be found by method /templates | -**chatId** | **String** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **Number** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**template** | **String** | Name of template | -**language** | [**SendTemplateRequestAllOfLanguage**](SendTemplateRequestAllOfLanguage.md) | | -**params** | [**[SendTemplateRequestAllOfParams]**](SendTemplateRequestAllOfParams.md) | Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** | [optional] - - diff --git a/js/docs/SendTemplateRequestAllOfCurrency.md b/js/docs/SendTemplateRequestAllOfCurrency.md deleted file mode 100644 index c50c93e..0000000 --- a/js/docs/SendTemplateRequestAllOfCurrency.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequestAllOfCurrency - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currencyCode** | **String** | | [optional] -**amount1000** | **Number** | | [optional] - - diff --git a/js/docs/SendTemplateRequestAllOfDateTime.md b/js/docs/SendTemplateRequestAllOfDateTime.md deleted file mode 100644 index e5423db..0000000 --- a/js/docs/SendTemplateRequestAllOfDateTime.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequestAllOfDateTime - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | [**SendTemplateRequestAllOfDateTimeComponent**](SendTemplateRequestAllOfDateTimeComponent.md) | | [optional] -**unixEpoch** | [**SendTemplateRequestAllOfDateTimeUnixEpoch**](SendTemplateRequestAllOfDateTimeUnixEpoch.md) | | [optional] - - diff --git a/js/docs/SendTemplateRequestAllOfDateTimeComponent.md b/js/docs/SendTemplateRequestAllOfDateTimeComponent.md deleted file mode 100644 index 6477cd5..0000000 --- a/js/docs/SendTemplateRequestAllOfDateTimeComponent.md +++ /dev/null @@ -1,61 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequestAllOfDateTimeComponent - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dayOfWeek** | **String** | | [optional] -**year** | **Number** | | [optional] -**month** | **Number** | | [optional] -**dayOfMonth** | **Number** | | [optional] -**hour** | **Number** | | [optional] -**minute** | **Number** | | [optional] -**calendar** | **String** | | [optional] - - - -## Enum: DayOfWeekEnum - - -* `MONDAY` (value: `"MONDAY"`) - -* `TUESDAY` (value: `"TUESDAY"`) - -* `WEDNESDAY` (value: `"WEDNESDAY"`) - -* `THURSDAY` (value: `"THURSDAY"`) - -* `FRIDAY` (value: `"FRIDAY"`) - -* `SATURDAY` (value: `"SATURDAY"`) - -* `SUNDAY` (value: `"SUNDAY"`) - -* `1` (value: `"1"`) - -* `2` (value: `"2"`) - -* `3` (value: `"3"`) - -* `4` (value: `"4"`) - -* `5` (value: `"5"`) - -* `6` (value: `"6"`) - -* `7` (value: `"7"`) - - - - - -## Enum: CalendarEnum - - -* `GREGORIAN` (value: `"GREGORIAN"`) - -* `SOLAR_HIJRI` (value: `"SOLAR_HIJRI"`) - - - - diff --git a/js/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md b/js/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md deleted file mode 100644 index 5207d3d..0000000 --- a/js/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequestAllOfDateTimeUnixEpoch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **Number** | | [optional] - - diff --git a/js/docs/SendTemplateRequestAllOfLanguage.md b/js/docs/SendTemplateRequestAllOfLanguage.md deleted file mode 100644 index 8ec8179..0000000 --- a/js/docs/SendTemplateRequestAllOfLanguage.md +++ /dev/null @@ -1,19 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequestAllOfLanguage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**policy** | **String** | | [optional] -**code** | [**TemplateLanguageProp**](TemplateLanguageProp.md) | | [optional] - - - -## Enum: PolicyEnum - - -* `deterministic` (value: `"deterministic"`) - - - - diff --git a/js/docs/SendTemplateRequestAllOfParams.md b/js/docs/SendTemplateRequestAllOfParams.md deleted file mode 100644 index ea39462..0000000 --- a/js/docs/SendTemplateRequestAllOfParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneMsgWabaSdk.SendTemplateRequestAllOfParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_default** | **String** | | [optional] -**currency** | [**SendTemplateRequestAllOfCurrency**](SendTemplateRequestAllOfCurrency.md) | | [optional] -**dateTime** | [**SendTemplateRequestAllOfDateTime**](SendTemplateRequestAllOfDateTime.md) | | [optional] - - diff --git a/js/docs/SetCommerce.md b/js/docs/SetCommerce.md deleted file mode 100644 index c631d8a..0000000 --- a/js/docs/SetCommerce.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.SetCommerce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **Boolean** | | [optional] - - diff --git a/js/docs/SetMe.md b/js/docs/SetMe.md deleted file mode 100644 index cf1c407..0000000 --- a/js/docs/SetMe.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.SetMe - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **String** | | [optional] - - diff --git a/js/docs/SetMeRequest.md b/js/docs/SetMeRequest.md deleted file mode 100644 index 0f87df3..0000000 --- a/js/docs/SetMeRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# OneMsgWabaSdk.SetMeRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **String** | Profile`s About section. | [optional] -**address** | **String** | Address of the business | [optional] -**description** | **String** | Description of the business. Max 256 characters | [optional] -**email** | **String** | Business email | [optional] -**phone** | **String** | Linked phone number | [optional] -**vertical** | **String** | Industry of the business | [optional] -**photo** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - - - -## Enum: VerticalEnum - - -* `Automotive` (value: `"Automotive"`) - -* `Beauty, Spa and Salon` (value: `"Beauty, Spa and Salon"`) - -* `Clothing and Apparel` (value: `"Clothing and Apparel"`) - -* `Education` (value: `"Education"`) - -* `Entertainment` (value: `"Entertainment"`) - -* `Event Planning and Service` (value: `"Event Planning and Service"`) - -* `Finance and Banking` (value: `"Finance and Banking"`) - -* `Food and Grocery` (value: `"Food and Grocery"`) - -* `Public Service` (value: `"Public Service"`) - -* `Hotel and Lodging` (value: `"Hotel and Lodging"`) - -* `Medical and Health` (value: `"Medical and Health"`) - -* `Non-profit` (value: `"Non-profit"`) - -* `Professional Services` (value: `"Professional Services"`) - -* `Shopping and Retail` (value: `"Shopping and Retail"`) - -* `Travel and Transportation` (value: `"Travel and Transportation"`) - -* `Restaurant` (value: `"Restaurant"`) - -* `Other` (value: `"Other"`) - - - - diff --git a/js/docs/SetSettings200Response.md b/js/docs/SetSettings200Response.md deleted file mode 100644 index db261fe..0000000 --- a/js/docs/SetSettings200Response.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.SetSettings200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhookUrl** | **String** | | [optional] -**update** | [**SetSettings200ResponseAllOfUpdate**](SetSettings200ResponseAllOfUpdate.md) | | - - diff --git a/js/docs/SetSettings200ResponseAllOfUpdate.md b/js/docs/SetSettings200ResponseAllOfUpdate.md deleted file mode 100644 index e2c95e1..0000000 --- a/js/docs/SetSettings200ResponseAllOfUpdate.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.SetSettings200ResponseAllOfUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhookUrl** | **String** | | [optional] - - diff --git a/js/docs/SetWebhookStatus.md b/js/docs/SetWebhookStatus.md deleted file mode 100644 index af6a6a3..0000000 --- a/js/docs/SetWebhookStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneMsgWabaSdk.SetWebhookStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**set** | **Boolean** | Flag indicating that the current request has changed webhook | [optional] -**message** | **String** | | [optional] - - diff --git a/js/docs/Settings.md b/js/docs/Settings.md deleted file mode 100644 index f8a023f..0000000 --- a/js/docs/Settings.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.Settings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhookUrl** | **String** | | [optional] - - diff --git a/js/docs/TemplateCategoryProp.md b/js/docs/TemplateCategoryProp.md deleted file mode 100644 index 25efb11..0000000 --- a/js/docs/TemplateCategoryProp.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneMsgWabaSdk.TemplateCategoryProp - -## Enum - - -* `MARKETING` (value: `"MARKETING"`) - -* `TRANSACTIONAL` (value: `"TRANSACTIONAL"`) - -* `OTP` (value: `"OTP"`) - - diff --git a/js/docs/TemplateComponentsProp.md b/js/docs/TemplateComponentsProp.md deleted file mode 100644 index 980a428..0000000 --- a/js/docs/TemplateComponentsProp.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneMsgWabaSdk.TemplateComponentsProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/js/docs/TemplateComponentsPropInner.md b/js/docs/TemplateComponentsPropInner.md deleted file mode 100644 index 5fafa30..0000000 --- a/js/docs/TemplateComponentsPropInner.md +++ /dev/null @@ -1,43 +0,0 @@ -# OneMsgWabaSdk.TemplateComponentsPropInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**format** | **String** | Only for HEADER type | [optional] -**text** | **String** | | [optional] -**example** | **Object** | | [optional] -**buttons** | [**[TemplateComponentsPropInnerButtonsInner]**](TemplateComponentsPropInnerButtonsInner.md) | | [optional] - - - -## Enum: TypeEnum - - -* `BODY` (value: `"BODY"`) - -* `HEADER` (value: `"HEADER"`) - -* `FOOTER` (value: `"FOOTER"`) - -* `BUTTONS` (value: `"BUTTONS"`) - - - - - -## Enum: FormatEnum - - -* `TEXT` (value: `"TEXT"`) - -* `IMAGE` (value: `"IMAGE"`) - -* `DOCUMENT` (value: `"DOCUMENT"`) - -* `VIDEO` (value: `"VIDEO"`) - - - - diff --git a/js/docs/TemplateComponentsPropInnerButtonsInner.md b/js/docs/TemplateComponentsPropInnerButtonsInner.md deleted file mode 100644 index 6c6be3d..0000000 --- a/js/docs/TemplateComponentsPropInnerButtonsInner.md +++ /dev/null @@ -1,26 +0,0 @@ -# OneMsgWabaSdk.TemplateComponentsPropInnerButtonsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**text** | **String** | | [optional] -**url** | **String** | | [optional] -**phoneNumber** | **String** | | [optional] -**example** | **[Object]** | | [optional] - - - -## Enum: TypeEnum - - -* `PHONE_NUMBER` (value: `"PHONE_NUMBER"`) - -* `URL` (value: `"URL"`) - -* `QUICK_REPLY` (value: `"QUICK_REPLY"`) - - - - diff --git a/js/docs/TemplateLanguageProp.md b/js/docs/TemplateLanguageProp.md deleted file mode 100644 index c0b4a63..0000000 --- a/js/docs/TemplateLanguageProp.md +++ /dev/null @@ -1,136 +0,0 @@ -# OneMsgWabaSdk.TemplateLanguageProp - -## Enum - - -* `af` (value: `"af"`) - -* `sq` (value: `"sq"`) - -* `ar` (value: `"ar"`) - -* `az` (value: `"az"`) - -* `bn` (value: `"bn"`) - -* `bg` (value: `"bg"`) - -* `ca` (value: `"ca"`) - -* `zh_CN` (value: `"zh_CN"`) - -* `zh_HK` (value: `"zh_HK"`) - -* `zh_TW` (value: `"zh_TW"`) - -* `hr` (value: `"hr"`) - -* `cs` (value: `"cs"`) - -* `da` (value: `"da"`) - -* `nl` (value: `"nl"`) - -* `en` (value: `"en"`) - -* `en_GB` (value: `"en_GB"`) - -* `en_US` (value: `"en_US"`) - -* `et` (value: `"et"`) - -* `fil` (value: `"fil"`) - -* `fi` (value: `"fi"`) - -* `fr` (value: `"fr"`) - -* `de` (value: `"de"`) - -* `el` (value: `"el"`) - -* `gu` (value: `"gu"`) - -* `he` (value: `"he"`) - -* `hi` (value: `"hi"`) - -* `hu` (value: `"hu"`) - -* `id` (value: `"id"`) - -* `ga` (value: `"ga"`) - -* `it` (value: `"it"`) - -* `ja` (value: `"ja"`) - -* `kn` (value: `"kn"`) - -* `kk` (value: `"kk"`) - -* `ko` (value: `"ko"`) - -* `lo` (value: `"lo"`) - -* `lv` (value: `"lv"`) - -* `lt` (value: `"lt"`) - -* `mk` (value: `"mk"`) - -* `ms` (value: `"ms"`) - -* `mr` (value: `"mr"`) - -* `nb` (value: `"nb"`) - -* `fa` (value: `"fa"`) - -* `pl` (value: `"pl"`) - -* `pt_BR` (value: `"pt_BR"`) - -* `pt_PT` (value: `"pt_PT"`) - -* `pa` (value: `"pa"`) - -* `ro` (value: `"ro"`) - -* `ru` (value: `"ru"`) - -* `sr` (value: `"sr"`) - -* `sk` (value: `"sk"`) - -* `sl` (value: `"sl"`) - -* `es` (value: `"es"`) - -* `es_AR` (value: `"es_AR"`) - -* `es_ES` (value: `"es_ES"`) - -* `es_MX` (value: `"es_MX"`) - -* `sw` (value: `"sw"`) - -* `sv` (value: `"sv"`) - -* `ta` (value: `"ta"`) - -* `te` (value: `"te"`) - -* `th` (value: `"th"`) - -* `tr` (value: `"tr"`) - -* `uk` (value: `"uk"`) - -* `ur` (value: `"ur"`) - -* `uz` (value: `"uz"`) - -* `vi` (value: `"vi"`) - - diff --git a/js/docs/TemplateNamespaceField.md b/js/docs/TemplateNamespaceField.md deleted file mode 100644 index a0588f2..0000000 --- a/js/docs/TemplateNamespaceField.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.TemplateNamespaceField - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | **String** | | [optional] - - diff --git a/js/docs/TemplatesApi.md b/js/docs/TemplatesApi.md deleted file mode 100644 index 15c411e..0000000 --- a/js/docs/TemplatesApi.md +++ /dev/null @@ -1,208 +0,0 @@ -# OneMsgWabaSdk.TemplatesApi - -All URIs are relative to *https://api.1msg.io/123* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addTemplate**](TemplatesApi.md#addTemplate) | **POST** /addTemplate | Create template -[**removeTemplate**](TemplatesApi.md#removeTemplate) | **POST** /removeTemplate | Remove template -[**sendTemplate**](TemplatesApi.md#sendTemplate) | **POST** /sendTemplate | Send Template Message -[**templatesList**](TemplatesApi.md#templatesList) | **GET** /templates | Get templates list - - - -## addTemplate - -> Object addTemplate(addTemplateRequest) - -Create template - -Create new template for sending. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.TemplatesApi(); -let addTemplateRequest = new OneMsgWabaSdk.AddTemplateRequest(); // AddTemplateRequest | -apiInstance.addTemplate(addTemplateRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **addTemplateRequest** | [**AddTemplateRequest**](AddTemplateRequest.md)| | - -### Return type - -**Object** - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## removeTemplate - -> SetMe removeTemplate(removeTemplateRequest) - -Remove template - -Deleted template can not be restored. - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.TemplatesApi(); -let removeTemplateRequest = new OneMsgWabaSdk.RemoveTemplateRequest(); // RemoveTemplateRequest | -apiInstance.removeTemplate(removeTemplateRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **removeTemplateRequest** | [**RemoveTemplateRequest**](RemoveTemplateRequest.md)| | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## sendTemplate - -> SendMessageStatus sendTemplate(sendTemplateRequest) - -Send Template Message - -Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.TemplatesApi(); -let sendTemplateRequest = new OneMsgWabaSdk.SendTemplateRequest(); // SendTemplateRequest | -apiInstance.sendTemplate(sendTemplateRequest).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendTemplateRequest** | [**SendTemplateRequest**](SendTemplateRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - - -## templatesList - -> GetTemplates templatesList() - -Get templates list - - - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.TemplatesApi(); -apiInstance.templatesList().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**GetTemplates**](GetTemplates.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/js/docs/UploadMedia.md b/js/docs/UploadMedia.md deleted file mode 100644 index 3621815..0000000 --- a/js/docs/UploadMedia.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.UploadMedia - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | **String** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | - - diff --git a/js/docs/WebhookUrl.md b/js/docs/WebhookUrl.md deleted file mode 100644 index 1b2c294..0000000 --- a/js/docs/WebhookUrl.md +++ /dev/null @@ -1,9 +0,0 @@ -# OneMsgWabaSdk.WebhookUrl - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhookUrl** | **String** | Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). | - - diff --git a/js/docs/WebhooksApi.md b/js/docs/WebhooksApi.md deleted file mode 100644 index 30008df..0000000 --- a/js/docs/WebhooksApi.md +++ /dev/null @@ -1,110 +0,0 @@ -# OneMsgWabaSdk.WebhooksApi - -All URIs are relative to *https://api.1msg.io/123* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ackHookInfo**](WebhooksApi.md#ackHookInfo) | **GET** /hookInfo | Check ACKs -[**setWebhook**](WebhooksApi.md#setWebhook) | **POST** /webhook | Set webhook - - - -## ackHookInfo - -> GetAckInfo ackHookInfo(messageId) - -Check ACKs - - - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.WebhooksApi(); -let messageId = 0XzkmGNn4prUAQlzsHApGNRXQ0U; // String | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U -apiInstance.ackHookInfo(messageId).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **messageId** | **String**| Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | - -### Return type - -[**GetAckInfo**](GetAckInfo.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## setWebhook - -> SetWebhookStatus setWebhook(webhookUrl) - -Set webhook - -Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - -### Example - -```javascript -import OneMsgWabaSdk from 'one_msg_waba_sdk'; -let defaultClient = OneMsgWabaSdk.ApiClient.instance; -// Configure API key authorization: token -let token = defaultClient.authentications['token']; -token.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//token.apiKeyPrefix = 'Token'; - -let apiInstance = new OneMsgWabaSdk.WebhooksApi(); -let webhookUrl = new OneMsgWabaSdk.WebhookUrl(); // WebhookUrl | -apiInstance.setWebhook(webhookUrl).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **webhookUrl** | [**WebhookUrl**](WebhookUrl.md)| | - -### Return type - -[**SetWebhookStatus**](SetWebhookStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded, application/json -- **Accept**: application/json - diff --git a/js/git_push.sh b/js/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/js/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/js/mocha.opts b/js/mocha.opts deleted file mode 100644 index 9070118..0000000 --- a/js/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---timeout 10000 diff --git a/js/package.json b/js/package.json deleted file mode 100644 index 1e146cc..0000000 --- a/js/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "one_msg_waba_sdk", - "version": "2.39.5", - "description": "[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail", - "license": "Unlicense", - "main": "dist/index.js", - "scripts": { - "build": "babel src -d dist", - "prepare": "npm run build", - "test": "mocha --require @babel/register --recursive" - }, - "browser": { - "fs": false - }, - "dependencies": { - "@babel/cli": "^7.0.0", - "superagent": "^5.3.0" - }, - "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.0.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-export-namespace-from": "^7.0.0", - "@babel/plugin-proposal-function-bind": "^7.0.0", - "@babel/plugin-proposal-function-sent": "^7.0.0", - "@babel/plugin-proposal-json-strings": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-proposal-pipeline-operator": "^7.0.0", - "@babel/plugin-proposal-throw-expressions": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-import-meta": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/register": "^7.0.0", - "expect.js": "^0.3.1", - "mocha": "^8.0.1", - "sinon": "^7.2.0" - }, - "files": [ - "dist" - ] -} diff --git a/js/src/ApiClient.js b/js/src/ApiClient.js deleted file mode 100644 index 6cd7539..0000000 --- a/js/src/ApiClient.js +++ /dev/null @@ -1,707 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import superagent from "superagent"; -import querystring from "querystring"; - -/** -* @module ApiClient -* @version 2.39.0 -*/ - -/** -* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an -* application to use this class directly - the *Api and model classes provide the public API for the service. The -* contents of this file should be regarded as internal but are documented for completeness. -* @alias module:ApiClient -* @class -*/ -class ApiClient { - /** - * The base URL against which to resolve every API call's (relative) path. - * Overrides the default value set in spec file if present - * @param {String} basePath - */ - constructor(basePath = 'https://api.1msg.io/123') { - /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default https://api.1msg.io/123 - */ - this.basePath = basePath.replace(/\/+$/, ''); - - /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ - this.authentications = { - 'token': {type: 'apiKey', 'in': 'query', name: 'token'} - } - - /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ - this.defaultHeaders = { - 'User-Agent': 'OpenAPI-Generator/2.39.0/Javascript' - }; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - - /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ - this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new superagent.agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - /* - * Allow user to add superagent plugins - */ - this.plugins = null; - - } - - /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ - paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - if (ApiClient.canBeJsonified(param)) { - return JSON.stringify(param); - } - - return param.toString(); - } - - /** - * Returns a boolean indicating if the parameter could be JSON.stringified - * @param param The actual parameter - * @returns {Boolean} Flag indicating if param can be JSON.stringified - */ - static canBeJsonified(str) { - if (typeof str !== 'string' && typeof str !== 'object') return false; - try { - const type = str.toString(); - return type === '[object Object]' - || type === '[object Array]'; - } catch (err) { - return false; - } - }; - - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @param {String} apiBasePath Base path defined in the path, operation level to override the default one - * @returns {String} The encoded path with parameter values substituted. - */ - buildUrl(path, pathParams, apiBasePath) { - if (!path.match(/^\//)) { - path = '/' + path; - } - - var url = this.basePath + path; - - // use API (operation, path) base path if defined - if (apiBasePath !== null && apiBasePath !== undefined) { - url = apiBasePath + path; - } - - url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => { - var value; - if (pathParams.hasOwnProperty(key)) { - value = this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - - return encodeURIComponent(value); - }); - - return url; - } - - /** - * Checks whether the given content type represents JSON.
- * JSON content type examples:
- *
    - *
  • application/json
  • - *
  • application/json; charset=UTF8
  • - *
  • APPLICATION/JSON
  • - *
- * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ - isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ - jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - - return contentTypes[0]; - } - - /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ - isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - let fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - - return false; - } - - /** - * Normalizes parameter values: - *
    - *
  • remove nils
  • - *
  • keep files and arrays
  • - *
  • format to string with `paramToString` for other cases
  • - *
- * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ - normalizeParams(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - - return newParams; - } - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ - buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString, this).join(','); - case 'ssv': - return param.map(this.paramToString, this).join(' '); - case 'tsv': - return param.map(this.paramToString, this).join('\t'); - case 'pipes': - return param.map(this.paramToString, this).join('|'); - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString, this); - case 'passthrough': - return param; - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ - applyAuthToRequest(request, authNames) { - authNames.forEach((authName) => { - var auth = this.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - - break; - case 'bearer': - if (auth.accessToken) { - var localVarBearerToken = typeof auth.accessToken === 'function' - ? auth.accessToken() - : auth.accessToken - request.set({'Authorization': 'Bearer ' + localVarBearerToken}); - } - - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - - break; - case 'oauth2': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ - deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - - return ApiClient.convertToType(data, returnType); - } - - - /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one - * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. - */ - callApi(path, httpMethod, pathParams, - queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, apiBasePath) { - - var url = this.buildUrl(path, pathParams, apiBasePath); - var request = superagent(httpMethod, url); - - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]) - } - } - } - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if(contentType != 'multipart/form-data') { - request.type(contentType); - } - } - - if (contentType === 'application/x-www-form-urlencoded') { - request.send(querystring.stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - let _formParamsValue = _formParams[key]; - if (this.isFileParam(_formParamsValue)) { - // file field - request.attach(key, _formParamsValue); - } else if (Array.isArray(_formParamsValue) && _formParamsValue.length - && this.isFileParam(_formParamsValue[0])) { - // multiple files - _formParamsValue.forEach(file => request.attach(key, file)); - } else { - request.field(key, _formParamsValue); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - if (!request.header['Content-Type']) { - request.type('application/json'); - } - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('text'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies){ - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } - else { - request.withCredentials(); - } - } - - return new Promise((resolve, reject) => { - request.end((error, response) => { - if (error) { - var err = {}; - if (response) { - err.status = response.status; - err.statusText = response.statusText; - err.body = response.body; - err.response = response; - } - err.error = error; - - reject(err); - } else { - try { - var data = this.deserialize(response, returnType); - if (this.enableCookies && typeof window === 'undefined'){ - this.agent._saveCookies(response); - } - - resolve({data, response}); - } catch (err) { - reject(err); - } - } - }); - }); - - } - - /** - * Parses an ISO-8601 string representation or epoch representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ - static parseDate(str) { - if (isNaN(str)) { - return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); - } - return new Date(+str); - } - - /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ - static convertToType(data, type) { - if (data === null || data === undefined) - return data - - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return ApiClient.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User and enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - - return data.map((item) => { - return ApiClient.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - } - - /** - * Gets an array of host settings - * @returns An array of host settings - */ - hostSettings() { - return [ - { - 'url': "{protocol}://api.1msg.io/{channelId}", - 'description': "New common server url", - 'variables': { - channelId: { - 'description': "Your channel number", - 'default_value': "123", - }, - protocol: { - 'description': "No description provided", - 'default_value': "https", - 'enum_values': [ - "http", - "https" - ] - } - } - } - ]; - } - - getBasePathFromSettings(index, variables={}) { - var servers = this.hostSettings(); - - // check array index out of bound - if (index < 0 || index >= servers.length) { - throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); - } - - var server = servers[index]; - var url = server['url']; - - // go through variable and assign a value - for (var variable_name in server['variables']) { - if (variable_name in variables) { - let variable = server['variables'][variable_name]; - if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) { - url = url.replace("{" + variable_name + "}", variables[variable_name]); - } else { - throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); - } - } else { - // use default value - url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']) - } - } - return url; - } - - /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ - static constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) - obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) - obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - }; -} - -/** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ -ApiClient.CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' -}; - -/** -* The default API client implementation. -* @type {module:ApiClient} -*/ -ApiClient.instance = new ApiClient(); -export default ApiClient; diff --git a/js/src/api/ChannelApi.js b/js/src/api/ChannelApi.js deleted file mode 100644 index 1026670..0000000 --- a/js/src/api/ChannelApi.js +++ /dev/null @@ -1,435 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import ChannelExtendedStatistics from '../model/ChannelExtendedStatistics'; -import ChannelStatistics from '../model/ChannelStatistics'; -import ChannelStatus from '../model/ChannelStatus'; -import GetCommerce from '../model/GetCommerce'; -import GetIP from '../model/GetIP'; -import GetMe from '../model/GetMe'; -import GetMe401Response from '../model/GetMe401Response'; -import SetMe from '../model/SetMe'; -import SetMeRequest from '../model/SetMeRequest'; -import SetSettings200Response from '../model/SetSettings200Response'; -import Settings from '../model/Settings'; - -/** -* Channel service. -* @module api/ChannelApi -* @version 2.39.0 -*/ -export default class ChannelApi { - - /** - * Constructs a new ChannelApi. - * @alias module:api/ChannelApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Get Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetCommerce} and HTTP response - */ - getCommerceWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetCommerce; - return this.apiClient.callApi( - '/commerce', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetCommerce} - */ - getCommerce() { - return this.getCommerceWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get Extended Channel statistics - * Get channel usage extended statistics - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChannelExtendedStatistics} and HTTP response - */ - getExtendedStatisticsWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ChannelExtendedStatistics; - return this.apiClient.callApi( - '/extendedStatistics', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Extended Channel statistics - * Get channel usage extended statistics - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChannelExtendedStatistics} - */ - getExtendedStatistics() { - return this.getExtendedStatisticsWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get Profile Info - * Use this edge to retrieve your profile's About info - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetMe} and HTTP response - */ - getMeWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetMe; - return this.apiClient.callApi( - '/me', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Profile Info - * Use this edge to retrieve your profile's About info - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetMe} - */ - getMe() { - return this.getMeWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get Settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Settings} and HTTP response - */ - getSettingsWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Settings; - return this.apiClient.callApi( - '/settings', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Settings} - */ - getSettings() { - return this.getSettingsWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get Channel statistics - * Get channel usage statistics - * @param {Object} opts Optional parameters - * @param {String} [date] Month and year in format mm.YYYY. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChannelStatistics} and HTTP response - */ - getStatisticsWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'date': opts['date'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ChannelStatistics; - return this.apiClient.callApi( - '/statistics', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Channel statistics - * Get channel usage statistics - * @param {Object} opts Optional parameters - * @param {String} opts.date Month and year in format mm.YYYY. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChannelStatistics} - */ - getStatistics(opts) { - return this.getStatisticsWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get Status - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChannelStatus} and HTTP response - */ - getStatusWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ChannelStatus; - return this.apiClient.callApi( - '/status', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Status - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChannelStatus} - */ - getStatus() { - return this.getStatusWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get channel server IP - * - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetIP} and HTTP response - */ - outputIPWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetIP; - return this.apiClient.callApi( - '/outputIP', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get channel server IP - * - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetIP} - */ - outputIP() { - return this.outputIPWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Change user info - * Change user info - * @param {module:model/SetMeRequest} setMeRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SetMe} and HTTP response - */ - setMeWithHttpInfo(setMeRequest) { - let postBody = setMeRequest; - // verify the required parameter 'setMeRequest' is set - if (setMeRequest === undefined || setMeRequest === null) { - throw new Error("Missing the required parameter 'setMeRequest' when calling setMe"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SetMe; - return this.apiClient.callApi( - '/me', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Change user info - * Change user info - * @param {module:model/SetMeRequest} setMeRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SetMe} - */ - setMe(setMeRequest) { - return this.setMeWithHttpInfo(setMeRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Set settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @param {module:model/Settings} settings - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SetSettings200Response} and HTTP response - */ - setSettingsWithHttpInfo(settings) { - let postBody = settings; - // verify the required parameter 'settings' is set - if (settings === undefined || settings === null) { - throw new Error("Missing the required parameter 'settings' when calling setSettings"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; - let accepts = ['application/json']; - let returnType = SetSettings200Response; - return this.apiClient.callApi( - '/settings', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Set settings - * **webhookUrl** - Http or https URL for receiving notifications. - * @param {module:model/Settings} settings - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SetSettings200Response} - */ - setSettings(settings) { - return this.setSettingsWithHttpInfo(settings) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/js/src/api/MediaApi.js b/js/src/api/MediaApi.js deleted file mode 100644 index 95439a2..0000000 --- a/js/src/api/MediaApi.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import MediaId from '../model/MediaId'; -import UploadMedia from '../model/UploadMedia'; - -/** -* Media service. -* @module api/MediaApi -* @version 2.39.0 -*/ -export default class MediaApi { - - /** - * Constructs a new MediaApi. - * @alias module:api/MediaApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Upload media & get mediaId - * Upload media and get mediaId. Uploaded media can be sent in template - * @param {module:model/UploadMedia} uploadMedia - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MediaId} and HTTP response - */ - uploadMediaWithHttpInfo(uploadMedia) { - let postBody = uploadMedia; - // verify the required parameter 'uploadMedia' is set - if (uploadMedia === undefined || uploadMedia === null) { - throw new Error("Missing the required parameter 'uploadMedia' when calling uploadMedia"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = MediaId; - return this.apiClient.callApi( - '/uploadMedia', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Upload media & get mediaId - * Upload media and get mediaId. Uploaded media can be sent in template - * @param {module:model/UploadMedia} uploadMedia - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MediaId} - */ - uploadMedia(uploadMedia) { - return this.uploadMediaWithHttpInfo(uploadMedia) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/js/src/api/MessagingApi.js b/js/src/api/MessagingApi.js deleted file mode 100644 index 7230a97..0000000 --- a/js/src/api/MessagingApi.js +++ /dev/null @@ -1,396 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import GetMe401Response from '../model/GetMe401Response'; -import GetMessages from '../model/GetMessages'; -import ReadMessageRequest from '../model/ReadMessageRequest'; -import SendContactRequest from '../model/SendContactRequest'; -import SendFileRequest from '../model/SendFileRequest'; -import SendListRequest from '../model/SendListRequest'; -import SendLocationRequest from '../model/SendLocationRequest'; -import SendMessageRequest from '../model/SendMessageRequest'; -import SendMessageStatus from '../model/SendMessageStatus'; -import SetMe from '../model/SetMe'; - -/** -* Messaging service. -* @module api/MessagingApi -* @version 2.39.0 -*/ -export default class MessagingApi { - - /** - * Constructs a new MessagingApi. - * @alias module:api/MessagingApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Get messages list - * - * @param {Object} opts Optional parameters - * @param {Boolean} [last] Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. - * @param {Number} [lastMessageNumber] The lastMessageNumber parameter from the last response. Example: 100 - * @param {Number} [firstMessageNumber] The firstMessageNumber parameter from the last response. Example: 1 - * @param {Number} [limit] Sets length of the message list. Default 100. With value 0 returns all messages. - * @param {String} [chatId] Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us - * @param {Number} [minTime] Filter messages received after specified time. Example: 1665396610 - * @param {Number} [maxTime] Filter messages received before specified time. Example: 1665396610 - * @param {String} [msgId] Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetMessages} and HTTP response - */ - messagesListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'last': opts['last'], - 'lastMessageNumber': opts['lastMessageNumber'], - 'firstMessageNumber': opts['firstMessageNumber'], - 'limit': opts['limit'], - 'chatId': opts['chatId'], - 'min_time': opts['minTime'], - 'max_time': opts['maxTime'], - 'msgId': opts['msgId'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetMessages; - return this.apiClient.callApi( - '/messages', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get messages list - * - * @param {Object} opts Optional parameters - * @param {Boolean} opts.last Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. - * @param {Number} opts.lastMessageNumber The lastMessageNumber parameter from the last response. Example: 100 - * @param {Number} opts.firstMessageNumber The firstMessageNumber parameter from the last response. Example: 1 - * @param {Number} opts.limit Sets length of the message list. Default 100. With value 0 returns all messages. - * @param {String} opts.chatId Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us - * @param {Number} opts.minTime Filter messages received after specified time. Example: 1665396610 - * @param {Number} opts.maxTime Filter messages received before specified time. Example: 1665396610 - * @param {String} opts.msgId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetMessages} - */ - messagesList(opts) { - return this.messagesListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Mark message as read - * - * @param {Object} opts Optional parameters - * @param {module:model/ReadMessageRequest} [readMessageRequest] - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SetMe} and HTTP response - */ - readMessageWithHttpInfo(opts) { - opts = opts || {}; - let postBody = opts['readMessageRequest']; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SetMe; - return this.apiClient.callApi( - '/readMessage', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Mark message as read - * - * @param {Object} opts Optional parameters - * @param {module:model/ReadMessageRequest} opts.readMessageRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SetMe} - */ - readMessage(opts) { - return this.readMessageWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Send a Contact - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendContactRequest} sendContactRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendContactWithHttpInfo(sendContactRequest) { - let postBody = sendContactRequest; - // verify the required parameter 'sendContactRequest' is set - if (sendContactRequest === undefined || sendContactRequest === null) { - throw new Error("Missing the required parameter 'sendContactRequest' when calling sendContact"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendContact', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send a Contact - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendContactRequest} sendContactRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendContact(sendContactRequest) { - return this.sendContactWithHttpInfo(sendContactRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Send a File - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendFileRequest} sendFileRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendFileWithHttpInfo(sendFileRequest) { - let postBody = sendFileRequest; - // verify the required parameter 'sendFileRequest' is set - if (sendFileRequest === undefined || sendFileRequest === null) { - throw new Error("Missing the required parameter 'sendFileRequest' when calling sendFile"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendFile', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send a File - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendFileRequest} sendFileRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendFile(sendFileRequest) { - return this.sendFileWithHttpInfo(sendFileRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Send List Message - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendListRequest} sendListRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendListWithHttpInfo(sendListRequest) { - let postBody = sendListRequest; - // verify the required parameter 'sendListRequest' is set - if (sendListRequest === undefined || sendListRequest === null) { - throw new Error("Missing the required parameter 'sendListRequest' when calling sendList"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendList', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send List Message - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendListRequest} sendListRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendList(sendListRequest) { - return this.sendListWithHttpInfo(sendListRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Send a Location - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendLocationRequest} sendLocationRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendLocationWithHttpInfo(sendLocationRequest) { - let postBody = sendLocationRequest; - // verify the required parameter 'sendLocationRequest' is set - if (sendLocationRequest === undefined || sendLocationRequest === null) { - throw new Error("Missing the required parameter 'sendLocationRequest' when calling sendLocation"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendLocation', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send a Location - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendLocationRequest} sendLocationRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendLocation(sendLocationRequest) { - return this.sendLocationWithHttpInfo(sendLocationRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Send a Message - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendMessageRequest} sendMessageRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendMessageWithHttpInfo(sendMessageRequest) { - let postBody = sendMessageRequest; - // verify the required parameter 'sendMessageRequest' is set - if (sendMessageRequest === undefined || sendMessageRequest === null) { - throw new Error("Missing the required parameter 'sendMessageRequest' when calling sendMessage"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendMessage', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send a Message - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * @param {module:model/SendMessageRequest} sendMessageRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendMessage(sendMessageRequest) { - return this.sendMessageWithHttpInfo(sendMessageRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/js/src/api/ProductsCatalogsApi.js b/js/src/api/ProductsCatalogsApi.js deleted file mode 100644 index 3f00cb0..0000000 --- a/js/src/api/ProductsCatalogsApi.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Commerce from '../model/Commerce'; -import GetMe401Response from '../model/GetMe401Response'; -import SendMessageStatus from '../model/SendMessageStatus'; -import SendProductRequest from '../model/SendProductRequest'; -import SetCommerce from '../model/SetCommerce'; - -/** -* ProductsCatalogs service. -* @module api/ProductsCatalogsApi -* @version 2.39.0 -*/ -export default class ProductsCatalogsApi { - - /** - * Constructs a new ProductsCatalogsApi. - * @alias module:api/ProductsCatalogsApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Send a Product - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * @param {module:model/SendProductRequest} sendProductRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendProductWithHttpInfo(sendProductRequest) { - let postBody = sendProductRequest; - // verify the required parameter 'sendProductRequest' is set - if (sendProductRequest === undefined || sendProductRequest === null) { - throw new Error("Missing the required parameter 'sendProductRequest' when calling sendProduct"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendProduct', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send a Product - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * @param {module:model/SendProductRequest} sendProductRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendProduct(sendProductRequest) { - return this.sendProductWithHttpInfo(sendProductRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Set Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @param {module:model/Commerce} commerce - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SetCommerce} and HTTP response - */ - setCommerceWithHttpInfo(commerce) { - let postBody = commerce; - // verify the required parameter 'commerce' is set - if (commerce === undefined || commerce === null) { - throw new Error("Missing the required parameter 'commerce' when calling setCommerce"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; - let accepts = ['application/json']; - let returnType = SetCommerce; - return this.apiClient.callApi( - '/commerce', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Set Commerce Settings - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * @param {module:model/Commerce} commerce - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SetCommerce} - */ - setCommerce(commerce) { - return this.setCommerceWithHttpInfo(commerce) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/js/src/api/TemplatesApi.js b/js/src/api/TemplatesApi.js deleted file mode 100644 index 3ce9595..0000000 --- a/js/src/api/TemplatesApi.js +++ /dev/null @@ -1,226 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import AddTemplateRequest from '../model/AddTemplateRequest'; -import GetMe401Response from '../model/GetMe401Response'; -import GetTemplates from '../model/GetTemplates'; -import RemoveTemplateRequest from '../model/RemoveTemplateRequest'; -import SendMessageStatus from '../model/SendMessageStatus'; -import SendTemplateRequest from '../model/SendTemplateRequest'; -import SetMe from '../model/SetMe'; - -/** -* Templates service. -* @module api/TemplatesApi -* @version 2.39.0 -*/ -export default class TemplatesApi { - - /** - * Constructs a new TemplatesApi. - * @alias module:api/TemplatesApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create template - * Create new template for sending. - * @param {module:model/AddTemplateRequest} addTemplateRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response - */ - addTemplateWithHttpInfo(addTemplateRequest) { - let postBody = addTemplateRequest; - // verify the required parameter 'addTemplateRequest' is set - if (addTemplateRequest === undefined || addTemplateRequest === null) { - throw new Error("Missing the required parameter 'addTemplateRequest' when calling addTemplate"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = Object; - return this.apiClient.callApi( - '/addTemplate', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create template - * Create new template for sending. - * @param {module:model/AddTemplateRequest} addTemplateRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object} - */ - addTemplate(addTemplateRequest) { - return this.addTemplateWithHttpInfo(addTemplateRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Remove template - * Deleted template can not be restored. - * @param {module:model/RemoveTemplateRequest} removeTemplateRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SetMe} and HTTP response - */ - removeTemplateWithHttpInfo(removeTemplateRequest) { - let postBody = removeTemplateRequest; - // verify the required parameter 'removeTemplateRequest' is set - if (removeTemplateRequest === undefined || removeTemplateRequest === null) { - throw new Error("Missing the required parameter 'removeTemplateRequest' when calling removeTemplate"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SetMe; - return this.apiClient.callApi( - '/removeTemplate', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Remove template - * Deleted template can not be restored. - * @param {module:model/RemoveTemplateRequest} removeTemplateRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SetMe} - */ - removeTemplate(removeTemplateRequest) { - return this.removeTemplateWithHttpInfo(removeTemplateRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Send Template Message - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * @param {module:model/SendTemplateRequest} sendTemplateRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendMessageStatus} and HTTP response - */ - sendTemplateWithHttpInfo(sendTemplateRequest) { - let postBody = sendTemplateRequest; - // verify the required parameter 'sendTemplateRequest' is set - if (sendTemplateRequest === undefined || sendTemplateRequest === null) { - throw new Error("Missing the required parameter 'sendTemplateRequest' when calling sendTemplate"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SendMessageStatus; - return this.apiClient.callApi( - '/sendTemplate', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Send Template Message - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * @param {module:model/SendTemplateRequest} sendTemplateRequest - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendMessageStatus} - */ - sendTemplate(sendTemplateRequest) { - return this.sendTemplateWithHttpInfo(sendTemplateRequest) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get templates list - * - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTemplates} and HTTP response - */ - templatesListWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetTemplates; - return this.apiClient.callApi( - '/templates', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get templates list - * - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetTemplates} - */ - templatesList() { - return this.templatesListWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/js/src/api/WebhooksApi.js b/js/src/api/WebhooksApi.js deleted file mode 100644 index 3110a41..0000000 --- a/js/src/api/WebhooksApi.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import GetAckInfo from '../model/GetAckInfo'; -import GetMe401Response from '../model/GetMe401Response'; -import SetWebhookStatus from '../model/SetWebhookStatus'; -import WebhookUrl from '../model/WebhookUrl'; - -/** -* Webhooks service. -* @module api/WebhooksApi -* @version 2.39.0 -*/ -export default class WebhooksApi { - - /** - * Constructs a new WebhooksApi. - * @alias module:api/WebhooksApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Check ACKs - * - * @param {String} messageId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAckInfo} and HTTP response - */ - ackHookInfoWithHttpInfo(messageId) { - let postBody = null; - // verify the required parameter 'messageId' is set - if (messageId === undefined || messageId === null) { - throw new Error("Missing the required parameter 'messageId' when calling ackHookInfo"); - } - - let pathParams = { - }; - let queryParams = { - 'messageId': messageId - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetAckInfo; - return this.apiClient.callApi( - '/hookInfo', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Check ACKs - * - * @param {String} messageId Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAckInfo} - */ - ackHookInfo(messageId) { - return this.ackHookInfoWithHttpInfo(messageId) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Set webhook - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * @param {module:model/WebhookUrl} webhookUrl - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SetWebhookStatus} and HTTP response - */ - setWebhookWithHttpInfo(webhookUrl) { - let postBody = webhookUrl; - // verify the required parameter 'webhookUrl' is set - if (webhookUrl === undefined || webhookUrl === null) { - throw new Error("Missing the required parameter 'webhookUrl' when calling setWebhook"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['token']; - let contentTypes = ['application/x-www-form-urlencoded', 'application/json']; - let accepts = ['application/json']; - let returnType = SetWebhookStatus; - return this.apiClient.callApi( - '/webhook', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Set webhook - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * @param {module:model/WebhookUrl} webhookUrl - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SetWebhookStatus} - */ - setWebhook(webhookUrl) { - return this.setWebhookWithHttpInfo(webhookUrl) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/js/src/index.js b/js/src/index.js deleted file mode 100644 index fda395d..0000000 --- a/js/src/index.js +++ /dev/null @@ -1,545 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from './ApiClient'; -import Ack from './model/Ack'; -import AddTemplateRequest from './model/AddTemplateRequest'; -import ChannelExtendedStatistics from './model/ChannelExtendedStatistics'; -import ChannelExtendedStatisticsInner from './model/ChannelExtendedStatisticsInner'; -import ChannelStatistics from './model/ChannelStatistics'; -import ChannelStatus from './model/ChannelStatus'; -import ChatIdProp from './model/ChatIdProp'; -import Commerce from './model/Commerce'; -import CommerceParams from './model/CommerceParams'; -import Contacts from './model/Contacts'; -import ContactsContactsInner from './model/ContactsContactsInner'; -import ContactsRequest from './model/ContactsRequest'; -import GetAckInfo from './model/GetAckInfo'; -import GetAckInfoHooksInner from './model/GetAckInfoHooksInner'; -import GetCommerce from './model/GetCommerce'; -import GetCommerceInner from './model/GetCommerceInner'; -import GetIP from './model/GetIP'; -import GetMe from './model/GetMe'; -import GetMe401Response from './model/GetMe401Response'; -import GetMessages from './model/GetMessages'; -import GetMessagesMessagesInner from './model/GetMessagesMessagesInner'; -import GetTemplates from './model/GetTemplates'; -import GetTemplatesTemplatesInner from './model/GetTemplatesTemplatesInner'; -import MeComponents from './model/MeComponents'; -import MediaId from './model/MediaId'; -import Message from './model/Message'; -import MessageIdProp from './model/MessageIdProp'; -import PhoneProp from './model/PhoneProp'; -import ReadMessageRequest from './model/ReadMessageRequest'; -import RemoveTemplateRequest from './model/RemoveTemplateRequest'; -import SendContactRequest from './model/SendContactRequest'; -import SendFileRequest from './model/SendFileRequest'; -import SendListRequest from './model/SendListRequest'; -import SendListRequestAllOfRows from './model/SendListRequestAllOfRows'; -import SendListRequestAllOfSections from './model/SendListRequestAllOfSections'; -import SendLocationRequest from './model/SendLocationRequest'; -import SendMessageRequest from './model/SendMessageRequest'; -import SendMessageStatus from './model/SendMessageStatus'; -import SendProductRequest from './model/SendProductRequest'; -import SendProductRequestAllOfAction from './model/SendProductRequestAllOfAction'; -import SendProductRequestAllOfActionProductItems from './model/SendProductRequestAllOfActionProductItems'; -import SendProductRequestAllOfActionSections from './model/SendProductRequestAllOfActionSections'; -import SendTemplateRequest from './model/SendTemplateRequest'; -import SendTemplateRequestAllOfCurrency from './model/SendTemplateRequestAllOfCurrency'; -import SendTemplateRequestAllOfDateTime from './model/SendTemplateRequestAllOfDateTime'; -import SendTemplateRequestAllOfDateTimeComponent from './model/SendTemplateRequestAllOfDateTimeComponent'; -import SendTemplateRequestAllOfDateTimeUnixEpoch from './model/SendTemplateRequestAllOfDateTimeUnixEpoch'; -import SendTemplateRequestAllOfLanguage from './model/SendTemplateRequestAllOfLanguage'; -import SendTemplateRequestAllOfParams from './model/SendTemplateRequestAllOfParams'; -import SetCommerce from './model/SetCommerce'; -import SetMe from './model/SetMe'; -import SetMeRequest from './model/SetMeRequest'; -import SetSettings200Response from './model/SetSettings200Response'; -import SetSettings200ResponseAllOfUpdate from './model/SetSettings200ResponseAllOfUpdate'; -import SetWebhookStatus from './model/SetWebhookStatus'; -import Settings from './model/Settings'; -import TemplateCategoryProp from './model/TemplateCategoryProp'; -import TemplateComponentsProp from './model/TemplateComponentsProp'; -import TemplateComponentsPropInner from './model/TemplateComponentsPropInner'; -import TemplateComponentsPropInnerButtonsInner from './model/TemplateComponentsPropInnerButtonsInner'; -import TemplateLanguageProp from './model/TemplateLanguageProp'; -import TemplateNamespaceField from './model/TemplateNamespaceField'; -import UploadMedia from './model/UploadMedia'; -import WebhookUrl from './model/WebhookUrl'; -import ChannelApi from './api/ChannelApi'; -import MediaApi from './api/MediaApi'; -import MessagingApi from './api/MessagingApi'; -import ProductsCatalogsApi from './api/ProductsCatalogsApi'; -import TemplatesApi from './api/TemplatesApi'; -import WebhooksApi from './api/WebhooksApi'; - - -/** -* [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail.
-* The index module provides access to constructors for all the classes which comprise the public API. -*

-* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: -*

-* var OneMsgWabaSdk = require('index'); // See note below*.
-* var xxxSvc = new OneMsgWabaSdk.XxxApi(); // Allocate the API class we're going to use.
-* var yyyModel = new OneMsgWabaSdk.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-* *NOTE: For a top-level AMD script, use require(['index'], function(){...}) -* and put the application logic within the callback function. -*

-*

-* A non-AMD browser application (discouraged) might do something like this: -*

-* var xxxSvc = new OneMsgWabaSdk.XxxApi(); // Allocate the API class we're going to use.
-* var yyy = new OneMsgWabaSdk.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-*

-* @module index -* @version 2.39.0 -*/ -export { - /** - * The ApiClient constructor. - * @property {module:ApiClient} - */ - ApiClient, - - /** - * The Ack model constructor. - * @property {module:model/Ack} - */ - Ack, - - /** - * The AddTemplateRequest model constructor. - * @property {module:model/AddTemplateRequest} - */ - AddTemplateRequest, - - /** - * The ChannelExtendedStatistics model constructor. - * @property {module:model/ChannelExtendedStatistics} - */ - ChannelExtendedStatistics, - - /** - * The ChannelExtendedStatisticsInner model constructor. - * @property {module:model/ChannelExtendedStatisticsInner} - */ - ChannelExtendedStatisticsInner, - - /** - * The ChannelStatistics model constructor. - * @property {module:model/ChannelStatistics} - */ - ChannelStatistics, - - /** - * The ChannelStatus model constructor. - * @property {module:model/ChannelStatus} - */ - ChannelStatus, - - /** - * The ChatIdProp model constructor. - * @property {module:model/ChatIdProp} - */ - ChatIdProp, - - /** - * The Commerce model constructor. - * @property {module:model/Commerce} - */ - Commerce, - - /** - * The CommerceParams model constructor. - * @property {module:model/CommerceParams} - */ - CommerceParams, - - /** - * The Contacts model constructor. - * @property {module:model/Contacts} - */ - Contacts, - - /** - * The ContactsContactsInner model constructor. - * @property {module:model/ContactsContactsInner} - */ - ContactsContactsInner, - - /** - * The ContactsRequest model constructor. - * @property {module:model/ContactsRequest} - */ - ContactsRequest, - - /** - * The GetAckInfo model constructor. - * @property {module:model/GetAckInfo} - */ - GetAckInfo, - - /** - * The GetAckInfoHooksInner model constructor. - * @property {module:model/GetAckInfoHooksInner} - */ - GetAckInfoHooksInner, - - /** - * The GetCommerce model constructor. - * @property {module:model/GetCommerce} - */ - GetCommerce, - - /** - * The GetCommerceInner model constructor. - * @property {module:model/GetCommerceInner} - */ - GetCommerceInner, - - /** - * The GetIP model constructor. - * @property {module:model/GetIP} - */ - GetIP, - - /** - * The GetMe model constructor. - * @property {module:model/GetMe} - */ - GetMe, - - /** - * The GetMe401Response model constructor. - * @property {module:model/GetMe401Response} - */ - GetMe401Response, - - /** - * The GetMessages model constructor. - * @property {module:model/GetMessages} - */ - GetMessages, - - /** - * The GetMessagesMessagesInner model constructor. - * @property {module:model/GetMessagesMessagesInner} - */ - GetMessagesMessagesInner, - - /** - * The GetTemplates model constructor. - * @property {module:model/GetTemplates} - */ - GetTemplates, - - /** - * The GetTemplatesTemplatesInner model constructor. - * @property {module:model/GetTemplatesTemplatesInner} - */ - GetTemplatesTemplatesInner, - - /** - * The MeComponents model constructor. - * @property {module:model/MeComponents} - */ - MeComponents, - - /** - * The MediaId model constructor. - * @property {module:model/MediaId} - */ - MediaId, - - /** - * The Message model constructor. - * @property {module:model/Message} - */ - Message, - - /** - * The MessageIdProp model constructor. - * @property {module:model/MessageIdProp} - */ - MessageIdProp, - - /** - * The PhoneProp model constructor. - * @property {module:model/PhoneProp} - */ - PhoneProp, - - /** - * The ReadMessageRequest model constructor. - * @property {module:model/ReadMessageRequest} - */ - ReadMessageRequest, - - /** - * The RemoveTemplateRequest model constructor. - * @property {module:model/RemoveTemplateRequest} - */ - RemoveTemplateRequest, - - /** - * The SendContactRequest model constructor. - * @property {module:model/SendContactRequest} - */ - SendContactRequest, - - /** - * The SendFileRequest model constructor. - * @property {module:model/SendFileRequest} - */ - SendFileRequest, - - /** - * The SendListRequest model constructor. - * @property {module:model/SendListRequest} - */ - SendListRequest, - - /** - * The SendListRequestAllOfRows model constructor. - * @property {module:model/SendListRequestAllOfRows} - */ - SendListRequestAllOfRows, - - /** - * The SendListRequestAllOfSections model constructor. - * @property {module:model/SendListRequestAllOfSections} - */ - SendListRequestAllOfSections, - - /** - * The SendLocationRequest model constructor. - * @property {module:model/SendLocationRequest} - */ - SendLocationRequest, - - /** - * The SendMessageRequest model constructor. - * @property {module:model/SendMessageRequest} - */ - SendMessageRequest, - - /** - * The SendMessageStatus model constructor. - * @property {module:model/SendMessageStatus} - */ - SendMessageStatus, - - /** - * The SendProductRequest model constructor. - * @property {module:model/SendProductRequest} - */ - SendProductRequest, - - /** - * The SendProductRequestAllOfAction model constructor. - * @property {module:model/SendProductRequestAllOfAction} - */ - SendProductRequestAllOfAction, - - /** - * The SendProductRequestAllOfActionProductItems model constructor. - * @property {module:model/SendProductRequestAllOfActionProductItems} - */ - SendProductRequestAllOfActionProductItems, - - /** - * The SendProductRequestAllOfActionSections model constructor. - * @property {module:model/SendProductRequestAllOfActionSections} - */ - SendProductRequestAllOfActionSections, - - /** - * The SendTemplateRequest model constructor. - * @property {module:model/SendTemplateRequest} - */ - SendTemplateRequest, - - /** - * The SendTemplateRequestAllOfCurrency model constructor. - * @property {module:model/SendTemplateRequestAllOfCurrency} - */ - SendTemplateRequestAllOfCurrency, - - /** - * The SendTemplateRequestAllOfDateTime model constructor. - * @property {module:model/SendTemplateRequestAllOfDateTime} - */ - SendTemplateRequestAllOfDateTime, - - /** - * The SendTemplateRequestAllOfDateTimeComponent model constructor. - * @property {module:model/SendTemplateRequestAllOfDateTimeComponent} - */ - SendTemplateRequestAllOfDateTimeComponent, - - /** - * The SendTemplateRequestAllOfDateTimeUnixEpoch model constructor. - * @property {module:model/SendTemplateRequestAllOfDateTimeUnixEpoch} - */ - SendTemplateRequestAllOfDateTimeUnixEpoch, - - /** - * The SendTemplateRequestAllOfLanguage model constructor. - * @property {module:model/SendTemplateRequestAllOfLanguage} - */ - SendTemplateRequestAllOfLanguage, - - /** - * The SendTemplateRequestAllOfParams model constructor. - * @property {module:model/SendTemplateRequestAllOfParams} - */ - SendTemplateRequestAllOfParams, - - /** - * The SetCommerce model constructor. - * @property {module:model/SetCommerce} - */ - SetCommerce, - - /** - * The SetMe model constructor. - * @property {module:model/SetMe} - */ - SetMe, - - /** - * The SetMeRequest model constructor. - * @property {module:model/SetMeRequest} - */ - SetMeRequest, - - /** - * The SetSettings200Response model constructor. - * @property {module:model/SetSettings200Response} - */ - SetSettings200Response, - - /** - * The SetSettings200ResponseAllOfUpdate model constructor. - * @property {module:model/SetSettings200ResponseAllOfUpdate} - */ - SetSettings200ResponseAllOfUpdate, - - /** - * The SetWebhookStatus model constructor. - * @property {module:model/SetWebhookStatus} - */ - SetWebhookStatus, - - /** - * The Settings model constructor. - * @property {module:model/Settings} - */ - Settings, - - /** - * The TemplateCategoryProp model constructor. - * @property {module:model/TemplateCategoryProp} - */ - TemplateCategoryProp, - - /** - * The TemplateComponentsProp model constructor. - * @property {module:model/TemplateComponentsProp} - */ - TemplateComponentsProp, - - /** - * The TemplateComponentsPropInner model constructor. - * @property {module:model/TemplateComponentsPropInner} - */ - TemplateComponentsPropInner, - - /** - * The TemplateComponentsPropInnerButtonsInner model constructor. - * @property {module:model/TemplateComponentsPropInnerButtonsInner} - */ - TemplateComponentsPropInnerButtonsInner, - - /** - * The TemplateLanguageProp model constructor. - * @property {module:model/TemplateLanguageProp} - */ - TemplateLanguageProp, - - /** - * The TemplateNamespaceField model constructor. - * @property {module:model/TemplateNamespaceField} - */ - TemplateNamespaceField, - - /** - * The UploadMedia model constructor. - * @property {module:model/UploadMedia} - */ - UploadMedia, - - /** - * The WebhookUrl model constructor. - * @property {module:model/WebhookUrl} - */ - WebhookUrl, - - /** - * The ChannelApi service constructor. - * @property {module:api/ChannelApi} - */ - ChannelApi, - - /** - * The MediaApi service constructor. - * @property {module:api/MediaApi} - */ - MediaApi, - - /** - * The MessagingApi service constructor. - * @property {module:api/MessagingApi} - */ - MessagingApi, - - /** - * The ProductsCatalogsApi service constructor. - * @property {module:api/ProductsCatalogsApi} - */ - ProductsCatalogsApi, - - /** - * The TemplatesApi service constructor. - * @property {module:api/TemplatesApi} - */ - TemplatesApi, - - /** - * The WebhooksApi service constructor. - * @property {module:api/WebhooksApi} - */ - WebhooksApi -}; diff --git a/js/src/model/Ack.js b/js/src/model/Ack.js deleted file mode 100644 index bac7ce6..0000000 --- a/js/src/model/Ack.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Ack model module. - * @module model/Ack - * @version 2.39.0 - */ -class Ack { - /** - * Constructs a new Ack. - * @alias module:model/Ack - */ - constructor() { - - Ack.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Ack from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Ack} obj Optional instance to populate. - * @return {module:model/Ack} The populated Ack instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Ack(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Ack. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Ack. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - - return true; - } - - -} - - - -/** - * unique id of message - * @member {String} id - */ -Ack.prototype['id'] = undefined; - -/** - * chat ID - * @member {String} chatId - */ -Ack.prototype['chatId'] = undefined; - -/** - * type of the message status - * @member {module:model/Ack.StatusEnum} status - */ -Ack.prototype['status'] = undefined; - - - - - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -Ack['StatusEnum'] = { - - /** - * value: "delivered" - * @const - */ - "delivered": "delivered", - - /** - * value: "viewed" - * @const - */ - "viewed": "viewed", - - /** - * value: "sent" - * @const - */ - "sent": "sent" -}; - - - -export default Ack; - diff --git a/js/src/model/AddTemplateRequest.js b/js/src/model/AddTemplateRequest.js deleted file mode 100644 index 00dd808..0000000 --- a/js/src/model/AddTemplateRequest.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import TemplateCategoryProp from './TemplateCategoryProp'; -import TemplateComponentsProp from './TemplateComponentsProp'; -import TemplateLanguageProp from './TemplateLanguageProp'; - -/** - * The AddTemplateRequest model module. - * @module model/AddTemplateRequest - * @version 2.39.0 - */ -class AddTemplateRequest { - /** - * Constructs a new AddTemplateRequest. - * @alias module:model/AddTemplateRequest - */ - constructor() { - - AddTemplateRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AddTemplateRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AddTemplateRequest} obj Optional instance to populate. - * @return {module:model/AddTemplateRequest} The populated AddTemplateRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AddTemplateRequest(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('category')) { - obj['category'] = TemplateCategoryProp.constructFromObject(data['category']); - } - if (data.hasOwnProperty('components')) { - obj['components'] = TemplateComponentsProp.constructFromObject(data['components']); - } - if (data.hasOwnProperty('language')) { - obj['language'] = TemplateLanguageProp.constructFromObject(data['language']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to AddTemplateRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to AddTemplateRequest. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - - return true; - } - - -} - - - -/** - * Name of template - * @member {String} name - */ -AddTemplateRequest.prototype['name'] = undefined; - -/** - * @member {module:model/TemplateCategoryProp} category - */ -AddTemplateRequest.prototype['category'] = undefined; - -/** - * @member {module:model/TemplateComponentsProp} components - */ -AddTemplateRequest.prototype['components'] = undefined; - -/** - * @member {module:model/TemplateLanguageProp} language - */ -AddTemplateRequest.prototype['language'] = undefined; - - - - - - -export default AddTemplateRequest; - diff --git a/js/src/model/ChannelExtendedStatistics.js b/js/src/model/ChannelExtendedStatistics.js deleted file mode 100644 index ce21c76..0000000 --- a/js/src/model/ChannelExtendedStatistics.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChannelExtendedStatisticsInner from './ChannelExtendedStatisticsInner'; - -/** - * The ChannelExtendedStatistics model module. - * @module model/ChannelExtendedStatistics - * @version 2.39.0 - */ -class ChannelExtendedStatistics extends Array { - /** - * Constructs a new ChannelExtendedStatistics. - * @alias module:model/ChannelExtendedStatistics - * @extends Array - */ - constructor() { - super(); - - - ChannelExtendedStatistics.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ChannelExtendedStatistics from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ChannelExtendedStatistics} obj Optional instance to populate. - * @return {module:model/ChannelExtendedStatistics} The populated ChannelExtendedStatistics instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ChannelExtendedStatistics(); - - ApiClient.constructFromObject(data, obj, 'ChannelExtendedStatisticsInner'); - - - } - return obj; - } - - /** - * Validates the JSON data with respect to ChannelExtendedStatistics. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ChannelExtendedStatistics. - */ - static validateJSON(data) { - - return true; - } - - -} - - - - - - - - -export default ChannelExtendedStatistics; - diff --git a/js/src/model/ChannelExtendedStatisticsInner.js b/js/src/model/ChannelExtendedStatisticsInner.js deleted file mode 100644 index 9051434..0000000 --- a/js/src/model/ChannelExtendedStatisticsInner.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ChannelExtendedStatisticsInner model module. - * @module model/ChannelExtendedStatisticsInner - * @version 2.39.0 - */ -class ChannelExtendedStatisticsInner { - /** - * Constructs a new ChannelExtendedStatisticsInner. - * @alias module:model/ChannelExtendedStatisticsInner - */ - constructor() { - - ChannelExtendedStatisticsInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ChannelExtendedStatisticsInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ChannelExtendedStatisticsInner} obj Optional instance to populate. - * @return {module:model/ChannelExtendedStatisticsInner} The populated ChannelExtendedStatisticsInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ChannelExtendedStatisticsInner(); - - if (data.hasOwnProperty('business_initiated_paid_quantity')) { - obj['business_initiated_paid_quantity'] = ApiClient.convertToType(data['business_initiated_paid_quantity'], 'Number'); - } - if (data.hasOwnProperty('business_initiated_price')) { - obj['business_initiated_price'] = ApiClient.convertToType(data['business_initiated_price'], 'Number'); - } - if (data.hasOwnProperty('business_initiated_quantity')) { - obj['business_initiated_quantity'] = ApiClient.convertToType(data['business_initiated_quantity'], 'Number'); - } - if (data.hasOwnProperty('free_entry_point')) { - obj['free_entry_point'] = ApiClient.convertToType(data['free_entry_point'], 'Number'); - } - if (data.hasOwnProperty('free_quantity')) { - obj['free_quantity'] = ApiClient.convertToType(data['free_quantity'], 'Number'); - } - if (data.hasOwnProperty('free_tier')) { - obj['free_tier'] = ApiClient.convertToType(data['free_tier'], 'Number'); - } - if (data.hasOwnProperty('paid_quantity')) { - obj['paid_quantity'] = ApiClient.convertToType(data['paid_quantity'], 'Number'); - } - if (data.hasOwnProperty('period_date')) { - obj['period_date'] = ApiClient.convertToType(data['period_date'], 'String'); - } - if (data.hasOwnProperty('quantity')) { - obj['quantity'] = ApiClient.convertToType(data['quantity'], 'Number'); - } - if (data.hasOwnProperty('total_price')) { - obj['total_price'] = ApiClient.convertToType(data['total_price'], 'Number'); - } - if (data.hasOwnProperty('user_initiated_paid_quantity')) { - obj['user_initiated_paid_quantity'] = ApiClient.convertToType(data['user_initiated_paid_quantity'], 'Number'); - } - if (data.hasOwnProperty('user_initiated_price')) { - obj['user_initiated_price'] = ApiClient.convertToType(data['user_initiated_price'], 'Number'); - } - if (data.hasOwnProperty('user_initiated_quantity')) { - obj['user_initiated_quantity'] = ApiClient.convertToType(data['user_initiated_quantity'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ChannelExtendedStatisticsInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ChannelExtendedStatisticsInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['period_date'] && !(typeof data['period_date'] === 'string' || data['period_date'] instanceof String)) { - throw new Error("Expected the field `period_date` to be a primitive type in the JSON string but got " + data['period_date']); - } - - return true; - } - - -} - - - -/** - * @member {Number} business_initiated_paid_quantity - */ -ChannelExtendedStatisticsInner.prototype['business_initiated_paid_quantity'] = undefined; - -/** - * @member {Number} business_initiated_price - */ -ChannelExtendedStatisticsInner.prototype['business_initiated_price'] = undefined; - -/** - * @member {Number} business_initiated_quantity - */ -ChannelExtendedStatisticsInner.prototype['business_initiated_quantity'] = undefined; - -/** - * @member {Number} free_entry_point - */ -ChannelExtendedStatisticsInner.prototype['free_entry_point'] = undefined; - -/** - * @member {Number} free_quantity - */ -ChannelExtendedStatisticsInner.prototype['free_quantity'] = undefined; - -/** - * @member {Number} free_tier - */ -ChannelExtendedStatisticsInner.prototype['free_tier'] = undefined; - -/** - * @member {Number} paid_quantity - */ -ChannelExtendedStatisticsInner.prototype['paid_quantity'] = undefined; - -/** - * @member {String} period_date - */ -ChannelExtendedStatisticsInner.prototype['period_date'] = undefined; - -/** - * @member {Number} quantity - */ -ChannelExtendedStatisticsInner.prototype['quantity'] = undefined; - -/** - * @member {Number} total_price - */ -ChannelExtendedStatisticsInner.prototype['total_price'] = undefined; - -/** - * @member {Number} user_initiated_paid_quantity - */ -ChannelExtendedStatisticsInner.prototype['user_initiated_paid_quantity'] = undefined; - -/** - * @member {Number} user_initiated_price - */ -ChannelExtendedStatisticsInner.prototype['user_initiated_price'] = undefined; - -/** - * @member {Number} user_initiated_quantity - */ -ChannelExtendedStatisticsInner.prototype['user_initiated_quantity'] = undefined; - - - - - - -export default ChannelExtendedStatisticsInner; - diff --git a/js/src/model/ChannelStatistics.js b/js/src/model/ChannelStatistics.js deleted file mode 100644 index 441de8c..0000000 --- a/js/src/model/ChannelStatistics.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ChannelStatistics model module. - * @module model/ChannelStatistics - * @version 2.39.0 - */ -class ChannelStatistics { - /** - * Constructs a new ChannelStatistics. - * @alias module:model/ChannelStatistics - */ - constructor() { - - ChannelStatistics.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ChannelStatistics from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ChannelStatistics} obj Optional instance to populate. - * @return {module:model/ChannelStatistics} The populated ChannelStatistics instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ChannelStatistics(); - - if (data.hasOwnProperty('date')) { - obj['date'] = ApiClient.convertToType(data['date'], 'String'); - } - if (data.hasOwnProperty('templates_cost')) { - obj['templates_cost'] = ApiClient.convertToType(data['templates_cost'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ChannelStatistics. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ChannelStatistics. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['date'] && !(typeof data['date'] === 'string' || data['date'] instanceof String)) { - throw new Error("Expected the field `date` to be a primitive type in the JSON string but got " + data['date']); - } - - return true; - } - - -} - - - -/** - * @member {String} date - */ -ChannelStatistics.prototype['date'] = undefined; - -/** - * @member {Number} templates_cost - */ -ChannelStatistics.prototype['templates_cost'] = undefined; - - - - - - -export default ChannelStatistics; - diff --git a/js/src/model/ChannelStatus.js b/js/src/model/ChannelStatus.js deleted file mode 100644 index 4d6f359..0000000 --- a/js/src/model/ChannelStatus.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ChannelStatus model module. - * @module model/ChannelStatus - * @version 2.39.0 - */ -class ChannelStatus { - /** - * Constructs a new ChannelStatus. - * @alias module:model/ChannelStatus - */ - constructor() { - - ChannelStatus.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ChannelStatus from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ChannelStatus} obj Optional instance to populate. - * @return {module:model/ChannelStatus} The populated ChannelStatus instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ChannelStatus(); - - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ChannelStatus. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ChannelStatus. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - - return true; - } - - -} - - - -/** - * channel Status - * @member {module:model/ChannelStatus.StatusEnum} status - */ -ChannelStatus.prototype['status'] = undefined; - - - - - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -ChannelStatus['StatusEnum'] = { - - /** - * value: "connected" - * @const - */ - "connected": "connected", - - /** - * value: "connecting" - * @const - */ - "connecting": "connecting", - - /** - * value: "disconnected" - * @const - */ - "disconnected": "disconnected", - - /** - * value: "uninitialized" - * @const - */ - "uninitialized": "uninitialized", - - /** - * value: "unregistered" - * @const - */ - "unregistered": "unregistered" -}; - - - -export default ChannelStatus; - diff --git a/js/src/model/ChatIdProp.js b/js/src/model/ChatIdProp.js deleted file mode 100644 index d40aad9..0000000 --- a/js/src/model/ChatIdProp.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ChatIdProp model module. - * @module model/ChatIdProp - * @version 2.39.0 - */ -class ChatIdProp { - /** - * Constructs a new ChatIdProp. - * @alias module:model/ChatIdProp - */ - constructor() { - - ChatIdProp.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ChatIdProp from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ChatIdProp} obj Optional instance to populate. - * @return {module:model/ChatIdProp} The populated ChatIdProp instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ChatIdProp(); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ChatIdProp. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ChatIdProp. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - - return true; - } - - -} - - - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; - - - - - - -export default ChatIdProp; - diff --git a/js/src/model/Commerce.js b/js/src/model/Commerce.js deleted file mode 100644 index ee564b2..0000000 --- a/js/src/model/Commerce.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import CommerceParams from './CommerceParams'; - -/** - * The Commerce model module. - * @module model/Commerce - * @version 2.39.0 - */ -class Commerce { - /** - * Constructs a new Commerce. - * @alias module:model/Commerce - */ - constructor() { - - Commerce.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Commerce from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Commerce} obj Optional instance to populate. - * @return {module:model/Commerce} The populated Commerce instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Commerce(); - - if (data.hasOwnProperty('params')) { - obj['params'] = CommerceParams.constructFromObject(data['params']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Commerce. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Commerce. - */ - static validateJSON(data) { - // validate the optional field `params` - if (data['params']) { // data not null - CommerceParams.validateJSON(data['params']); - } - - return true; - } - - -} - - - -/** - * @member {module:model/CommerceParams} params - */ -Commerce.prototype['params'] = undefined; - - - - - - -export default Commerce; - diff --git a/js/src/model/CommerceParams.js b/js/src/model/CommerceParams.js deleted file mode 100644 index c2a73de..0000000 --- a/js/src/model/CommerceParams.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The CommerceParams model module. - * @module model/CommerceParams - * @version 2.39.0 - */ -class CommerceParams { - /** - * Constructs a new CommerceParams. - * @alias module:model/CommerceParams - * @param isCartEnabled {Boolean} - * @param isCatalogVisible {Boolean} - */ - constructor(isCartEnabled, isCatalogVisible) { - - CommerceParams.initialize(this, isCartEnabled, isCatalogVisible); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, isCartEnabled, isCatalogVisible) { - obj['is_cart_enabled'] = isCartEnabled; - obj['is_catalog_visible'] = isCatalogVisible; - } - - /** - * Constructs a CommerceParams from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CommerceParams} obj Optional instance to populate. - * @return {module:model/CommerceParams} The populated CommerceParams instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CommerceParams(); - - if (data.hasOwnProperty('is_cart_enabled')) { - obj['is_cart_enabled'] = ApiClient.convertToType(data['is_cart_enabled'], 'Boolean'); - } - if (data.hasOwnProperty('is_catalog_visible')) { - obj['is_catalog_visible'] = ApiClient.convertToType(data['is_catalog_visible'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CommerceParams. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CommerceParams. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of CommerceParams.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - - return true; - } - - -} - -CommerceParams.RequiredProperties = ["is_cart_enabled", "is_catalog_visible"]; - -/** - * @member {Boolean} is_cart_enabled - */ -CommerceParams.prototype['is_cart_enabled'] = undefined; - -/** - * @member {Boolean} is_catalog_visible - */ -CommerceParams.prototype['is_catalog_visible'] = undefined; - - - - - - -export default CommerceParams; - diff --git a/js/src/model/Contacts.js b/js/src/model/Contacts.js deleted file mode 100644 index 96b8ce7..0000000 --- a/js/src/model/Contacts.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ContactsContactsInner from './ContactsContactsInner'; - -/** - * The Contacts model module. - * @module model/Contacts - * @version 2.39.0 - */ -class Contacts { - /** - * Constructs a new Contacts. - * @alias module:model/Contacts - */ - constructor() { - - Contacts.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Contacts from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Contacts} obj Optional instance to populate. - * @return {module:model/Contacts} The populated Contacts instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Contacts(); - - if (data.hasOwnProperty('contacts')) { - obj['contacts'] = ApiClient.convertToType(data['contacts'], [ContactsContactsInner]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Contacts. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Contacts. - */ - static validateJSON(data) { - if (data['contacts']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['contacts'])) { - throw new Error("Expected the field `contacts` to be an array in the JSON data but got " + data['contacts']); - } - // validate the optional field `contacts` (array) - for (const item of data['contacts']) { - ContactsContactsInner.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * List of checked numbers - * @member {Array.} contacts - */ -Contacts.prototype['contacts'] = undefined; - - - - - - -export default Contacts; - diff --git a/js/src/model/ContactsContactsInner.js b/js/src/model/ContactsContactsInner.js deleted file mode 100644 index 1d504a5..0000000 --- a/js/src/model/ContactsContactsInner.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ContactsContactsInner model module. - * @module model/ContactsContactsInner - * @version 2.39.0 - */ -class ContactsContactsInner { - /** - * Constructs a new ContactsContactsInner. - * @alias module:model/ContactsContactsInner - */ - constructor() { - - ContactsContactsInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ContactsContactsInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ContactsContactsInner} obj Optional instance to populate. - * @return {module:model/ContactsContactsInner} The populated ContactsContactsInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ContactsContactsInner(); - - if (data.hasOwnProperty('input')) { - obj['input'] = ApiClient.convertToType(data['input'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('wa_id')) { - obj['wa_id'] = ApiClient.convertToType(data['wa_id'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ContactsContactsInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ContactsContactsInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['input'] && !(typeof data['input'] === 'string' || data['input'] instanceof String)) { - throw new Error("Expected the field `input` to be a primitive type in the JSON string but got " + data['input']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['wa_id'] && !(typeof data['wa_id'] === 'string' || data['wa_id'] instanceof String)) { - throw new Error("Expected the field `wa_id` to be a primitive type in the JSON string but got " + data['wa_id']); - } - - return true; - } - - -} - - - -/** - * Sent value - * @member {String} input - */ -ContactsContactsInner.prototype['input'] = undefined; - -/** - * Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending - * @member {String} status - */ -ContactsContactsInner.prototype['status'] = undefined; - -/** - * Formatted contact phone - * @member {String} wa_id - */ -ContactsContactsInner.prototype['wa_id'] = undefined; - - - - - - -export default ContactsContactsInner; - diff --git a/js/src/model/ContactsRequest.js b/js/src/model/ContactsRequest.js deleted file mode 100644 index d85988e..0000000 --- a/js/src/model/ContactsRequest.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ContactsRequest model module. - * @module model/ContactsRequest - * @version 2.39.0 - */ -class ContactsRequest { - /** - * Constructs a new ContactsRequest. - * @alias module:model/ContactsRequest - * @param contacts {Array.} Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] - */ - constructor(contacts) { - - ContactsRequest.initialize(this, contacts); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, contacts) { - obj['contacts'] = contacts; - } - - /** - * Constructs a ContactsRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ContactsRequest} obj Optional instance to populate. - * @return {module:model/ContactsRequest} The populated ContactsRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ContactsRequest(); - - if (data.hasOwnProperty('blocking')) { - obj['blocking'] = ApiClient.convertToType(data['blocking'], 'String'); - } - if (data.hasOwnProperty('force_check')) { - obj['force_check'] = ApiClient.convertToType(data['force_check'], 'Boolean'); - } - if (data.hasOwnProperty('contacts')) { - obj['contacts'] = ApiClient.convertToType(data['contacts'], ['String']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ContactsRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ContactsRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of ContactsRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['blocking'] && !(typeof data['blocking'] === 'string' || data['blocking'] instanceof String)) { - throw new Error("Expected the field `blocking` to be a primitive type in the JSON string but got " + data['blocking']); - } - // ensure the json data is an array - if (!Array.isArray(data['contacts'])) { - throw new Error("Expected the field `contacts` to be an array in the JSON data but got " + data['contacts']); - } - - return true; - } - - -} - -ContactsRequest.RequiredProperties = ["contacts"]; - -/** - * Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) - * @member {String} blocking - */ -ContactsRequest.prototype['blocking'] = undefined; - -/** - * Using cache: *true* - ignore cache *false* - use cache (default) - * @member {Boolean} force_check - */ -ContactsRequest.prototype['force_check'] = undefined; - -/** - * Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] - * @member {Array.} contacts - */ -ContactsRequest.prototype['contacts'] = undefined; - - - - - - -export default ContactsRequest; - diff --git a/js/src/model/GetAckInfo.js b/js/src/model/GetAckInfo.js deleted file mode 100644 index 98174d4..0000000 --- a/js/src/model/GetAckInfo.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import GetAckInfoHooksInner from './GetAckInfoHooksInner'; - -/** - * The GetAckInfo model module. - * @module model/GetAckInfo - * @version 2.39.0 - */ -class GetAckInfo { - /** - * Constructs a new GetAckInfo. - * @alias module:model/GetAckInfo - */ - constructor() { - - GetAckInfo.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetAckInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetAckInfo} obj Optional instance to populate. - * @return {module:model/GetAckInfo} The populated GetAckInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetAckInfo(); - - if (data.hasOwnProperty('hooks')) { - obj['hooks'] = ApiClient.convertToType(data['hooks'], [GetAckInfoHooksInner]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetAckInfo. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetAckInfo. - */ - static validateJSON(data) { - if (data['hooks']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['hooks'])) { - throw new Error("Expected the field `hooks` to be an array in the JSON data but got " + data['hooks']); - } - // validate the optional field `hooks` (array) - for (const item of data['hooks']) { - GetAckInfoHooksInner.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * @member {Array.} hooks - */ -GetAckInfo.prototype['hooks'] = undefined; - - - - - - -export default GetAckInfo; - diff --git a/js/src/model/GetAckInfoHooksInner.js b/js/src/model/GetAckInfoHooksInner.js deleted file mode 100644 index cd43c59..0000000 --- a/js/src/model/GetAckInfoHooksInner.js +++ /dev/null @@ -1,151 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The GetAckInfoHooksInner model module. - * @module model/GetAckInfoHooksInner - * @version 2.39.0 - */ -class GetAckInfoHooksInner { - /** - * Constructs a new GetAckInfoHooksInner. - * @alias module:model/GetAckInfoHooksInner - */ - constructor() { - - GetAckInfoHooksInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetAckInfoHooksInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetAckInfoHooksInner} obj Optional instance to populate. - * @return {module:model/GetAckInfoHooksInner} The populated GetAckInfoHooksInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetAckInfoHooksInner(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('pricing')) { - obj['pricing'] = ApiClient.convertToType(data['pricing'], Object); - } - if (data.hasOwnProperty('timestamp')) { - obj['timestamp'] = ApiClient.convertToType(data['timestamp'], 'String'); - } - if (data.hasOwnProperty('conversation')) { - obj['conversation'] = ApiClient.convertToType(data['conversation'], Object); - } - if (data.hasOwnProperty('recipient_id')) { - obj['recipient_id'] = ApiClient.convertToType(data['recipient_id'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetAckInfoHooksInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetAckInfoHooksInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['timestamp'] && !(typeof data['timestamp'] === 'string' || data['timestamp'] instanceof String)) { - throw new Error("Expected the field `timestamp` to be a primitive type in the JSON string but got " + data['timestamp']); - } - // ensure the json data is a string - if (data['recipient_id'] && !(typeof data['recipient_id'] === 'string' || data['recipient_id'] instanceof String)) { - throw new Error("Expected the field `recipient_id` to be a primitive type in the JSON string but got " + data['recipient_id']); - } - - return true; - } - - -} - - - -/** - * @member {String} id - */ -GetAckInfoHooksInner.prototype['id'] = undefined; - -/** - * @member {String} type - */ -GetAckInfoHooksInner.prototype['type'] = undefined; - -/** - * @member {String} status - */ -GetAckInfoHooksInner.prototype['status'] = undefined; - -/** - * @member {Object} pricing - */ -GetAckInfoHooksInner.prototype['pricing'] = undefined; - -/** - * @member {String} timestamp - */ -GetAckInfoHooksInner.prototype['timestamp'] = undefined; - -/** - * @member {Object} conversation - */ -GetAckInfoHooksInner.prototype['conversation'] = undefined; - -/** - * @member {String} recipient_id - */ -GetAckInfoHooksInner.prototype['recipient_id'] = undefined; - - - - - - -export default GetAckInfoHooksInner; - diff --git a/js/src/model/GetCommerce.js b/js/src/model/GetCommerce.js deleted file mode 100644 index ac70529..0000000 --- a/js/src/model/GetCommerce.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import GetCommerceInner from './GetCommerceInner'; - -/** - * The GetCommerce model module. - * @module model/GetCommerce - * @version 2.39.0 - */ -class GetCommerce extends Array { - /** - * Constructs a new GetCommerce. - * @alias module:model/GetCommerce - * @extends Array - */ - constructor() { - super(); - - - GetCommerce.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetCommerce from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetCommerce} obj Optional instance to populate. - * @return {module:model/GetCommerce} The populated GetCommerce instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetCommerce(); - - ApiClient.constructFromObject(data, obj, 'GetCommerceInner'); - - - } - return obj; - } - - /** - * Validates the JSON data with respect to GetCommerce. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetCommerce. - */ - static validateJSON(data) { - - return true; - } - - -} - - - - - - - - -export default GetCommerce; - diff --git a/js/src/model/GetCommerceInner.js b/js/src/model/GetCommerceInner.js deleted file mode 100644 index 09a4467..0000000 --- a/js/src/model/GetCommerceInner.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The GetCommerceInner model module. - * @module model/GetCommerceInner - * @version 2.39.0 - */ -class GetCommerceInner { - /** - * Constructs a new GetCommerceInner. - * @alias module:model/GetCommerceInner - */ - constructor() { - - GetCommerceInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetCommerceInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetCommerceInner} obj Optional instance to populate. - * @return {module:model/GetCommerceInner} The populated GetCommerceInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetCommerceInner(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('is_cart_enabled')) { - obj['is_cart_enabled'] = ApiClient.convertToType(data['is_cart_enabled'], 'Boolean'); - } - if (data.hasOwnProperty('is_catalog_visible')) { - obj['is_catalog_visible'] = ApiClient.convertToType(data['is_catalog_visible'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetCommerceInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetCommerceInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - - return true; - } - - -} - - - -/** - * @member {String} id - */ -GetCommerceInner.prototype['id'] = undefined; - -/** - * @member {Boolean} is_cart_enabled - */ -GetCommerceInner.prototype['is_cart_enabled'] = undefined; - -/** - * @member {Boolean} is_catalog_visible - */ -GetCommerceInner.prototype['is_catalog_visible'] = undefined; - - - - - - -export default GetCommerceInner; - diff --git a/js/src/model/GetIP.js b/js/src/model/GetIP.js deleted file mode 100644 index 0bb0cce..0000000 --- a/js/src/model/GetIP.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The GetIP model module. - * @module model/GetIP - * @version 2.39.0 - */ -class GetIP { - /** - * Constructs a new GetIP. - * @alias module:model/GetIP - */ - constructor() { - - GetIP.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetIP from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetIP} obj Optional instance to populate. - * @return {module:model/GetIP} The populated GetIP instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetIP(); - - if (data.hasOwnProperty('result')) { - obj['result'] = ApiClient.convertToType(data['result'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetIP. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetIP. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['result'] && !(typeof data['result'] === 'string' || data['result'] instanceof String)) { - throw new Error("Expected the field `result` to be a primitive type in the JSON string but got " + data['result']); - } - - return true; - } - - -} - - - -/** - * @member {String} result - */ -GetIP.prototype['result'] = undefined; - - - - - - -export default GetIP; - diff --git a/js/src/model/GetMe.js b/js/src/model/GetMe.js deleted file mode 100644 index 34e6e8d..0000000 --- a/js/src/model/GetMe.js +++ /dev/null @@ -1,315 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import MeComponents from './MeComponents'; - -/** - * The GetMe model module. - * @module model/GetMe - * @version 2.39.0 - */ -class GetMe { - /** - * Constructs a new GetMe. - * @alias module:model/GetMe - * @implements module:model/MeComponents - */ - constructor() { - MeComponents.initialize(this); - GetMe.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetMe from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetMe} obj Optional instance to populate. - * @return {module:model/GetMe} The populated GetMe instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetMe(); - MeComponents.constructFromObject(data, obj); - - if (data.hasOwnProperty('about')) { - obj['about'] = ApiClient.convertToType(data['about'], 'String'); - } - if (data.hasOwnProperty('address')) { - obj['address'] = ApiClient.convertToType(data['address'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - if (data.hasOwnProperty('email')) { - obj['email'] = ApiClient.convertToType(data['email'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'String'); - } - if (data.hasOwnProperty('vertical')) { - obj['vertical'] = ApiClient.convertToType(data['vertical'], 'String'); - } - if (data.hasOwnProperty('photo')) { - obj['photo'] = ApiClient.convertToType(data['photo'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetMe. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetMe. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['about'] && !(typeof data['about'] === 'string' || data['about'] instanceof String)) { - throw new Error("Expected the field `about` to be a primitive type in the JSON string but got " + data['about']); - } - // ensure the json data is a string - if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) { - throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']); - } - // ensure the json data is a string - if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { - throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); - } - // ensure the json data is a string - if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { - throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); - } - // ensure the json data is a string - if (data['phone'] && !(typeof data['phone'] === 'string' || data['phone'] instanceof String)) { - throw new Error("Expected the field `phone` to be a primitive type in the JSON string but got " + data['phone']); - } - // ensure the json data is a string - if (data['vertical'] && !(typeof data['vertical'] === 'string' || data['vertical'] instanceof String)) { - throw new Error("Expected the field `vertical` to be a primitive type in the JSON string but got " + data['vertical']); - } - // ensure the json data is a string - if (data['photo'] && !(typeof data['photo'] === 'string' || data['photo'] instanceof String)) { - throw new Error("Expected the field `photo` to be a primitive type in the JSON string but got " + data['photo']); - } - - return true; - } - - -} - - - -/** - * Profile`s About section. - * @member {String} about - */ -GetMe.prototype['about'] = undefined; - -/** - * Address of the business - * @member {String} address - */ -GetMe.prototype['address'] = undefined; - -/** - * Description of the business. Max 256 characters - * @member {String} description - */ -GetMe.prototype['description'] = undefined; - -/** - * Business email - * @member {String} email - */ -GetMe.prototype['email'] = undefined; - -/** - * Linked phone number - * @member {String} phone - */ -GetMe.prototype['phone'] = undefined; - -/** - * Industry of the business - * @member {module:model/GetMe.VerticalEnum} vertical - */ -GetMe.prototype['vertical'] = undefined; - -/** - * @member {String} photo - */ -GetMe.prototype['photo'] = undefined; - - -// Implement MeComponents interface: -/** - * Profile`s About section. - * @member {String} about - */ -MeComponents.prototype['about'] = undefined; -/** - * Address of the business - * @member {String} address - */ -MeComponents.prototype['address'] = undefined; -/** - * Description of the business. Max 256 characters - * @member {String} description - */ -MeComponents.prototype['description'] = undefined; -/** - * Business email - * @member {String} email - */ -MeComponents.prototype['email'] = undefined; -/** - * Linked phone number - * @member {String} phone - */ -MeComponents.prototype['phone'] = undefined; -/** - * Industry of the business - * @member {module:model/MeComponents.VerticalEnum} vertical - */ -MeComponents.prototype['vertical'] = undefined; -/** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @member {String} photo - */ -MeComponents.prototype['photo'] = undefined; - - - -/** - * Allowed values for the vertical property. - * @enum {String} - * @readonly - */ -GetMe['VerticalEnum'] = { - - /** - * value: "Automotive" - * @const - */ - "Automotive": "Automotive", - - /** - * value: "Beauty, Spa and Salon" - * @const - */ - "Beauty, Spa and Salon": "Beauty, Spa and Salon", - - /** - * value: "Clothing and Apparel" - * @const - */ - "Clothing and Apparel": "Clothing and Apparel", - - /** - * value: "Education" - * @const - */ - "Education": "Education", - - /** - * value: "Entertainment" - * @const - */ - "Entertainment": "Entertainment", - - /** - * value: "Event Planning and Service" - * @const - */ - "Event Planning and Service": "Event Planning and Service", - - /** - * value: "Finance and Banking" - * @const - */ - "Finance and Banking": "Finance and Banking", - - /** - * value: "Food and Grocery" - * @const - */ - "Food and Grocery": "Food and Grocery", - - /** - * value: "Public Service" - * @const - */ - "Public Service": "Public Service", - - /** - * value: "Hotel and Lodging" - * @const - */ - "Hotel and Lodging": "Hotel and Lodging", - - /** - * value: "Medical and Health" - * @const - */ - "Medical and Health": "Medical and Health", - - /** - * value: "Non-profit" - * @const - */ - "Non-profit": "Non-profit", - - /** - * value: "Professional Services" - * @const - */ - "Professional Services": "Professional Services", - - /** - * value: "Shopping and Retail" - * @const - */ - "Shopping and Retail": "Shopping and Retail", - - /** - * value: "Travel and Transportation" - * @const - */ - "Travel and Transportation": "Travel and Transportation", - - /** - * value: "Restaurant" - * @const - */ - "Restaurant": "Restaurant", - - /** - * value: "Other" - * @const - */ - "Other": "Other" -}; - - - -export default GetMe; - diff --git a/js/src/model/GetMe401Response.js b/js/src/model/GetMe401Response.js deleted file mode 100644 index 86f375e..0000000 --- a/js/src/model/GetMe401Response.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The GetMe401Response model module. - * @module model/GetMe401Response - * @version 2.39.0 - */ -class GetMe401Response { - /** - * Constructs a new GetMe401Response. - * @alias module:model/GetMe401Response - */ - constructor() { - - GetMe401Response.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetMe401Response from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetMe401Response} obj Optional instance to populate. - * @return {module:model/GetMe401Response} The populated GetMe401Response instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetMe401Response(); - - if (data.hasOwnProperty('error')) { - obj['error'] = ApiClient.convertToType(data['error'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetMe401Response. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetMe401Response. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) { - throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']); - } - - return true; - } - - -} - - - -/** - * @member {String} error - */ -GetMe401Response.prototype['error'] = undefined; - - - - - - -export default GetMe401Response; - diff --git a/js/src/model/GetMessages.js b/js/src/model/GetMessages.js deleted file mode 100644 index b20a6bc..0000000 --- a/js/src/model/GetMessages.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import GetMessagesMessagesInner from './GetMessagesMessagesInner'; - -/** - * The GetMessages model module. - * @module model/GetMessages - * @version 2.39.0 - */ -class GetMessages { - /** - * Constructs a new GetMessages. - * @alias module:model/GetMessages - */ - constructor() { - - GetMessages.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetMessages from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetMessages} obj Optional instance to populate. - * @return {module:model/GetMessages} The populated GetMessages instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetMessages(); - - if (data.hasOwnProperty('messages')) { - obj['messages'] = ApiClient.convertToType(data['messages'], [GetMessagesMessagesInner]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetMessages. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetMessages. - */ - static validateJSON(data) { - if (data['messages']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['messages'])) { - throw new Error("Expected the field `messages` to be an array in the JSON data but got " + data['messages']); - } - // validate the optional field `messages` (array) - for (const item of data['messages']) { - GetMessagesMessagesInner.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * @member {Array.} messages - */ -GetMessages.prototype['messages'] = undefined; - - - - - - -export default GetMessages; - diff --git a/js/src/model/GetMessagesMessagesInner.js b/js/src/model/GetMessagesMessagesInner.js deleted file mode 100644 index 79471a6..0000000 --- a/js/src/model/GetMessagesMessagesInner.js +++ /dev/null @@ -1,231 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The GetMessagesMessagesInner model module. - * @module model/GetMessagesMessagesInner - * @version 2.39.0 - */ -class GetMessagesMessagesInner { - /** - * Constructs a new GetMessagesMessagesInner. - * @alias module:model/GetMessagesMessagesInner - */ - constructor() { - - GetMessagesMessagesInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetMessagesMessagesInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetMessagesMessagesInner} obj Optional instance to populate. - * @return {module:model/GetMessagesMessagesInner} The populated GetMessagesMessagesInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetMessagesMessagesInner(); - - if (data.hasOwnProperty('messageNumber')) { - obj['messageNumber'] = ApiClient.convertToType(data['messageNumber'], 'Number'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - if (data.hasOwnProperty('fromMe')) { - obj['fromMe'] = ApiClient.convertToType(data['fromMe'], 'Boolean'); - } - if (data.hasOwnProperty('self')) { - obj['self'] = ApiClient.convertToType(data['self'], 'Number'); - } - if (data.hasOwnProperty('isForwarded')) { - obj['isForwarded'] = ApiClient.convertToType(data['isForwarded'], 'Number'); - } - if (data.hasOwnProperty('author')) { - obj['author'] = ApiClient.convertToType(data['author'], 'String'); - } - if (data.hasOwnProperty('time')) { - obj['time'] = ApiClient.convertToType(data['time'], 'Number'); - } - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('senderName')) { - obj['senderName'] = ApiClient.convertToType(data['senderName'], 'String'); - } - if (data.hasOwnProperty('caption')) { - obj['caption'] = ApiClient.convertToType(data['caption'], 'String'); - } - if (data.hasOwnProperty('quotedMsgId')) { - obj['quotedMsgId'] = ApiClient.convertToType(data['quotedMsgId'], 'String'); - } - if (data.hasOwnProperty('metadata')) { - obj['metadata'] = ApiClient.convertToType(data['metadata'], Object); - } - if (data.hasOwnProperty('chatName')) { - obj['chatName'] = ApiClient.convertToType(data['chatName'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetMessagesMessagesInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetMessagesMessagesInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - // ensure the json data is a string - if (data['author'] && !(typeof data['author'] === 'string' || data['author'] instanceof String)) { - throw new Error("Expected the field `author` to be a primitive type in the JSON string but got " + data['author']); - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['senderName'] && !(typeof data['senderName'] === 'string' || data['senderName'] instanceof String)) { - throw new Error("Expected the field `senderName` to be a primitive type in the JSON string but got " + data['senderName']); - } - // ensure the json data is a string - if (data['caption'] && !(typeof data['caption'] === 'string' || data['caption'] instanceof String)) { - throw new Error("Expected the field `caption` to be a primitive type in the JSON string but got " + data['caption']); - } - // ensure the json data is a string - if (data['quotedMsgId'] && !(typeof data['quotedMsgId'] === 'string' || data['quotedMsgId'] instanceof String)) { - throw new Error("Expected the field `quotedMsgId` to be a primitive type in the JSON string but got " + data['quotedMsgId']); - } - // ensure the json data is a string - if (data['chatName'] && !(typeof data['chatName'] === 'string' || data['chatName'] instanceof String)) { - throw new Error("Expected the field `chatName` to be a primitive type in the JSON string but got " + data['chatName']); - } - - return true; - } - - -} - - - -/** - * @member {Number} messageNumber - */ -GetMessagesMessagesInner.prototype['messageNumber'] = undefined; - -/** - * @member {String} id - */ -GetMessagesMessagesInner.prototype['id'] = undefined; - -/** - * @member {String} body - */ -GetMessagesMessagesInner.prototype['body'] = undefined; - -/** - * @member {Boolean} fromMe - */ -GetMessagesMessagesInner.prototype['fromMe'] = undefined; - -/** - * @member {Number} self - */ -GetMessagesMessagesInner.prototype['self'] = undefined; - -/** - * @member {Number} isForwarded - */ -GetMessagesMessagesInner.prototype['isForwarded'] = undefined; - -/** - * @member {String} author - */ -GetMessagesMessagesInner.prototype['author'] = undefined; - -/** - * @member {Number} time - */ -GetMessagesMessagesInner.prototype['time'] = undefined; - -/** - * @member {String} chatId - */ -GetMessagesMessagesInner.prototype['chatId'] = undefined; - -/** - * @member {String} type - */ -GetMessagesMessagesInner.prototype['type'] = undefined; - -/** - * @member {String} senderName - */ -GetMessagesMessagesInner.prototype['senderName'] = undefined; - -/** - * @member {String} caption - */ -GetMessagesMessagesInner.prototype['caption'] = undefined; - -/** - * @member {String} quotedMsgId - */ -GetMessagesMessagesInner.prototype['quotedMsgId'] = undefined; - -/** - * @member {Object} metadata - */ -GetMessagesMessagesInner.prototype['metadata'] = undefined; - -/** - * @member {String} chatName - */ -GetMessagesMessagesInner.prototype['chatName'] = undefined; - - - - - - -export default GetMessagesMessagesInner; - diff --git a/js/src/model/GetTemplates.js b/js/src/model/GetTemplates.js deleted file mode 100644 index 58039e0..0000000 --- a/js/src/model/GetTemplates.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import GetTemplatesTemplatesInner from './GetTemplatesTemplatesInner'; - -/** - * The GetTemplates model module. - * @module model/GetTemplates - * @version 2.39.0 - */ -class GetTemplates { - /** - * Constructs a new GetTemplates. - * @alias module:model/GetTemplates - */ - constructor() { - - GetTemplates.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetTemplates from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetTemplates} obj Optional instance to populate. - * @return {module:model/GetTemplates} The populated GetTemplates instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetTemplates(); - - if (data.hasOwnProperty('total')) { - obj['total'] = ApiClient.convertToType(data['total'], 'Number'); - } - if (data.hasOwnProperty('templates')) { - obj['templates'] = ApiClient.convertToType(data['templates'], [GetTemplatesTemplatesInner]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetTemplates. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetTemplates. - */ - static validateJSON(data) { - if (data['templates']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['templates'])) { - throw new Error("Expected the field `templates` to be an array in the JSON data but got " + data['templates']); - } - // validate the optional field `templates` (array) - for (const item of data['templates']) { - GetTemplatesTemplatesInner.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * @member {Number} total - */ -GetTemplates.prototype['total'] = undefined; - -/** - * @member {Array.} templates - */ -GetTemplates.prototype['templates'] = undefined; - - - - - - -export default GetTemplates; - diff --git a/js/src/model/GetTemplatesTemplatesInner.js b/js/src/model/GetTemplatesTemplatesInner.js deleted file mode 100644 index 2a74142..0000000 --- a/js/src/model/GetTemplatesTemplatesInner.js +++ /dev/null @@ -1,151 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import TemplateCategoryProp from './TemplateCategoryProp'; -import TemplateComponentsProp from './TemplateComponentsProp'; -import TemplateLanguageProp from './TemplateLanguageProp'; - -/** - * The GetTemplatesTemplatesInner model module. - * @module model/GetTemplatesTemplatesInner - * @version 2.39.0 - */ -class GetTemplatesTemplatesInner { - /** - * Constructs a new GetTemplatesTemplatesInner. - * @alias module:model/GetTemplatesTemplatesInner - */ - constructor() { - - GetTemplatesTemplatesInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GetTemplatesTemplatesInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetTemplatesTemplatesInner} obj Optional instance to populate. - * @return {module:model/GetTemplatesTemplatesInner} The populated GetTemplatesTemplatesInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetTemplatesTemplatesInner(); - - if (data.hasOwnProperty('category')) { - obj['category'] = TemplateCategoryProp.constructFromObject(data['category']); - } - if (data.hasOwnProperty('components')) { - obj['components'] = TemplateComponentsProp.constructFromObject(data['components']); - } - if (data.hasOwnProperty('language')) { - obj['language'] = TemplateLanguageProp.constructFromObject(data['language']); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('namespace')) { - obj['namespace'] = ApiClient.convertToType(data['namespace'], 'String'); - } - if (data.hasOwnProperty('rejected_reason')) { - obj['rejected_reason'] = ApiClient.convertToType(data['rejected_reason'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GetTemplatesTemplatesInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GetTemplatesTemplatesInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - // ensure the json data is a string - if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) { - throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']); - } - // ensure the json data is a string - if (data['rejected_reason'] && !(typeof data['rejected_reason'] === 'string' || data['rejected_reason'] instanceof String)) { - throw new Error("Expected the field `rejected_reason` to be a primitive type in the JSON string but got " + data['rejected_reason']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - - return true; - } - - -} - - - -/** - * @member {module:model/TemplateCategoryProp} category - */ -GetTemplatesTemplatesInner.prototype['category'] = undefined; - -/** - * @member {module:model/TemplateComponentsProp} components - */ -GetTemplatesTemplatesInner.prototype['components'] = undefined; - -/** - * @member {module:model/TemplateLanguageProp} language - */ -GetTemplatesTemplatesInner.prototype['language'] = undefined; - -/** - * @member {String} name - */ -GetTemplatesTemplatesInner.prototype['name'] = undefined; - -/** - * Can be found by method /templates - * @member {String} namespace - */ -GetTemplatesTemplatesInner.prototype['namespace'] = undefined; - -/** - * @member {String} rejected_reason - */ -GetTemplatesTemplatesInner.prototype['rejected_reason'] = undefined; - -/** - * @member {String} status - */ -GetTemplatesTemplatesInner.prototype['status'] = undefined; - - - - - - -export default GetTemplatesTemplatesInner; - diff --git a/js/src/model/MeComponents.js b/js/src/model/MeComponents.js deleted file mode 100644 index f21d662..0000000 --- a/js/src/model/MeComponents.js +++ /dev/null @@ -1,277 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The MeComponents model module. - * @module model/MeComponents - * @version 2.39.0 - */ -class MeComponents { - /** - * Constructs a new MeComponents. - * @alias module:model/MeComponents - */ - constructor() { - - MeComponents.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a MeComponents from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MeComponents} obj Optional instance to populate. - * @return {module:model/MeComponents} The populated MeComponents instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new MeComponents(); - - if (data.hasOwnProperty('about')) { - obj['about'] = ApiClient.convertToType(data['about'], 'String'); - } - if (data.hasOwnProperty('address')) { - obj['address'] = ApiClient.convertToType(data['address'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - if (data.hasOwnProperty('email')) { - obj['email'] = ApiClient.convertToType(data['email'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'String'); - } - if (data.hasOwnProperty('vertical')) { - obj['vertical'] = ApiClient.convertToType(data['vertical'], 'String'); - } - if (data.hasOwnProperty('photo')) { - obj['photo'] = ApiClient.convertToType(data['photo'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to MeComponents. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to MeComponents. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['about'] && !(typeof data['about'] === 'string' || data['about'] instanceof String)) { - throw new Error("Expected the field `about` to be a primitive type in the JSON string but got " + data['about']); - } - // ensure the json data is a string - if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) { - throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']); - } - // ensure the json data is a string - if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { - throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); - } - // ensure the json data is a string - if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { - throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); - } - // ensure the json data is a string - if (data['phone'] && !(typeof data['phone'] === 'string' || data['phone'] instanceof String)) { - throw new Error("Expected the field `phone` to be a primitive type in the JSON string but got " + data['phone']); - } - // ensure the json data is a string - if (data['vertical'] && !(typeof data['vertical'] === 'string' || data['vertical'] instanceof String)) { - throw new Error("Expected the field `vertical` to be a primitive type in the JSON string but got " + data['vertical']); - } - // ensure the json data is a string - if (data['photo'] && !(typeof data['photo'] === 'string' || data['photo'] instanceof String)) { - throw new Error("Expected the field `photo` to be a primitive type in the JSON string but got " + data['photo']); - } - - return true; - } - - -} - - - -/** - * Profile`s About section. - * @member {String} about - */ -MeComponents.prototype['about'] = undefined; - -/** - * Address of the business - * @member {String} address - */ -MeComponents.prototype['address'] = undefined; - -/** - * Description of the business. Max 256 characters - * @member {String} description - */ -MeComponents.prototype['description'] = undefined; - -/** - * Business email - * @member {String} email - */ -MeComponents.prototype['email'] = undefined; - -/** - * Linked phone number - * @member {String} phone - */ -MeComponents.prototype['phone'] = undefined; - -/** - * Industry of the business - * @member {module:model/MeComponents.VerticalEnum} vertical - */ -MeComponents.prototype['vertical'] = undefined; - -/** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @member {String} photo - */ -MeComponents.prototype['photo'] = undefined; - - - - - -/** - * Allowed values for the vertical property. - * @enum {String} - * @readonly - */ -MeComponents['VerticalEnum'] = { - - /** - * value: "Automotive" - * @const - */ - "Automotive": "Automotive", - - /** - * value: "Beauty, Spa and Salon" - * @const - */ - "Beauty, Spa and Salon": "Beauty, Spa and Salon", - - /** - * value: "Clothing and Apparel" - * @const - */ - "Clothing and Apparel": "Clothing and Apparel", - - /** - * value: "Education" - * @const - */ - "Education": "Education", - - /** - * value: "Entertainment" - * @const - */ - "Entertainment": "Entertainment", - - /** - * value: "Event Planning and Service" - * @const - */ - "Event Planning and Service": "Event Planning and Service", - - /** - * value: "Finance and Banking" - * @const - */ - "Finance and Banking": "Finance and Banking", - - /** - * value: "Food and Grocery" - * @const - */ - "Food and Grocery": "Food and Grocery", - - /** - * value: "Public Service" - * @const - */ - "Public Service": "Public Service", - - /** - * value: "Hotel and Lodging" - * @const - */ - "Hotel and Lodging": "Hotel and Lodging", - - /** - * value: "Medical and Health" - * @const - */ - "Medical and Health": "Medical and Health", - - /** - * value: "Non-profit" - * @const - */ - "Non-profit": "Non-profit", - - /** - * value: "Professional Services" - * @const - */ - "Professional Services": "Professional Services", - - /** - * value: "Shopping and Retail" - * @const - */ - "Shopping and Retail": "Shopping and Retail", - - /** - * value: "Travel and Transportation" - * @const - */ - "Travel and Transportation": "Travel and Transportation", - - /** - * value: "Restaurant" - * @const - */ - "Restaurant": "Restaurant", - - /** - * value: "Other" - * @const - */ - "Other": "Other" -}; - - - -export default MeComponents; - diff --git a/js/src/model/MediaId.js b/js/src/model/MediaId.js deleted file mode 100644 index 2d79898..0000000 --- a/js/src/model/MediaId.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The MediaId model module. - * @module model/MediaId - * @version 2.39.0 - */ -class MediaId { - /** - * Constructs a new MediaId. - * @alias module:model/MediaId - */ - constructor() { - - MediaId.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a MediaId from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MediaId} obj Optional instance to populate. - * @return {module:model/MediaId} The populated MediaId instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new MediaId(); - - if (data.hasOwnProperty('mediaId')) { - obj['mediaId'] = ApiClient.convertToType(data['mediaId'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to MediaId. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to MediaId. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['mediaId'] && !(typeof data['mediaId'] === 'string' || data['mediaId'] instanceof String)) { - throw new Error("Expected the field `mediaId` to be a primitive type in the JSON string but got " + data['mediaId']); - } - - return true; - } - - -} - - - -/** - * @member {String} mediaId - */ -MediaId.prototype['mediaId'] = undefined; - - - - - - -export default MediaId; - diff --git a/js/src/model/Message.js b/js/src/model/Message.js deleted file mode 100644 index 9f0a5c3..0000000 --- a/js/src/model/Message.js +++ /dev/null @@ -1,272 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Message model module. - * @module model/Message - * @version 2.39.0 - */ -class Message { - /** - * Constructs a new Message. - * @alias module:model/Message - */ - constructor() { - - Message.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Message from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Message} obj Optional instance to populate. - * @return {module:model/Message} The populated Message instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Message(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - if (data.hasOwnProperty('fromMe')) { - obj['fromMe'] = ApiClient.convertToType(data['fromMe'], 'Boolean'); - } - if (data.hasOwnProperty('self')) { - obj['self'] = ApiClient.convertToType(data['self'], 'Number'); - } - if (data.hasOwnProperty('isForwarded')) { - obj['isForwarded'] = ApiClient.convertToType(data['isForwarded'], 'Boolean'); - } - if (data.hasOwnProperty('author')) { - obj['author'] = ApiClient.convertToType(data['author'], 'String'); - } - if (data.hasOwnProperty('time')) { - obj['time'] = ApiClient.convertToType(data['time'], 'Number'); - } - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('senderName')) { - obj['senderName'] = ApiClient.convertToType(data['senderName'], 'String'); - } - if (data.hasOwnProperty('caption')) { - obj['caption'] = ApiClient.convertToType(data['caption'], 'String'); - } - if (data.hasOwnProperty('quotedMsgId')) { - obj['quotedMsgId'] = ApiClient.convertToType(data['quotedMsgId'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Message. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Message. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - // ensure the json data is a string - if (data['author'] && !(typeof data['author'] === 'string' || data['author'] instanceof String)) { - throw new Error("Expected the field `author` to be a primitive type in the JSON string but got " + data['author']); - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['senderName'] && !(typeof data['senderName'] === 'string' || data['senderName'] instanceof String)) { - throw new Error("Expected the field `senderName` to be a primitive type in the JSON string but got " + data['senderName']); - } - // ensure the json data is a string - if (data['caption'] && !(typeof data['caption'] === 'string' || data['caption'] instanceof String)) { - throw new Error("Expected the field `caption` to be a primitive type in the JSON string but got " + data['caption']); - } - // ensure the json data is a string - if (data['quotedMsgId'] && !(typeof data['quotedMsgId'] === 'string' || data['quotedMsgId'] instanceof String)) { - throw new Error("Expected the field `quotedMsgId` to be a primitive type in the JSON string but got " + data['quotedMsgId']); - } - - return true; - } - - -} - - - -/** - * unique id - * @member {String} id - */ -Message.prototype['id'] = undefined; - -/** - * text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" - * @member {String} body - */ -Message.prototype['body'] = undefined; - -/** - * true - outgoing, false - incoming - * @member {Boolean} fromMe - */ -Message.prototype['fromMe'] = undefined; - -/** - * 1 - generated by api, 0 - generated by app - * @member {Number} self - */ -Message.prototype['self'] = undefined; - -/** - * true - forwarded message, false - direct message - * @member {Boolean} isForwarded - */ -Message.prototype['isForwarded'] = undefined; - -/** - * Author ID of the message - * @member {String} author - */ -Message.prototype['author'] = undefined; - -/** - * send time, unix timestamp - * @member {Number} time - */ -Message.prototype['time'] = undefined; - -/** - * chat ID - * @member {String} chatId - */ -Message.prototype['chatId'] = undefined; - -/** - * type of the message - * @member {module:model/Message.TypeEnum} type - */ -Message.prototype['type'] = undefined; - -/** - * Sender name - * @member {String} senderName - */ -Message.prototype['senderName'] = undefined; - -/** - * File caption or filename - * @member {String} caption - */ -Message.prototype['caption'] = undefined; - -/** - * ID of quoted message - * @member {String} quotedMsgId - */ -Message.prototype['quotedMsgId'] = undefined; - - - - - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -Message['TypeEnum'] = { - - /** - * value: "chat" - * @const - */ - "chat": "chat", - - /** - * value: "interactive" - * @const - */ - "interactive": "interactive", - - /** - * value: "image" - * @const - */ - "image": "image", - - /** - * value: "video" - * @const - */ - "video": "video", - - /** - * value: "document" - * @const - */ - "document": "document", - - /** - * value: "audio" - * @const - */ - "audio": "audio", - - /** - * value: "sticker" - * @const - */ - "sticker": "sticker", - - /** - * value: "voice" - * @const - */ - "voice": "voice" -}; - - - -export default Message; - diff --git a/js/src/model/MessageIdProp.js b/js/src/model/MessageIdProp.js deleted file mode 100644 index f79ab69..0000000 --- a/js/src/model/MessageIdProp.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The MessageIdProp model module. - * @module model/MessageIdProp - * @version 2.39.0 - */ -class MessageIdProp { - /** - * Constructs a new MessageIdProp. - * @alias module:model/MessageIdProp - */ - constructor() { - - MessageIdProp.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a MessageIdProp from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MessageIdProp} obj Optional instance to populate. - * @return {module:model/MessageIdProp} The populated MessageIdProp instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new MessageIdProp(); - - if (data.hasOwnProperty('messageId')) { - obj['messageId'] = ApiClient.convertToType(data['messageId'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to MessageIdProp. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to MessageIdProp. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['messageId'] && !(typeof data['messageId'] === 'string' || data['messageId'] instanceof String)) { - throw new Error("Expected the field `messageId` to be a primitive type in the JSON string but got " + data['messageId']); - } - - return true; - } - - -} - - - -/** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @member {String} messageId - */ -MessageIdProp.prototype['messageId'] = undefined; - - - - - - -export default MessageIdProp; - diff --git a/js/src/model/PhoneProp.js b/js/src/model/PhoneProp.js deleted file mode 100644 index 6561563..0000000 --- a/js/src/model/PhoneProp.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The PhoneProp model module. - * @module model/PhoneProp - * @version 2.39.0 - */ -class PhoneProp { - /** - * Constructs a new PhoneProp. - * @alias module:model/PhoneProp - */ - constructor() { - - PhoneProp.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a PhoneProp from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/PhoneProp} obj Optional instance to populate. - * @return {module:model/PhoneProp} The populated PhoneProp instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new PhoneProp(); - - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to PhoneProp. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to PhoneProp. - */ - static validateJSON(data) { - - return true; - } - - -} - - - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - - - -export default PhoneProp; - diff --git a/js/src/model/ReadMessageRequest.js b/js/src/model/ReadMessageRequest.js deleted file mode 100644 index 8806d25..0000000 --- a/js/src/model/ReadMessageRequest.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import MessageIdProp from './MessageIdProp'; - -/** - * The ReadMessageRequest model module. - * @module model/ReadMessageRequest - * @version 2.39.0 - */ -class ReadMessageRequest { - /** - * Constructs a new ReadMessageRequest. - * @alias module:model/ReadMessageRequest - * @implements module:model/MessageIdProp - */ - constructor() { - MessageIdProp.initialize(this); - ReadMessageRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ReadMessageRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ReadMessageRequest} obj Optional instance to populate. - * @return {module:model/ReadMessageRequest} The populated ReadMessageRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ReadMessageRequest(); - MessageIdProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('messageId')) { - obj['messageId'] = ApiClient.convertToType(data['messageId'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ReadMessageRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ReadMessageRequest. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['messageId'] && !(typeof data['messageId'] === 'string' || data['messageId'] instanceof String)) { - throw new Error("Expected the field `messageId` to be a primitive type in the JSON string but got " + data['messageId']); - } - - return true; - } - - -} - - - -/** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @member {String} messageId - */ -ReadMessageRequest.prototype['messageId'] = undefined; - - -// Implement MessageIdProp interface: -/** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @member {String} messageId - */ -MessageIdProp.prototype['messageId'] = undefined; - - - - -export default ReadMessageRequest; - diff --git a/js/src/model/RemoveTemplateRequest.js b/js/src/model/RemoveTemplateRequest.js deleted file mode 100644 index b4bcd24..0000000 --- a/js/src/model/RemoveTemplateRequest.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The RemoveTemplateRequest model module. - * @module model/RemoveTemplateRequest - * @version 2.39.0 - */ -class RemoveTemplateRequest { - /** - * Constructs a new RemoveTemplateRequest. - * @alias module:model/RemoveTemplateRequest - */ - constructor() { - - RemoveTemplateRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a RemoveTemplateRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RemoveTemplateRequest} obj Optional instance to populate. - * @return {module:model/RemoveTemplateRequest} The populated RemoveTemplateRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new RemoveTemplateRequest(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to RemoveTemplateRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to RemoveTemplateRequest. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - - return true; - } - - -} - - - -/** - * Template name - * @member {String} name - */ -RemoveTemplateRequest.prototype['name'] = undefined; - - - - - - -export default RemoveTemplateRequest; - diff --git a/js/src/model/SendContactRequest.js b/js/src/model/SendContactRequest.js deleted file mode 100644 index ceade4b..0000000 --- a/js/src/model/SendContactRequest.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; - -/** - * The SendContactRequest model module. - * @module model/SendContactRequest - * @version 2.39.0 - */ -class SendContactRequest { - /** - * Constructs a new SendContactRequest. - * @alias module:model/SendContactRequest - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - */ - constructor() { - ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendContactRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendContactRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendContactRequest} obj Optional instance to populate. - * @return {module:model/SendContactRequest} The populated SendContactRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendContactRequest(); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('contacts')) { - obj['contacts'] = ApiClient.convertToType(data['contacts'], [Object]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendContactRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendContactRequest. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is an array - if (!Array.isArray(data['contacts'])) { - throw new Error("Expected the field `contacts` to be an array in the JSON data but got " + data['contacts']); - } - - return true; - } - - -} - - - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendContactRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendContactRequest.prototype['phone'] = undefined; - -/** - * Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] - * @member {Array.} contacts - */ -SendContactRequest.prototype['contacts'] = undefined; - - -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendContactRequest; - diff --git a/js/src/model/SendFileRequest.js b/js/src/model/SendFileRequest.js deleted file mode 100644 index 028dc7c..0000000 --- a/js/src/model/SendFileRequest.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; - -/** - * The SendFileRequest model module. - * @module model/SendFileRequest - * @version 2.39.0 - */ -class SendFileRequest { - /** - * Constructs a new SendFileRequest. - * @alias module:model/SendFileRequest - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - * @param body {String} HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @param filename {String} File name, for *example 1.jpg* or *hello.xlsx* - */ - constructor(body, filename) { - ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendFileRequest.initialize(this, body, filename); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, body, filename) { - obj['body'] = body; - obj['filename'] = filename; - } - - /** - * Constructs a SendFileRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendFileRequest} obj Optional instance to populate. - * @return {module:model/SendFileRequest} The populated SendFileRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendFileRequest(); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = ApiClient.convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('caption')) { - obj['caption'] = ApiClient.convertToType(data['caption'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendFileRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendFileRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendFileRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - // ensure the json data is a string - if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) { - throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']); - } - // ensure the json data is a string - if (data['caption'] && !(typeof data['caption'] === 'string' || data['caption'] instanceof String)) { - throw new Error("Expected the field `caption` to be a primitive type in the JSON string but got " + data['caption']); - } - - return true; - } - - -} - -SendFileRequest.RequiredProperties = ["body", "filename"]; - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendFileRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendFileRequest.prototype['phone'] = undefined; - -/** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @member {String} body - */ -SendFileRequest.prototype['body'] = undefined; - -/** - * File name, for *example 1.jpg* or *hello.xlsx* - * @member {String} filename - */ -SendFileRequest.prototype['filename'] = undefined; - -/** - * Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - * @member {String} caption - */ -SendFileRequest.prototype['caption'] = undefined; - - -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendFileRequest; - diff --git a/js/src/model/SendListRequest.js b/js/src/model/SendListRequest.js deleted file mode 100644 index ad92679..0000000 --- a/js/src/model/SendListRequest.js +++ /dev/null @@ -1,199 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; -import SendListRequestAllOfSections from './SendListRequestAllOfSections'; - -/** - * The SendListRequest model module. - * @module model/SendListRequest - * @version 2.39.0 - */ -class SendListRequest { - /** - * Constructs a new SendListRequest. - * @alias module:model/SendListRequest - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - * @param body {String} Main message text - * @param action {String} Action for open list - * @param sections {Array.} Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] - */ - constructor(body, action, sections) { - ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendListRequest.initialize(this, body, action, sections); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, body, action, sections) { - obj['body'] = body; - obj['action'] = action; - obj['sections'] = sections; - } - - /** - * Constructs a SendListRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendListRequest} obj Optional instance to populate. - * @return {module:model/SendListRequest} The populated SendListRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendListRequest(); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - if (data.hasOwnProperty('header')) { - obj['header'] = ApiClient.convertToType(data['header'], 'String'); - } - if (data.hasOwnProperty('footer')) { - obj['footer'] = ApiClient.convertToType(data['footer'], 'String'); - } - if (data.hasOwnProperty('action')) { - obj['action'] = ApiClient.convertToType(data['action'], 'String'); - } - if (data.hasOwnProperty('sections')) { - obj['sections'] = ApiClient.convertToType(data['sections'], [SendListRequestAllOfSections]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendListRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendListRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendListRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - // ensure the json data is a string - if (data['header'] && !(typeof data['header'] === 'string' || data['header'] instanceof String)) { - throw new Error("Expected the field `header` to be a primitive type in the JSON string but got " + data['header']); - } - // ensure the json data is a string - if (data['footer'] && !(typeof data['footer'] === 'string' || data['footer'] instanceof String)) { - throw new Error("Expected the field `footer` to be a primitive type in the JSON string but got " + data['footer']); - } - // ensure the json data is a string - if (data['action'] && !(typeof data['action'] === 'string' || data['action'] instanceof String)) { - throw new Error("Expected the field `action` to be a primitive type in the JSON string but got " + data['action']); - } - if (data['sections']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['sections'])) { - throw new Error("Expected the field `sections` to be an array in the JSON data but got " + data['sections']); - } - // validate the optional field `sections` (array) - for (const item of data['sections']) { - SendListRequestAllOfSections.validateJSON(item); - }; - } - - return true; - } - - -} - -SendListRequest.RequiredProperties = ["body", "action", "sections"]; - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendListRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendListRequest.prototype['phone'] = undefined; - -/** - * Main message text - * @member {String} body - */ -SendListRequest.prototype['body'] = undefined; - -/** - * Header will be located above message text - * @member {String} header - */ -SendListRequest.prototype['header'] = undefined; - -/** - * Footer will be placed under message text - * @member {String} footer - */ -SendListRequest.prototype['footer'] = undefined; - -/** - * Action for open list - * @member {String} action - */ -SendListRequest.prototype['action'] = undefined; - -/** - * Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] - * @member {Array.} sections - */ -SendListRequest.prototype['sections'] = undefined; - - -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendListRequest; - diff --git a/js/src/model/SendListRequestAllOfRows.js b/js/src/model/SendListRequestAllOfRows.js deleted file mode 100644 index 6685e60..0000000 --- a/js/src/model/SendListRequestAllOfRows.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SendListRequestAllOfRows model module. - * @module model/SendListRequestAllOfRows - * @version 2.39.0 - */ -class SendListRequestAllOfRows { - /** - * Constructs a new SendListRequestAllOfRows. - * @alias module:model/SendListRequestAllOfRows - * @param id {String} Unique id for option, up to 200 symbols - * @param title {String} Title of option, up to 24 symbols. - */ - constructor(id, title) { - - SendListRequestAllOfRows.initialize(this, id, title); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, id, title) { - obj['id'] = id; - obj['title'] = title; - } - - /** - * Constructs a SendListRequestAllOfRows from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendListRequestAllOfRows} obj Optional instance to populate. - * @return {module:model/SendListRequestAllOfRows} The populated SendListRequestAllOfRows instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendListRequestAllOfRows(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('title')) { - obj['title'] = ApiClient.convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendListRequestAllOfRows. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendListRequestAllOfRows. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendListRequestAllOfRows.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) { - throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']); - } - // ensure the json data is a string - if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { - throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); - } - - return true; - } - - -} - -SendListRequestAllOfRows.RequiredProperties = ["id", "title"]; - -/** - * Unique id for option, up to 200 symbols - * @member {String} id - */ -SendListRequestAllOfRows.prototype['id'] = undefined; - -/** - * Title of option, up to 24 symbols. - * @member {String} title - */ -SendListRequestAllOfRows.prototype['title'] = undefined; - -/** - * Description of option, up to 72 symbols - * @member {String} description - */ -SendListRequestAllOfRows.prototype['description'] = undefined; - - - - - - -export default SendListRequestAllOfRows; - diff --git a/js/src/model/SendListRequestAllOfSections.js b/js/src/model/SendListRequestAllOfSections.js deleted file mode 100644 index 70feebe..0000000 --- a/js/src/model/SendListRequestAllOfSections.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import SendListRequestAllOfRows from './SendListRequestAllOfRows'; - -/** - * The SendListRequestAllOfSections model module. - * @module model/SendListRequestAllOfSections - * @version 2.39.0 - */ -class SendListRequestAllOfSections { - /** - * Constructs a new SendListRequestAllOfSections. - * @alias module:model/SendListRequestAllOfSections - * @param rows {Array.} - */ - constructor(rows) { - - SendListRequestAllOfSections.initialize(this, rows); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, rows) { - obj['rows'] = rows; - } - - /** - * Constructs a SendListRequestAllOfSections from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendListRequestAllOfSections} obj Optional instance to populate. - * @return {module:model/SendListRequestAllOfSections} The populated SendListRequestAllOfSections instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendListRequestAllOfSections(); - - if (data.hasOwnProperty('title')) { - obj['title'] = ApiClient.convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('rows')) { - obj['rows'] = ApiClient.convertToType(data['rows'], [SendListRequestAllOfRows]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendListRequestAllOfSections. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendListRequestAllOfSections. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendListRequestAllOfSections.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) { - throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']); - } - if (data['rows']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['rows'])) { - throw new Error("Expected the field `rows` to be an array in the JSON data but got " + data['rows']); - } - // validate the optional field `rows` (array) - for (const item of data['rows']) { - SendListRequestAllOfRows.validateJSON(item); - }; - } - - return true; - } - - -} - -SendListRequestAllOfSections.RequiredProperties = ["rows"]; - -/** - * Title of section, up to 24 symbols. Required if there are more then 1 section - * @member {String} title - */ -SendListRequestAllOfSections.prototype['title'] = undefined; - -/** - * @member {Array.} rows - */ -SendListRequestAllOfSections.prototype['rows'] = undefined; - - - - - - -export default SendListRequestAllOfSections; - diff --git a/js/src/model/SendLocationRequest.js b/js/src/model/SendLocationRequest.js deleted file mode 100644 index 99e64f0..0000000 --- a/js/src/model/SendLocationRequest.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; - -/** - * The SendLocationRequest model module. - * @module model/SendLocationRequest - * @version 2.39.0 - */ -class SendLocationRequest { - /** - * Constructs a new SendLocationRequest. - * @alias module:model/SendLocationRequest - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - * @param lat {String} Latitude of the location. Example: 45.018337 - * @param lng {String} Longitude of the location. Example: -73.968285 - */ - constructor(lat, lng) { - ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendLocationRequest.initialize(this, lat, lng); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, lat, lng) { - obj['lat'] = lat; - obj['lng'] = lng; - } - - /** - * Constructs a SendLocationRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendLocationRequest} obj Optional instance to populate. - * @return {module:model/SendLocationRequest} The populated SendLocationRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendLocationRequest(); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('lat')) { - obj['lat'] = ApiClient.convertToType(data['lat'], 'String'); - } - if (data.hasOwnProperty('lng')) { - obj['lng'] = ApiClient.convertToType(data['lng'], 'String'); - } - if (data.hasOwnProperty('address')) { - obj['address'] = ApiClient.convertToType(data['address'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendLocationRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendLocationRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendLocationRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['lat'] && !(typeof data['lat'] === 'string' || data['lat'] instanceof String)) { - throw new Error("Expected the field `lat` to be a primitive type in the JSON string but got " + data['lat']); - } - // ensure the json data is a string - if (data['lng'] && !(typeof data['lng'] === 'string' || data['lng'] instanceof String)) { - throw new Error("Expected the field `lng` to be a primitive type in the JSON string but got " + data['lng']); - } - // ensure the json data is a string - if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) { - throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']); - } - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - - return true; - } - - -} - -SendLocationRequest.RequiredProperties = ["lat", "lng"]; - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendLocationRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendLocationRequest.prototype['phone'] = undefined; - -/** - * Latitude of the location. Example: 45.018337 - * @member {String} lat - */ -SendLocationRequest.prototype['lat'] = undefined; - -/** - * Longitude of the location. Example: -73.968285 - * @member {String} lng - */ -SendLocationRequest.prototype['lng'] = undefined; - -/** - * Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - * @member {String} address - */ -SendLocationRequest.prototype['address'] = undefined; - -/** - * Name of the location. Example: Facebook HQ - * @member {String} name - */ -SendLocationRequest.prototype['name'] = undefined; - - -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendLocationRequest; - diff --git a/js/src/model/SendMessageRequest.js b/js/src/model/SendMessageRequest.js deleted file mode 100644 index 9b073c4..0000000 --- a/js/src/model/SendMessageRequest.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; - -/** - * The SendMessageRequest model module. - * @module model/SendMessageRequest - * @version 2.39.0 - */ -class SendMessageRequest { - /** - * Constructs a new SendMessageRequest. - * @alias module:model/SendMessageRequest - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - * @param body {String} Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - */ - constructor(body) { - ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendMessageRequest.initialize(this, body); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, body) { - obj['body'] = body; - } - - /** - * Constructs a SendMessageRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendMessageRequest} obj Optional instance to populate. - * @return {module:model/SendMessageRequest} The populated SendMessageRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendMessageRequest(); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendMessageRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendMessageRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendMessageRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - - return true; - } - - -} - -SendMessageRequest.RequiredProperties = ["body"]; - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendMessageRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendMessageRequest.prototype['phone'] = undefined; - -/** - * Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - * @member {String} body - */ -SendMessageRequest.prototype['body'] = undefined; - - -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendMessageRequest; - diff --git a/js/src/model/SendMessageStatus.js b/js/src/model/SendMessageStatus.js deleted file mode 100644 index 1d89ef4..0000000 --- a/js/src/model/SendMessageStatus.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SendMessageStatus model module. - * @module model/SendMessageStatus - * @version 2.39.0 - */ -class SendMessageStatus { - /** - * Constructs a new SendMessageStatus. - * @alias module:model/SendMessageStatus - */ - constructor() { - - SendMessageStatus.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendMessageStatus from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendMessageStatus} obj Optional instance to populate. - * @return {module:model/SendMessageStatus} The populated SendMessageStatus instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendMessageStatus(); - - if (data.hasOwnProperty('sent')) { - obj['sent'] = ApiClient.convertToType(data['sent'], 'Boolean'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = ApiClient.convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendMessageStatus. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendMessageStatus. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // ensure the json data is a string - if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { - throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); - } - - return true; - } - - -} - - - -/** - * @member {Boolean} sent - */ -SendMessageStatus.prototype['sent'] = undefined; - -/** - * unique message id - * @member {String} id - */ -SendMessageStatus.prototype['id'] = undefined; - -/** - * Posting status message - * @member {String} message - */ -SendMessageStatus.prototype['message'] = undefined; - -/** - * Result description - * @member {String} description - */ -SendMessageStatus.prototype['description'] = undefined; - - - - - - -export default SendMessageStatus; - diff --git a/js/src/model/SendProductRequest.js b/js/src/model/SendProductRequest.js deleted file mode 100644 index 1a9f224..0000000 --- a/js/src/model/SendProductRequest.js +++ /dev/null @@ -1,175 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; -import SendProductRequestAllOfAction from './SendProductRequestAllOfAction'; - -/** - * The SendProductRequest model module. - * @module model/SendProductRequest - * @version 2.39.0 - */ -class SendProductRequest { - /** - * Constructs a new SendProductRequest. - * @alias module:model/SendProductRequest - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - * @param action {module:model/SendProductRequestAllOfAction} - */ - constructor(action) { - ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendProductRequest.initialize(this, action); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, action) { - obj['action'] = action; - } - - /** - * Constructs a SendProductRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendProductRequest} obj Optional instance to populate. - * @return {module:model/SendProductRequest} The populated SendProductRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendProductRequest(); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('action')) { - obj['action'] = SendProductRequestAllOfAction.constructFromObject(data['action']); - } - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - if (data.hasOwnProperty('footer')) { - obj['footer'] = ApiClient.convertToType(data['footer'], 'String'); - } - if (data.hasOwnProperty('header')) { - obj['header'] = ApiClient.convertToType(data['header'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendProductRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendProductRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendProductRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // validate the optional field `action` - if (data['action']) { // data not null - SendProductRequestAllOfAction.validateJSON(data['action']); - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - // ensure the json data is a string - if (data['footer'] && !(typeof data['footer'] === 'string' || data['footer'] instanceof String)) { - throw new Error("Expected the field `footer` to be a primitive type in the JSON string but got " + data['footer']); - } - // ensure the json data is a string - if (data['header'] && !(typeof data['header'] === 'string' || data['header'] instanceof String)) { - throw new Error("Expected the field `header` to be a primitive type in the JSON string but got " + data['header']); - } - - return true; - } - - -} - -SendProductRequest.RequiredProperties = ["action"]; - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendProductRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendProductRequest.prototype['phone'] = undefined; - -/** - * @member {module:model/SendProductRequestAllOfAction} action - */ -SendProductRequest.prototype['action'] = undefined; - -/** - * Text of message. Example: Some text. - * @member {String} body - */ -SendProductRequest.prototype['body'] = undefined; - -/** - * Located under the message text. Example: Footer. - * @member {String} footer - */ -SendProductRequest.prototype['footer'] = undefined; - -/** - * Header of catalog. Example: Header. **Required when sending the catalog.** - * @member {String} header - */ -SendProductRequest.prototype['header'] = undefined; - - -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendProductRequest; - diff --git a/js/src/model/SendProductRequestAllOfAction.js b/js/src/model/SendProductRequestAllOfAction.js deleted file mode 100644 index 6e1944d..0000000 --- a/js/src/model/SendProductRequestAllOfAction.js +++ /dev/null @@ -1,121 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import SendProductRequestAllOfActionSections from './SendProductRequestAllOfActionSections'; - -/** - * The SendProductRequestAllOfAction model module. - * @module model/SendProductRequestAllOfAction - * @version 2.39.0 - */ -class SendProductRequestAllOfAction { - /** - * Constructs a new SendProductRequestAllOfAction. - * Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - * @alias module:model/SendProductRequestAllOfAction - */ - constructor() { - - SendProductRequestAllOfAction.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendProductRequestAllOfAction from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendProductRequestAllOfAction} obj Optional instance to populate. - * @return {module:model/SendProductRequestAllOfAction} The populated SendProductRequestAllOfAction instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendProductRequestAllOfAction(); - - if (data.hasOwnProperty('catalog_id')) { - obj['catalog_id'] = ApiClient.convertToType(data['catalog_id'], 'String'); - } - if (data.hasOwnProperty('product_retailer_id')) { - obj['product_retailer_id'] = ApiClient.convertToType(data['product_retailer_id'], 'String'); - } - if (data.hasOwnProperty('sections')) { - obj['sections'] = ApiClient.convertToType(data['sections'], [SendProductRequestAllOfActionSections]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendProductRequestAllOfAction. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendProductRequestAllOfAction. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['catalog_id'] && !(typeof data['catalog_id'] === 'string' || data['catalog_id'] instanceof String)) { - throw new Error("Expected the field `catalog_id` to be a primitive type in the JSON string but got " + data['catalog_id']); - } - // ensure the json data is a string - if (data['product_retailer_id'] && !(typeof data['product_retailer_id'] === 'string' || data['product_retailer_id'] instanceof String)) { - throw new Error("Expected the field `product_retailer_id` to be a primitive type in the JSON string but got " + data['product_retailer_id']); - } - if (data['sections']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['sections'])) { - throw new Error("Expected the field `sections` to be an array in the JSON data but got " + data['sections']); - } - // validate the optional field `sections` (array) - for (const item of data['sections']) { - SendProductRequestAllOfActionSections.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * id of the catalog - * @member {String} catalog_id - */ -SendProductRequestAllOfAction.prototype['catalog_id'] = undefined; - -/** - * id of the product - * @member {String} product_retailer_id - */ -SendProductRequestAllOfAction.prototype['product_retailer_id'] = undefined; - -/** - * @member {Array.} sections - */ -SendProductRequestAllOfAction.prototype['sections'] = undefined; - - - - - - -export default SendProductRequestAllOfAction; - diff --git a/js/src/model/SendProductRequestAllOfActionProductItems.js b/js/src/model/SendProductRequestAllOfActionProductItems.js deleted file mode 100644 index 400423f..0000000 --- a/js/src/model/SendProductRequestAllOfActionProductItems.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SendProductRequestAllOfActionProductItems model module. - * @module model/SendProductRequestAllOfActionProductItems - * @version 2.39.0 - */ -class SendProductRequestAllOfActionProductItems { - /** - * Constructs a new SendProductRequestAllOfActionProductItems. - * @alias module:model/SendProductRequestAllOfActionProductItems - */ - constructor() { - - SendProductRequestAllOfActionProductItems.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendProductRequestAllOfActionProductItems from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendProductRequestAllOfActionProductItems} obj Optional instance to populate. - * @return {module:model/SendProductRequestAllOfActionProductItems} The populated SendProductRequestAllOfActionProductItems instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendProductRequestAllOfActionProductItems(); - - if (data.hasOwnProperty('product_retailer_id')) { - obj['product_retailer_id'] = ApiClient.convertToType(data['product_retailer_id'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendProductRequestAllOfActionProductItems. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendProductRequestAllOfActionProductItems. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['product_retailer_id'] && !(typeof data['product_retailer_id'] === 'string' || data['product_retailer_id'] instanceof String)) { - throw new Error("Expected the field `product_retailer_id` to be a primitive type in the JSON string but got " + data['product_retailer_id']); - } - - return true; - } - - -} - - - -/** - * id of the product - * @member {String} product_retailer_id - */ -SendProductRequestAllOfActionProductItems.prototype['product_retailer_id'] = undefined; - - - - - - -export default SendProductRequestAllOfActionProductItems; - diff --git a/js/src/model/SendProductRequestAllOfActionSections.js b/js/src/model/SendProductRequestAllOfActionSections.js deleted file mode 100644 index 1674440..0000000 --- a/js/src/model/SendProductRequestAllOfActionSections.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import SendProductRequestAllOfActionProductItems from './SendProductRequestAllOfActionProductItems'; - -/** - * The SendProductRequestAllOfActionSections model module. - * @module model/SendProductRequestAllOfActionSections - * @version 2.39.0 - */ -class SendProductRequestAllOfActionSections { - /** - * Constructs a new SendProductRequestAllOfActionSections. - * @alias module:model/SendProductRequestAllOfActionSections - */ - constructor() { - - SendProductRequestAllOfActionSections.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendProductRequestAllOfActionSections from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendProductRequestAllOfActionSections} obj Optional instance to populate. - * @return {module:model/SendProductRequestAllOfActionSections} The populated SendProductRequestAllOfActionSections instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendProductRequestAllOfActionSections(); - - if (data.hasOwnProperty('title')) { - obj['title'] = ApiClient.convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('product_items')) { - obj['product_items'] = ApiClient.convertToType(data['product_items'], [SendProductRequestAllOfActionProductItems]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendProductRequestAllOfActionSections. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendProductRequestAllOfActionSections. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) { - throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']); - } - if (data['product_items']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['product_items'])) { - throw new Error("Expected the field `product_items` to be an array in the JSON data but got " + data['product_items']); - } - // validate the optional field `product_items` (array) - for (const item of data['product_items']) { - SendProductRequestAllOfActionProductItems.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * Title of the section. Example: the-section-title - * @member {String} title - */ -SendProductRequestAllOfActionSections.prototype['title'] = undefined; - -/** - * @member {Array.} product_items - */ -SendProductRequestAllOfActionSections.prototype['product_items'] = undefined; - - - - - - -export default SendProductRequestAllOfActionSections; - diff --git a/js/src/model/SendTemplateRequest.js b/js/src/model/SendTemplateRequest.js deleted file mode 100644 index 8e65920..0000000 --- a/js/src/model/SendTemplateRequest.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ChatIdProp from './ChatIdProp'; -import PhoneProp from './PhoneProp'; -import SendTemplateRequestAllOfLanguage from './SendTemplateRequestAllOfLanguage'; -import SendTemplateRequestAllOfParams from './SendTemplateRequestAllOfParams'; -import TemplateNamespaceField from './TemplateNamespaceField'; - -/** - * The SendTemplateRequest model module. - * @module model/SendTemplateRequest - * @version 2.39.0 - */ -class SendTemplateRequest { - /** - * Constructs a new SendTemplateRequest. - * @alias module:model/SendTemplateRequest - * @implements module:model/TemplateNamespaceField - * @implements module:model/ChatIdProp - * @implements module:model/PhoneProp - * @param namespace {String} Can be found by method /templates - * @param template {String} Name of template - * @param language {module:model/SendTemplateRequestAllOfLanguage} - */ - constructor(namespace, template, language) { - TemplateNamespaceField.initialize(this);ChatIdProp.initialize(this);PhoneProp.initialize(this); - SendTemplateRequest.initialize(this, namespace, template, language); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, namespace, template, language) { - obj['namespace'] = namespace; - obj['template'] = template; - obj['language'] = language; - } - - /** - * Constructs a SendTemplateRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequest} obj Optional instance to populate. - * @return {module:model/SendTemplateRequest} The populated SendTemplateRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequest(); - TemplateNamespaceField.constructFromObject(data, obj); - ChatIdProp.constructFromObject(data, obj); - PhoneProp.constructFromObject(data, obj); - - if (data.hasOwnProperty('namespace')) { - obj['namespace'] = ApiClient.convertToType(data['namespace'], 'String'); - } - if (data.hasOwnProperty('chatId')) { - obj['chatId'] = ApiClient.convertToType(data['chatId'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'Number'); - } - if (data.hasOwnProperty('template')) { - obj['template'] = ApiClient.convertToType(data['template'], 'String'); - } - if (data.hasOwnProperty('language')) { - obj['language'] = SendTemplateRequestAllOfLanguage.constructFromObject(data['language']); - } - if (data.hasOwnProperty('params')) { - obj['params'] = ApiClient.convertToType(data['params'], [SendTemplateRequestAllOfParams]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequest. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SendTemplateRequest.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) { - throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']); - } - // ensure the json data is a string - if (data['chatId'] && !(typeof data['chatId'] === 'string' || data['chatId'] instanceof String)) { - throw new Error("Expected the field `chatId` to be a primitive type in the JSON string but got " + data['chatId']); - } - // ensure the json data is a string - if (data['template'] && !(typeof data['template'] === 'string' || data['template'] instanceof String)) { - throw new Error("Expected the field `template` to be a primitive type in the JSON string but got " + data['template']); - } - // validate the optional field `language` - if (data['language']) { // data not null - SendTemplateRequestAllOfLanguage.validateJSON(data['language']); - } - if (data['params']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['params'])) { - throw new Error("Expected the field `params` to be an array in the JSON data but got " + data['params']); - } - // validate the optional field `params` (array) - for (const item of data['params']) { - SendTemplateRequestAllOfParams.validateJSON(item); - }; - } - - return true; - } - - -} - -SendTemplateRequest.RequiredProperties = ["namespace", "template", "language"]; - -/** - * Can be found by method /templates - * @member {String} namespace - */ -SendTemplateRequest.prototype['namespace'] = undefined; - -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -SendTemplateRequest.prototype['chatId'] = undefined; - -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -SendTemplateRequest.prototype['phone'] = undefined; - -/** - * Name of template - * @member {String} template - */ -SendTemplateRequest.prototype['template'] = undefined; - -/** - * @member {module:model/SendTemplateRequestAllOfLanguage} language - */ -SendTemplateRequest.prototype['language'] = undefined; - -/** - * Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** - * @member {Array.} params - */ -SendTemplateRequest.prototype['params'] = undefined; - - -// Implement TemplateNamespaceField interface: -/** - * @member {String} namespace - */ -TemplateNamespaceField.prototype['namespace'] = undefined; -// Implement ChatIdProp interface: -/** - * **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. - * @member {String} chatId - */ -ChatIdProp.prototype['chatId'] = undefined; -// Implement PhoneProp interface: -/** - * **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. - * @member {Number} phone - */ -PhoneProp.prototype['phone'] = undefined; - - - - -export default SendTemplateRequest; - diff --git a/js/src/model/SendTemplateRequestAllOfCurrency.js b/js/src/model/SendTemplateRequestAllOfCurrency.js deleted file mode 100644 index de00558..0000000 --- a/js/src/model/SendTemplateRequestAllOfCurrency.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SendTemplateRequestAllOfCurrency model module. - * @module model/SendTemplateRequestAllOfCurrency - * @version 2.39.0 - */ -class SendTemplateRequestAllOfCurrency { - /** - * Constructs a new SendTemplateRequestAllOfCurrency. - * @alias module:model/SendTemplateRequestAllOfCurrency - */ - constructor() { - - SendTemplateRequestAllOfCurrency.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendTemplateRequestAllOfCurrency from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequestAllOfCurrency} obj Optional instance to populate. - * @return {module:model/SendTemplateRequestAllOfCurrency} The populated SendTemplateRequestAllOfCurrency instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequestAllOfCurrency(); - - if (data.hasOwnProperty('currency_code')) { - obj['currency_code'] = ApiClient.convertToType(data['currency_code'], 'String'); - } - if (data.hasOwnProperty('amount_1000')) { - obj['amount_1000'] = ApiClient.convertToType(data['amount_1000'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequestAllOfCurrency. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequestAllOfCurrency. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['currency_code'] && !(typeof data['currency_code'] === 'string' || data['currency_code'] instanceof String)) { - throw new Error("Expected the field `currency_code` to be a primitive type in the JSON string but got " + data['currency_code']); - } - - return true; - } - - -} - - - -/** - * @member {String} currency_code - */ -SendTemplateRequestAllOfCurrency.prototype['currency_code'] = undefined; - -/** - * @member {Number} amount_1000 - */ -SendTemplateRequestAllOfCurrency.prototype['amount_1000'] = undefined; - - - - - - -export default SendTemplateRequestAllOfCurrency; - diff --git a/js/src/model/SendTemplateRequestAllOfDateTime.js b/js/src/model/SendTemplateRequestAllOfDateTime.js deleted file mode 100644 index ccb63a4..0000000 --- a/js/src/model/SendTemplateRequestAllOfDateTime.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import SendTemplateRequestAllOfDateTimeComponent from './SendTemplateRequestAllOfDateTimeComponent'; -import SendTemplateRequestAllOfDateTimeUnixEpoch from './SendTemplateRequestAllOfDateTimeUnixEpoch'; - -/** - * The SendTemplateRequestAllOfDateTime model module. - * @module model/SendTemplateRequestAllOfDateTime - * @version 2.39.0 - */ -class SendTemplateRequestAllOfDateTime { - /** - * Constructs a new SendTemplateRequestAllOfDateTime. - * @alias module:model/SendTemplateRequestAllOfDateTime - */ - constructor() { - - SendTemplateRequestAllOfDateTime.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendTemplateRequestAllOfDateTime from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequestAllOfDateTime} obj Optional instance to populate. - * @return {module:model/SendTemplateRequestAllOfDateTime} The populated SendTemplateRequestAllOfDateTime instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequestAllOfDateTime(); - - if (data.hasOwnProperty('component')) { - obj['component'] = SendTemplateRequestAllOfDateTimeComponent.constructFromObject(data['component']); - } - if (data.hasOwnProperty('unix_epoch')) { - obj['unix_epoch'] = SendTemplateRequestAllOfDateTimeUnixEpoch.constructFromObject(data['unix_epoch']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequestAllOfDateTime. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequestAllOfDateTime. - */ - static validateJSON(data) { - // validate the optional field `component` - if (data['component']) { // data not null - SendTemplateRequestAllOfDateTimeComponent.validateJSON(data['component']); - } - // validate the optional field `unix_epoch` - if (data['unix_epoch']) { // data not null - SendTemplateRequestAllOfDateTimeUnixEpoch.validateJSON(data['unix_epoch']); - } - - return true; - } - - -} - - - -/** - * @member {module:model/SendTemplateRequestAllOfDateTimeComponent} component - */ -SendTemplateRequestAllOfDateTime.prototype['component'] = undefined; - -/** - * @member {module:model/SendTemplateRequestAllOfDateTimeUnixEpoch} unix_epoch - */ -SendTemplateRequestAllOfDateTime.prototype['unix_epoch'] = undefined; - - - - - - -export default SendTemplateRequestAllOfDateTime; - diff --git a/js/src/model/SendTemplateRequestAllOfDateTimeComponent.js b/js/src/model/SendTemplateRequestAllOfDateTimeComponent.js deleted file mode 100644 index 87f1308..0000000 --- a/js/src/model/SendTemplateRequestAllOfDateTimeComponent.js +++ /dev/null @@ -1,253 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SendTemplateRequestAllOfDateTimeComponent model module. - * @module model/SendTemplateRequestAllOfDateTimeComponent - * @version 2.39.0 - */ -class SendTemplateRequestAllOfDateTimeComponent { - /** - * Constructs a new SendTemplateRequestAllOfDateTimeComponent. - * @alias module:model/SendTemplateRequestAllOfDateTimeComponent - */ - constructor() { - - SendTemplateRequestAllOfDateTimeComponent.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendTemplateRequestAllOfDateTimeComponent from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequestAllOfDateTimeComponent} obj Optional instance to populate. - * @return {module:model/SendTemplateRequestAllOfDateTimeComponent} The populated SendTemplateRequestAllOfDateTimeComponent instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequestAllOfDateTimeComponent(); - - if (data.hasOwnProperty('day_of_week')) { - obj['day_of_week'] = ApiClient.convertToType(data['day_of_week'], 'String'); - } - if (data.hasOwnProperty('year')) { - obj['year'] = ApiClient.convertToType(data['year'], 'Number'); - } - if (data.hasOwnProperty('month')) { - obj['month'] = ApiClient.convertToType(data['month'], 'Number'); - } - if (data.hasOwnProperty('day_of_month')) { - obj['day_of_month'] = ApiClient.convertToType(data['day_of_month'], 'Number'); - } - if (data.hasOwnProperty('hour')) { - obj['hour'] = ApiClient.convertToType(data['hour'], 'Number'); - } - if (data.hasOwnProperty('minute')) { - obj['minute'] = ApiClient.convertToType(data['minute'], 'Number'); - } - if (data.hasOwnProperty('calendar')) { - obj['calendar'] = ApiClient.convertToType(data['calendar'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequestAllOfDateTimeComponent. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequestAllOfDateTimeComponent. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['day_of_week'] && !(typeof data['day_of_week'] === 'string' || data['day_of_week'] instanceof String)) { - throw new Error("Expected the field `day_of_week` to be a primitive type in the JSON string but got " + data['day_of_week']); - } - // ensure the json data is a string - if (data['calendar'] && !(typeof data['calendar'] === 'string' || data['calendar'] instanceof String)) { - throw new Error("Expected the field `calendar` to be a primitive type in the JSON string but got " + data['calendar']); - } - - return true; - } - - -} - - - -/** - * @member {module:model/SendTemplateRequestAllOfDateTimeComponent.DayOfWeekEnum} day_of_week - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['day_of_week'] = undefined; - -/** - * @member {Number} year - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['year'] = undefined; - -/** - * @member {Number} month - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['month'] = undefined; - -/** - * @member {Number} day_of_month - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['day_of_month'] = undefined; - -/** - * @member {Number} hour - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['hour'] = undefined; - -/** - * @member {Number} minute - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['minute'] = undefined; - -/** - * @member {module:model/SendTemplateRequestAllOfDateTimeComponent.CalendarEnum} calendar - */ -SendTemplateRequestAllOfDateTimeComponent.prototype['calendar'] = undefined; - - - - - -/** - * Allowed values for the day_of_week property. - * @enum {String} - * @readonly - */ -SendTemplateRequestAllOfDateTimeComponent['DayOfWeekEnum'] = { - - /** - * value: "MONDAY" - * @const - */ - "MONDAY": "MONDAY", - - /** - * value: "TUESDAY" - * @const - */ - "TUESDAY": "TUESDAY", - - /** - * value: "WEDNESDAY" - * @const - */ - "WEDNESDAY": "WEDNESDAY", - - /** - * value: "THURSDAY" - * @const - */ - "THURSDAY": "THURSDAY", - - /** - * value: "FRIDAY" - * @const - */ - "FRIDAY": "FRIDAY", - - /** - * value: "SATURDAY" - * @const - */ - "SATURDAY": "SATURDAY", - - /** - * value: "SUNDAY" - * @const - */ - "SUNDAY": "SUNDAY", - - /** - * value: "1" - * @const - */ - "1": "1", - - /** - * value: "2" - * @const - */ - "2": "2", - - /** - * value: "3" - * @const - */ - "3": "3", - - /** - * value: "4" - * @const - */ - "4": "4", - - /** - * value: "5" - * @const - */ - "5": "5", - - /** - * value: "6" - * @const - */ - "6": "6", - - /** - * value: "7" - * @const - */ - "7": "7" -}; - - -/** - * Allowed values for the calendar property. - * @enum {String} - * @readonly - */ -SendTemplateRequestAllOfDateTimeComponent['CalendarEnum'] = { - - /** - * value: "GREGORIAN" - * @const - */ - "GREGORIAN": "GREGORIAN", - - /** - * value: "SOLAR_HIJRI" - * @const - */ - "SOLAR_HIJRI": "SOLAR_HIJRI" -}; - - - -export default SendTemplateRequestAllOfDateTimeComponent; - diff --git a/js/src/model/SendTemplateRequestAllOfDateTimeUnixEpoch.js b/js/src/model/SendTemplateRequestAllOfDateTimeUnixEpoch.js deleted file mode 100644 index c72125c..0000000 --- a/js/src/model/SendTemplateRequestAllOfDateTimeUnixEpoch.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SendTemplateRequestAllOfDateTimeUnixEpoch model module. - * @module model/SendTemplateRequestAllOfDateTimeUnixEpoch - * @version 2.39.0 - */ -class SendTemplateRequestAllOfDateTimeUnixEpoch { - /** - * Constructs a new SendTemplateRequestAllOfDateTimeUnixEpoch. - * @alias module:model/SendTemplateRequestAllOfDateTimeUnixEpoch - */ - constructor() { - - SendTemplateRequestAllOfDateTimeUnixEpoch.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendTemplateRequestAllOfDateTimeUnixEpoch from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequestAllOfDateTimeUnixEpoch} obj Optional instance to populate. - * @return {module:model/SendTemplateRequestAllOfDateTimeUnixEpoch} The populated SendTemplateRequestAllOfDateTimeUnixEpoch instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequestAllOfDateTimeUnixEpoch(); - - if (data.hasOwnProperty('timestamp')) { - obj['timestamp'] = ApiClient.convertToType(data['timestamp'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequestAllOfDateTimeUnixEpoch. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequestAllOfDateTimeUnixEpoch. - */ - static validateJSON(data) { - - return true; - } - - -} - - - -/** - * @member {Number} timestamp - */ -SendTemplateRequestAllOfDateTimeUnixEpoch.prototype['timestamp'] = undefined; - - - - - - -export default SendTemplateRequestAllOfDateTimeUnixEpoch; - diff --git a/js/src/model/SendTemplateRequestAllOfLanguage.js b/js/src/model/SendTemplateRequestAllOfLanguage.js deleted file mode 100644 index 939c210..0000000 --- a/js/src/model/SendTemplateRequestAllOfLanguage.js +++ /dev/null @@ -1,112 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import TemplateLanguageProp from './TemplateLanguageProp'; - -/** - * The SendTemplateRequestAllOfLanguage model module. - * @module model/SendTemplateRequestAllOfLanguage - * @version 2.39.0 - */ -class SendTemplateRequestAllOfLanguage { - /** - * Constructs a new SendTemplateRequestAllOfLanguage. - * Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - * @alias module:model/SendTemplateRequestAllOfLanguage - */ - constructor() { - - SendTemplateRequestAllOfLanguage.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendTemplateRequestAllOfLanguage from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequestAllOfLanguage} obj Optional instance to populate. - * @return {module:model/SendTemplateRequestAllOfLanguage} The populated SendTemplateRequestAllOfLanguage instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequestAllOfLanguage(); - - if (data.hasOwnProperty('policy')) { - obj['policy'] = ApiClient.convertToType(data['policy'], 'String'); - } - if (data.hasOwnProperty('code')) { - obj['code'] = TemplateLanguageProp.constructFromObject(data['code']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequestAllOfLanguage. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequestAllOfLanguage. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['policy'] && !(typeof data['policy'] === 'string' || data['policy'] instanceof String)) { - throw new Error("Expected the field `policy` to be a primitive type in the JSON string but got " + data['policy']); - } - - return true; - } - - -} - - - -/** - * @member {module:model/SendTemplateRequestAllOfLanguage.PolicyEnum} policy - */ -SendTemplateRequestAllOfLanguage.prototype['policy'] = undefined; - -/** - * @member {module:model/TemplateLanguageProp} code - */ -SendTemplateRequestAllOfLanguage.prototype['code'] = undefined; - - - - - -/** - * Allowed values for the policy property. - * @enum {String} - * @readonly - */ -SendTemplateRequestAllOfLanguage['PolicyEnum'] = { - - /** - * value: "deterministic" - * @const - */ - "deterministic": "deterministic" -}; - - - -export default SendTemplateRequestAllOfLanguage; - diff --git a/js/src/model/SendTemplateRequestAllOfParams.js b/js/src/model/SendTemplateRequestAllOfParams.js deleted file mode 100644 index 32d8718..0000000 --- a/js/src/model/SendTemplateRequestAllOfParams.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import SendTemplateRequestAllOfCurrency from './SendTemplateRequestAllOfCurrency'; -import SendTemplateRequestAllOfDateTime from './SendTemplateRequestAllOfDateTime'; - -/** - * The SendTemplateRequestAllOfParams model module. - * @module model/SendTemplateRequestAllOfParams - * @version 2.39.0 - */ -class SendTemplateRequestAllOfParams { - /** - * Constructs a new SendTemplateRequestAllOfParams. - * @alias module:model/SendTemplateRequestAllOfParams - */ - constructor() { - - SendTemplateRequestAllOfParams.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SendTemplateRequestAllOfParams from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SendTemplateRequestAllOfParams} obj Optional instance to populate. - * @return {module:model/SendTemplateRequestAllOfParams} The populated SendTemplateRequestAllOfParams instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SendTemplateRequestAllOfParams(); - - if (data.hasOwnProperty('default')) { - obj['default'] = ApiClient.convertToType(data['default'], 'String'); - } - if (data.hasOwnProperty('currency')) { - obj['currency'] = SendTemplateRequestAllOfCurrency.constructFromObject(data['currency']); - } - if (data.hasOwnProperty('date_time')) { - obj['date_time'] = SendTemplateRequestAllOfDateTime.constructFromObject(data['date_time']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SendTemplateRequestAllOfParams. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SendTemplateRequestAllOfParams. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['default'] && !(typeof data['default'] === 'string' || data['default'] instanceof String)) { - throw new Error("Expected the field `default` to be a primitive type in the JSON string but got " + data['default']); - } - // validate the optional field `currency` - if (data['currency']) { // data not null - SendTemplateRequestAllOfCurrency.validateJSON(data['currency']); - } - // validate the optional field `date_time` - if (data['date_time']) { // data not null - SendTemplateRequestAllOfDateTime.validateJSON(data['date_time']); - } - - return true; - } - - -} - - - -/** - * @member {String} default - */ -SendTemplateRequestAllOfParams.prototype['default'] = undefined; - -/** - * @member {module:model/SendTemplateRequestAllOfCurrency} currency - */ -SendTemplateRequestAllOfParams.prototype['currency'] = undefined; - -/** - * @member {module:model/SendTemplateRequestAllOfDateTime} date_time - */ -SendTemplateRequestAllOfParams.prototype['date_time'] = undefined; - - - - - - -export default SendTemplateRequestAllOfParams; - diff --git a/js/src/model/SetCommerce.js b/js/src/model/SetCommerce.js deleted file mode 100644 index 7c6ade1..0000000 --- a/js/src/model/SetCommerce.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SetCommerce model module. - * @module model/SetCommerce - * @version 2.39.0 - */ -class SetCommerce { - /** - * Constructs a new SetCommerce. - * @alias module:model/SetCommerce - */ - constructor() { - - SetCommerce.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SetCommerce from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SetCommerce} obj Optional instance to populate. - * @return {module:model/SetCommerce} The populated SetCommerce instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SetCommerce(); - - if (data.hasOwnProperty('success')) { - obj['success'] = ApiClient.convertToType(data['success'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SetCommerce. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SetCommerce. - */ - static validateJSON(data) { - - return true; - } - - -} - - - -/** - * @member {Boolean} success - */ -SetCommerce.prototype['success'] = undefined; - - - - - - -export default SetCommerce; - diff --git a/js/src/model/SetMe.js b/js/src/model/SetMe.js deleted file mode 100644 index ea4c775..0000000 --- a/js/src/model/SetMe.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SetMe model module. - * @module model/SetMe - * @version 2.39.0 - */ -class SetMe { - /** - * Constructs a new SetMe. - * @alias module:model/SetMe - */ - constructor() { - - SetMe.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SetMe from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SetMe} obj Optional instance to populate. - * @return {module:model/SetMe} The populated SetMe instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SetMe(); - - if (data.hasOwnProperty('result')) { - obj['result'] = ApiClient.convertToType(data['result'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SetMe. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SetMe. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['result'] && !(typeof data['result'] === 'string' || data['result'] instanceof String)) { - throw new Error("Expected the field `result` to be a primitive type in the JSON string but got " + data['result']); - } - - return true; - } - - -} - - - -/** - * @member {String} result - */ -SetMe.prototype['result'] = undefined; - - - - - - -export default SetMe; - diff --git a/js/src/model/SetMeRequest.js b/js/src/model/SetMeRequest.js deleted file mode 100644 index 5189b2a..0000000 --- a/js/src/model/SetMeRequest.js +++ /dev/null @@ -1,316 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import MeComponents from './MeComponents'; - -/** - * The SetMeRequest model module. - * @module model/SetMeRequest - * @version 2.39.0 - */ -class SetMeRequest { - /** - * Constructs a new SetMeRequest. - * @alias module:model/SetMeRequest - * @implements module:model/MeComponents - */ - constructor() { - MeComponents.initialize(this); - SetMeRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SetMeRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SetMeRequest} obj Optional instance to populate. - * @return {module:model/SetMeRequest} The populated SetMeRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SetMeRequest(); - MeComponents.constructFromObject(data, obj); - - if (data.hasOwnProperty('about')) { - obj['about'] = ApiClient.convertToType(data['about'], 'String'); - } - if (data.hasOwnProperty('address')) { - obj['address'] = ApiClient.convertToType(data['address'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - if (data.hasOwnProperty('email')) { - obj['email'] = ApiClient.convertToType(data['email'], 'String'); - } - if (data.hasOwnProperty('phone')) { - obj['phone'] = ApiClient.convertToType(data['phone'], 'String'); - } - if (data.hasOwnProperty('vertical')) { - obj['vertical'] = ApiClient.convertToType(data['vertical'], 'String'); - } - if (data.hasOwnProperty('photo')) { - obj['photo'] = ApiClient.convertToType(data['photo'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SetMeRequest. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SetMeRequest. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['about'] && !(typeof data['about'] === 'string' || data['about'] instanceof String)) { - throw new Error("Expected the field `about` to be a primitive type in the JSON string but got " + data['about']); - } - // ensure the json data is a string - if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) { - throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']); - } - // ensure the json data is a string - if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { - throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); - } - // ensure the json data is a string - if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { - throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); - } - // ensure the json data is a string - if (data['phone'] && !(typeof data['phone'] === 'string' || data['phone'] instanceof String)) { - throw new Error("Expected the field `phone` to be a primitive type in the JSON string but got " + data['phone']); - } - // ensure the json data is a string - if (data['vertical'] && !(typeof data['vertical'] === 'string' || data['vertical'] instanceof String)) { - throw new Error("Expected the field `vertical` to be a primitive type in the JSON string but got " + data['vertical']); - } - // ensure the json data is a string - if (data['photo'] && !(typeof data['photo'] === 'string' || data['photo'] instanceof String)) { - throw new Error("Expected the field `photo` to be a primitive type in the JSON string but got " + data['photo']); - } - - return true; - } - - -} - - - -/** - * Profile`s About section. - * @member {String} about - */ -SetMeRequest.prototype['about'] = undefined; - -/** - * Address of the business - * @member {String} address - */ -SetMeRequest.prototype['address'] = undefined; - -/** - * Description of the business. Max 256 characters - * @member {String} description - */ -SetMeRequest.prototype['description'] = undefined; - -/** - * Business email - * @member {String} email - */ -SetMeRequest.prototype['email'] = undefined; - -/** - * Linked phone number - * @member {String} phone - */ -SetMeRequest.prototype['phone'] = undefined; - -/** - * Industry of the business - * @member {module:model/SetMeRequest.VerticalEnum} vertical - */ -SetMeRequest.prototype['vertical'] = undefined; - -/** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @member {String} photo - */ -SetMeRequest.prototype['photo'] = undefined; - - -// Implement MeComponents interface: -/** - * Profile`s About section. - * @member {String} about - */ -MeComponents.prototype['about'] = undefined; -/** - * Address of the business - * @member {String} address - */ -MeComponents.prototype['address'] = undefined; -/** - * Description of the business. Max 256 characters - * @member {String} description - */ -MeComponents.prototype['description'] = undefined; -/** - * Business email - * @member {String} email - */ -MeComponents.prototype['email'] = undefined; -/** - * Linked phone number - * @member {String} phone - */ -MeComponents.prototype['phone'] = undefined; -/** - * Industry of the business - * @member {module:model/MeComponents.VerticalEnum} vertical - */ -MeComponents.prototype['vertical'] = undefined; -/** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @member {String} photo - */ -MeComponents.prototype['photo'] = undefined; - - - -/** - * Allowed values for the vertical property. - * @enum {String} - * @readonly - */ -SetMeRequest['VerticalEnum'] = { - - /** - * value: "Automotive" - * @const - */ - "Automotive": "Automotive", - - /** - * value: "Beauty, Spa and Salon" - * @const - */ - "Beauty, Spa and Salon": "Beauty, Spa and Salon", - - /** - * value: "Clothing and Apparel" - * @const - */ - "Clothing and Apparel": "Clothing and Apparel", - - /** - * value: "Education" - * @const - */ - "Education": "Education", - - /** - * value: "Entertainment" - * @const - */ - "Entertainment": "Entertainment", - - /** - * value: "Event Planning and Service" - * @const - */ - "Event Planning and Service": "Event Planning and Service", - - /** - * value: "Finance and Banking" - * @const - */ - "Finance and Banking": "Finance and Banking", - - /** - * value: "Food and Grocery" - * @const - */ - "Food and Grocery": "Food and Grocery", - - /** - * value: "Public Service" - * @const - */ - "Public Service": "Public Service", - - /** - * value: "Hotel and Lodging" - * @const - */ - "Hotel and Lodging": "Hotel and Lodging", - - /** - * value: "Medical and Health" - * @const - */ - "Medical and Health": "Medical and Health", - - /** - * value: "Non-profit" - * @const - */ - "Non-profit": "Non-profit", - - /** - * value: "Professional Services" - * @const - */ - "Professional Services": "Professional Services", - - /** - * value: "Shopping and Retail" - * @const - */ - "Shopping and Retail": "Shopping and Retail", - - /** - * value: "Travel and Transportation" - * @const - */ - "Travel and Transportation": "Travel and Transportation", - - /** - * value: "Restaurant" - * @const - */ - "Restaurant": "Restaurant", - - /** - * value: "Other" - * @const - */ - "Other": "Other" -}; - - - -export default SetMeRequest; - diff --git a/js/src/model/SetSettings200Response.js b/js/src/model/SetSettings200Response.js deleted file mode 100644 index 6d34bc0..0000000 --- a/js/src/model/SetSettings200Response.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import SetSettings200ResponseAllOfUpdate from './SetSettings200ResponseAllOfUpdate'; -import Settings from './Settings'; - -/** - * The SetSettings200Response model module. - * @module model/SetSettings200Response - * @version 2.39.0 - */ -class SetSettings200Response { - /** - * Constructs a new SetSettings200Response. - * @alias module:model/SetSettings200Response - * @implements module:model/Settings - * @param update {module:model/SetSettings200ResponseAllOfUpdate} - */ - constructor(update) { - Settings.initialize(this); - SetSettings200Response.initialize(this, update); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, update) { - obj['update'] = update; - } - - /** - * Constructs a SetSettings200Response from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SetSettings200Response} obj Optional instance to populate. - * @return {module:model/SetSettings200Response} The populated SetSettings200Response instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SetSettings200Response(); - Settings.constructFromObject(data, obj); - - if (data.hasOwnProperty('webhookUrl')) { - obj['webhookUrl'] = ApiClient.convertToType(data['webhookUrl'], 'String'); - } - if (data.hasOwnProperty('update')) { - obj['update'] = SetSettings200ResponseAllOfUpdate.constructFromObject(data['update']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SetSettings200Response. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SetSettings200Response. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of SetSettings200Response.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['webhookUrl'] && !(typeof data['webhookUrl'] === 'string' || data['webhookUrl'] instanceof String)) { - throw new Error("Expected the field `webhookUrl` to be a primitive type in the JSON string but got " + data['webhookUrl']); - } - // validate the optional field `update` - if (data['update']) { // data not null - SetSettings200ResponseAllOfUpdate.validateJSON(data['update']); - } - - return true; - } - - -} - -SetSettings200Response.RequiredProperties = ["update"]; - -/** - * @member {String} webhookUrl - */ -SetSettings200Response.prototype['webhookUrl'] = undefined; - -/** - * @member {module:model/SetSettings200ResponseAllOfUpdate} update - */ -SetSettings200Response.prototype['update'] = undefined; - - -// Implement Settings interface: -/** - * @member {String} webhookUrl - */ -Settings.prototype['webhookUrl'] = undefined; - - - - -export default SetSettings200Response; - diff --git a/js/src/model/SetSettings200ResponseAllOfUpdate.js b/js/src/model/SetSettings200ResponseAllOfUpdate.js deleted file mode 100644 index 7c3c6d1..0000000 --- a/js/src/model/SetSettings200ResponseAllOfUpdate.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Settings from './Settings'; - -/** - * The SetSettings200ResponseAllOfUpdate model module. - * @module model/SetSettings200ResponseAllOfUpdate - * @version 2.39.0 - */ -class SetSettings200ResponseAllOfUpdate { - /** - * Constructs a new SetSettings200ResponseAllOfUpdate. - * @alias module:model/SetSettings200ResponseAllOfUpdate - * @implements module:model/Settings - */ - constructor() { - Settings.initialize(this); - SetSettings200ResponseAllOfUpdate.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SetSettings200ResponseAllOfUpdate from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SetSettings200ResponseAllOfUpdate} obj Optional instance to populate. - * @return {module:model/SetSettings200ResponseAllOfUpdate} The populated SetSettings200ResponseAllOfUpdate instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SetSettings200ResponseAllOfUpdate(); - Settings.constructFromObject(data, obj); - - if (data.hasOwnProperty('webhookUrl')) { - obj['webhookUrl'] = ApiClient.convertToType(data['webhookUrl'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SetSettings200ResponseAllOfUpdate. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SetSettings200ResponseAllOfUpdate. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['webhookUrl'] && !(typeof data['webhookUrl'] === 'string' || data['webhookUrl'] instanceof String)) { - throw new Error("Expected the field `webhookUrl` to be a primitive type in the JSON string but got " + data['webhookUrl']); - } - - return true; - } - - -} - - - -/** - * @member {String} webhookUrl - */ -SetSettings200ResponseAllOfUpdate.prototype['webhookUrl'] = undefined; - - -// Implement Settings interface: -/** - * @member {String} webhookUrl - */ -Settings.prototype['webhookUrl'] = undefined; - - - - -export default SetSettings200ResponseAllOfUpdate; - diff --git a/js/src/model/SetWebhookStatus.js b/js/src/model/SetWebhookStatus.js deleted file mode 100644 index f580c0c..0000000 --- a/js/src/model/SetWebhookStatus.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The SetWebhookStatus model module. - * @module model/SetWebhookStatus - * @version 2.39.0 - */ -class SetWebhookStatus { - /** - * Constructs a new SetWebhookStatus. - * @alias module:model/SetWebhookStatus - */ - constructor() { - - SetWebhookStatus.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a SetWebhookStatus from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SetWebhookStatus} obj Optional instance to populate. - * @return {module:model/SetWebhookStatus} The populated SetWebhookStatus instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new SetWebhookStatus(); - - if (data.hasOwnProperty('set')) { - obj['set'] = ApiClient.convertToType(data['set'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = ApiClient.convertToType(data['message'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SetWebhookStatus. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SetWebhookStatus. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - - return true; - } - - -} - - - -/** - * Flag indicating that the current request has changed webhook - * @member {Boolean} set - */ -SetWebhookStatus.prototype['set'] = undefined; - -/** - * @member {String} message - */ -SetWebhookStatus.prototype['message'] = undefined; - - - - - - -export default SetWebhookStatus; - diff --git a/js/src/model/Settings.js b/js/src/model/Settings.js deleted file mode 100644 index 3df1476..0000000 --- a/js/src/model/Settings.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Settings model module. - * @module model/Settings - * @version 2.39.0 - */ -class Settings { - /** - * Constructs a new Settings. - * @alias module:model/Settings - */ - constructor() { - - Settings.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Settings from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Settings} obj Optional instance to populate. - * @return {module:model/Settings} The populated Settings instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Settings(); - - if (data.hasOwnProperty('webhookUrl')) { - obj['webhookUrl'] = ApiClient.convertToType(data['webhookUrl'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Settings. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Settings. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['webhookUrl'] && !(typeof data['webhookUrl'] === 'string' || data['webhookUrl'] instanceof String)) { - throw new Error("Expected the field `webhookUrl` to be a primitive type in the JSON string but got " + data['webhookUrl']); - } - - return true; - } - - -} - - - -/** - * @member {String} webhookUrl - */ -Settings.prototype['webhookUrl'] = undefined; - - - - - - -export default Settings; - diff --git a/js/src/model/TemplateCategoryProp.js b/js/src/model/TemplateCategoryProp.js deleted file mode 100644 index 04fa654..0000000 --- a/js/src/model/TemplateCategoryProp.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -/** -* Enum class TemplateCategoryProp. -* @enum {} -* @readonly -*/ -export default class TemplateCategoryProp { - - /** - * value: "MARKETING" - * @const - */ - "MARKETING" = "MARKETING"; - - - /** - * value: "TRANSACTIONAL" - * @const - */ - "TRANSACTIONAL" = "TRANSACTIONAL"; - - - /** - * value: "OTP" - * @const - */ - "OTP" = "OTP"; - - - - /** - * Returns a TemplateCategoryProp enum value from a Javascript object name. - * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/TemplateCategoryProp} The enum TemplateCategoryProp value. - */ - static constructFromObject(object) { - return object; - } -} - diff --git a/js/src/model/TemplateComponentsProp.js b/js/src/model/TemplateComponentsProp.js deleted file mode 100644 index 554f4a6..0000000 --- a/js/src/model/TemplateComponentsProp.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import TemplateComponentsPropInner from './TemplateComponentsPropInner'; - -/** - * The TemplateComponentsProp model module. - * @module model/TemplateComponentsProp - * @version 2.39.0 - */ -class TemplateComponentsProp extends Array { - /** - * Constructs a new TemplateComponentsProp. - * Array of template components - * @alias module:model/TemplateComponentsProp - * @extends Array - */ - constructor() { - super(); - - - TemplateComponentsProp.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a TemplateComponentsProp from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateComponentsProp} obj Optional instance to populate. - * @return {module:model/TemplateComponentsProp} The populated TemplateComponentsProp instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateComponentsProp(); - - ApiClient.constructFromObject(data, obj, 'TemplateComponentsPropInner'); - - - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateComponentsProp. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateComponentsProp. - */ - static validateJSON(data) { - - return true; - } - - -} - - - - - - - - -export default TemplateComponentsProp; - diff --git a/js/src/model/TemplateComponentsPropInner.js b/js/src/model/TemplateComponentsPropInner.js deleted file mode 100644 index d094b41..0000000 --- a/js/src/model/TemplateComponentsPropInner.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import TemplateComponentsPropInnerButtonsInner from './TemplateComponentsPropInnerButtonsInner'; - -/** - * The TemplateComponentsPropInner model module. - * @module model/TemplateComponentsPropInner - * @version 2.39.0 - */ -class TemplateComponentsPropInner { - /** - * Constructs a new TemplateComponentsPropInner. - * @alias module:model/TemplateComponentsPropInner - */ - constructor() { - - TemplateComponentsPropInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a TemplateComponentsPropInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateComponentsPropInner} obj Optional instance to populate. - * @return {module:model/TemplateComponentsPropInner} The populated TemplateComponentsPropInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateComponentsPropInner(); - - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('format')) { - obj['format'] = ApiClient.convertToType(data['format'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = ApiClient.convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('example')) { - obj['example'] = ApiClient.convertToType(data['example'], Object); - } - if (data.hasOwnProperty('buttons')) { - obj['buttons'] = ApiClient.convertToType(data['buttons'], [TemplateComponentsPropInnerButtonsInner]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateComponentsPropInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateComponentsPropInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['format'] && !(typeof data['format'] === 'string' || data['format'] instanceof String)) { - throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data['format']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - if (data['buttons']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['buttons'])) { - throw new Error("Expected the field `buttons` to be an array in the JSON data but got " + data['buttons']); - } - // validate the optional field `buttons` (array) - for (const item of data['buttons']) { - TemplateComponentsPropInnerButtonsInner.validateJSON(item); - }; - } - - return true; - } - - -} - - - -/** - * @member {module:model/TemplateComponentsPropInner.TypeEnum} type - */ -TemplateComponentsPropInner.prototype['type'] = undefined; - -/** - * Only for HEADER type - * @member {module:model/TemplateComponentsPropInner.FormatEnum} format - */ -TemplateComponentsPropInner.prototype['format'] = undefined; - -/** - * @member {String} text - */ -TemplateComponentsPropInner.prototype['text'] = undefined; - -/** - * @member {Object} example - */ -TemplateComponentsPropInner.prototype['example'] = undefined; - -/** - * @member {Array.} buttons - */ -TemplateComponentsPropInner.prototype['buttons'] = undefined; - - - - - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -TemplateComponentsPropInner['TypeEnum'] = { - - /** - * value: "BODY" - * @const - */ - "BODY": "BODY", - - /** - * value: "HEADER" - * @const - */ - "HEADER": "HEADER", - - /** - * value: "FOOTER" - * @const - */ - "FOOTER": "FOOTER", - - /** - * value: "BUTTONS" - * @const - */ - "BUTTONS": "BUTTONS" -}; - - -/** - * Allowed values for the format property. - * @enum {String} - * @readonly - */ -TemplateComponentsPropInner['FormatEnum'] = { - - /** - * value: "TEXT" - * @const - */ - "TEXT": "TEXT", - - /** - * value: "IMAGE" - * @const - */ - "IMAGE": "IMAGE", - - /** - * value: "DOCUMENT" - * @const - */ - "DOCUMENT": "DOCUMENT", - - /** - * value: "VIDEO" - * @const - */ - "VIDEO": "VIDEO" -}; - - - -export default TemplateComponentsPropInner; - diff --git a/js/src/model/TemplateComponentsPropInnerButtonsInner.js b/js/src/model/TemplateComponentsPropInnerButtonsInner.js deleted file mode 100644 index dc41cdc..0000000 --- a/js/src/model/TemplateComponentsPropInnerButtonsInner.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The TemplateComponentsPropInnerButtonsInner model module. - * @module model/TemplateComponentsPropInnerButtonsInner - * @version 2.39.0 - */ -class TemplateComponentsPropInnerButtonsInner { - /** - * Constructs a new TemplateComponentsPropInnerButtonsInner. - * @alias module:model/TemplateComponentsPropInnerButtonsInner - */ - constructor() { - - TemplateComponentsPropInnerButtonsInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a TemplateComponentsPropInnerButtonsInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateComponentsPropInnerButtonsInner} obj Optional instance to populate. - * @return {module:model/TemplateComponentsPropInnerButtonsInner} The populated TemplateComponentsPropInnerButtonsInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateComponentsPropInnerButtonsInner(); - - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = ApiClient.convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = ApiClient.convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('phone_number')) { - obj['phone_number'] = ApiClient.convertToType(data['phone_number'], 'String'); - } - if (data.hasOwnProperty('example')) { - obj['example'] = ApiClient.convertToType(data['example'], [Object]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateComponentsPropInnerButtonsInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateComponentsPropInnerButtonsInner. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // ensure the json data is a string - if (data['phone_number'] && !(typeof data['phone_number'] === 'string' || data['phone_number'] instanceof String)) { - throw new Error("Expected the field `phone_number` to be a primitive type in the JSON string but got " + data['phone_number']); - } - // ensure the json data is an array - if (!Array.isArray(data['example'])) { - throw new Error("Expected the field `example` to be an array in the JSON data but got " + data['example']); - } - - return true; - } - - -} - - - -/** - * @member {module:model/TemplateComponentsPropInnerButtonsInner.TypeEnum} type - */ -TemplateComponentsPropInnerButtonsInner.prototype['type'] = undefined; - -/** - * @member {String} text - */ -TemplateComponentsPropInnerButtonsInner.prototype['text'] = undefined; - -/** - * @member {String} url - */ -TemplateComponentsPropInnerButtonsInner.prototype['url'] = undefined; - -/** - * @member {String} phone_number - */ -TemplateComponentsPropInnerButtonsInner.prototype['phone_number'] = undefined; - -/** - * @member {Array.} example - */ -TemplateComponentsPropInnerButtonsInner.prototype['example'] = undefined; - - - - - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -TemplateComponentsPropInnerButtonsInner['TypeEnum'] = { - - /** - * value: "PHONE_NUMBER" - * @const - */ - "PHONE_NUMBER": "PHONE_NUMBER", - - /** - * value: "URL" - * @const - */ - "URL": "URL", - - /** - * value: "QUICK_REPLY" - * @const - */ - "QUICK_REPLY": "QUICK_REPLY" -}; - - - -export default TemplateComponentsPropInnerButtonsInner; - diff --git a/js/src/model/TemplateLanguageProp.js b/js/src/model/TemplateLanguageProp.js deleted file mode 100644 index 41bb706..0000000 --- a/js/src/model/TemplateLanguageProp.js +++ /dev/null @@ -1,487 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -/** -* Enum class TemplateLanguageProp. -* @enum {} -* @readonly -*/ -export default class TemplateLanguageProp { - - /** - * value: "af" - * @const - */ - "af" = "af"; - - - /** - * value: "sq" - * @const - */ - "sq" = "sq"; - - - /** - * value: "ar" - * @const - */ - "ar" = "ar"; - - - /** - * value: "az" - * @const - */ - "az" = "az"; - - - /** - * value: "bn" - * @const - */ - "bn" = "bn"; - - - /** - * value: "bg" - * @const - */ - "bg" = "bg"; - - - /** - * value: "ca" - * @const - */ - "ca" = "ca"; - - - /** - * value: "zh_CN" - * @const - */ - "zh_CN" = "zh_CN"; - - - /** - * value: "zh_HK" - * @const - */ - "zh_HK" = "zh_HK"; - - - /** - * value: "zh_TW" - * @const - */ - "zh_TW" = "zh_TW"; - - - /** - * value: "hr" - * @const - */ - "hr" = "hr"; - - - /** - * value: "cs" - * @const - */ - "cs" = "cs"; - - - /** - * value: "da" - * @const - */ - "da" = "da"; - - - /** - * value: "nl" - * @const - */ - "nl" = "nl"; - - - /** - * value: "en" - * @const - */ - "en" = "en"; - - - /** - * value: "en_GB" - * @const - */ - "en_GB" = "en_GB"; - - - /** - * value: "en_US" - * @const - */ - "en_US" = "en_US"; - - - /** - * value: "et" - * @const - */ - "et" = "et"; - - - /** - * value: "fil" - * @const - */ - "fil" = "fil"; - - - /** - * value: "fi" - * @const - */ - "fi" = "fi"; - - - /** - * value: "fr" - * @const - */ - "fr" = "fr"; - - - /** - * value: "de" - * @const - */ - "de" = "de"; - - - /** - * value: "el" - * @const - */ - "el" = "el"; - - - /** - * value: "gu" - * @const - */ - "gu" = "gu"; - - - /** - * value: "he" - * @const - */ - "he" = "he"; - - - /** - * value: "hi" - * @const - */ - "hi" = "hi"; - - - /** - * value: "hu" - * @const - */ - "hu" = "hu"; - - - /** - * value: "id" - * @const - */ - "id" = "id"; - - - /** - * value: "ga" - * @const - */ - "ga" = "ga"; - - - /** - * value: "it" - * @const - */ - "it" = "it"; - - - /** - * value: "ja" - * @const - */ - "ja" = "ja"; - - - /** - * value: "kn" - * @const - */ - "kn" = "kn"; - - - /** - * value: "kk" - * @const - */ - "kk" = "kk"; - - - /** - * value: "ko" - * @const - */ - "ko" = "ko"; - - - /** - * value: "lo" - * @const - */ - "lo" = "lo"; - - - /** - * value: "lv" - * @const - */ - "lv" = "lv"; - - - /** - * value: "lt" - * @const - */ - "lt" = "lt"; - - - /** - * value: "mk" - * @const - */ - "mk" = "mk"; - - - /** - * value: "ms" - * @const - */ - "ms" = "ms"; - - - /** - * value: "mr" - * @const - */ - "mr" = "mr"; - - - /** - * value: "nb" - * @const - */ - "nb" = "nb"; - - - /** - * value: "fa" - * @const - */ - "fa" = "fa"; - - - /** - * value: "pl" - * @const - */ - "pl" = "pl"; - - - /** - * value: "pt_BR" - * @const - */ - "pt_BR" = "pt_BR"; - - - /** - * value: "pt_PT" - * @const - */ - "pt_PT" = "pt_PT"; - - - /** - * value: "pa" - * @const - */ - "pa" = "pa"; - - - /** - * value: "ro" - * @const - */ - "ro" = "ro"; - - - /** - * value: "ru" - * @const - */ - "ru" = "ru"; - - - /** - * value: "sr" - * @const - */ - "sr" = "sr"; - - - /** - * value: "sk" - * @const - */ - "sk" = "sk"; - - - /** - * value: "sl" - * @const - */ - "sl" = "sl"; - - - /** - * value: "es" - * @const - */ - "es" = "es"; - - - /** - * value: "es_AR" - * @const - */ - "es_AR" = "es_AR"; - - - /** - * value: "es_ES" - * @const - */ - "es_ES" = "es_ES"; - - - /** - * value: "es_MX" - * @const - */ - "es_MX" = "es_MX"; - - - /** - * value: "sw" - * @const - */ - "sw" = "sw"; - - - /** - * value: "sv" - * @const - */ - "sv" = "sv"; - - - /** - * value: "ta" - * @const - */ - "ta" = "ta"; - - - /** - * value: "te" - * @const - */ - "te" = "te"; - - - /** - * value: "th" - * @const - */ - "th" = "th"; - - - /** - * value: "tr" - * @const - */ - "tr" = "tr"; - - - /** - * value: "uk" - * @const - */ - "uk" = "uk"; - - - /** - * value: "ur" - * @const - */ - "ur" = "ur"; - - - /** - * value: "uz" - * @const - */ - "uz" = "uz"; - - - /** - * value: "vi" - * @const - */ - "vi" = "vi"; - - - - /** - * Returns a TemplateLanguageProp enum value from a Javascript object name. - * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/TemplateLanguageProp} The enum TemplateLanguageProp value. - */ - static constructFromObject(object) { - return object; - } -} - diff --git a/js/src/model/TemplateNamespaceField.js b/js/src/model/TemplateNamespaceField.js deleted file mode 100644 index c54d64b..0000000 --- a/js/src/model/TemplateNamespaceField.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The TemplateNamespaceField model module. - * @module model/TemplateNamespaceField - * @version 2.39.0 - */ -class TemplateNamespaceField { - /** - * Constructs a new TemplateNamespaceField. - * @alias module:model/TemplateNamespaceField - */ - constructor() { - - TemplateNamespaceField.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a TemplateNamespaceField from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateNamespaceField} obj Optional instance to populate. - * @return {module:model/TemplateNamespaceField} The populated TemplateNamespaceField instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateNamespaceField(); - - if (data.hasOwnProperty('namespace')) { - obj['namespace'] = ApiClient.convertToType(data['namespace'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateNamespaceField. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateNamespaceField. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) { - throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']); - } - - return true; - } - - -} - - - -/** - * @member {String} namespace - */ -TemplateNamespaceField.prototype['namespace'] = undefined; - - - - - - -export default TemplateNamespaceField; - diff --git a/js/src/model/UploadMedia.js b/js/src/model/UploadMedia.js deleted file mode 100644 index bc33f13..0000000 --- a/js/src/model/UploadMedia.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The UploadMedia model module. - * @module model/UploadMedia - * @version 2.39.0 - */ -class UploadMedia { - /** - * Constructs a new UploadMedia. - * @alias module:model/UploadMedia - * @param body {String} HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - */ - constructor(body) { - - UploadMedia.initialize(this, body); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, body) { - obj['body'] = body; - } - - /** - * Constructs a UploadMedia from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UploadMedia} obj Optional instance to populate. - * @return {module:model/UploadMedia} The populated UploadMedia instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UploadMedia(); - - if (data.hasOwnProperty('body')) { - obj['body'] = ApiClient.convertToType(data['body'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to UploadMedia. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to UploadMedia. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of UploadMedia.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['body'] && !(typeof data['body'] === 'string' || data['body'] instanceof String)) { - throw new Error("Expected the field `body` to be a primitive type in the JSON string but got " + data['body']); - } - - return true; - } - - -} - -UploadMedia.RequiredProperties = ["body"]; - -/** - * HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field - * @member {String} body - */ -UploadMedia.prototype['body'] = undefined; - - - - - - -export default UploadMedia; - diff --git a/js/src/model/WebhookUrl.js b/js/src/model/WebhookUrl.js deleted file mode 100644 index 5799b71..0000000 --- a/js/src/model/WebhookUrl.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The WebhookUrl model module. - * @module model/WebhookUrl - * @version 2.39.0 - */ -class WebhookUrl { - /** - * Constructs a new WebhookUrl. - * @alias module:model/WebhookUrl - * @param webhookUrl {String} Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - */ - constructor(webhookUrl) { - - WebhookUrl.initialize(this, webhookUrl); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, webhookUrl) { - obj['webhookUrl'] = webhookUrl; - } - - /** - * Constructs a WebhookUrl from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WebhookUrl} obj Optional instance to populate. - * @return {module:model/WebhookUrl} The populated WebhookUrl instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WebhookUrl(); - - if (data.hasOwnProperty('webhookUrl')) { - obj['webhookUrl'] = ApiClient.convertToType(data['webhookUrl'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to WebhookUrl. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to WebhookUrl. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of WebhookUrl.RequiredProperties) { - if (!data[property]) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - if (data['webhookUrl'] && !(typeof data['webhookUrl'] === 'string' || data['webhookUrl'] instanceof String)) { - throw new Error("Expected the field `webhookUrl` to be a primitive type in the JSON string but got " + data['webhookUrl']); - } - - return true; - } - - -} - -WebhookUrl.RequiredProperties = ["webhookUrl"]; - -/** - * Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - * @member {String} webhookUrl - */ -WebhookUrl.prototype['webhookUrl'] = undefined; - - - - - - -export default WebhookUrl; - diff --git a/js/test/api/ChannelApi.spec.js b/js/test/api/ChannelApi.spec.js deleted file mode 100644 index b6d63ec..0000000 --- a/js/test/api/ChannelApi.spec.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ChannelApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ChannelApi', function() { - describe('getCommerce', function() { - it('should call getCommerce successfully', function(done) { - //uncomment below and update the code to test getCommerce - //instance.getCommerce(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getExtendedStatistics', function() { - it('should call getExtendedStatistics successfully', function(done) { - //uncomment below and update the code to test getExtendedStatistics - //instance.getExtendedStatistics(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getMe', function() { - it('should call getMe successfully', function(done) { - //uncomment below and update the code to test getMe - //instance.getMe(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getSettings', function() { - it('should call getSettings successfully', function(done) { - //uncomment below and update the code to test getSettings - //instance.getSettings(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getStatistics', function() { - it('should call getStatistics successfully', function(done) { - //uncomment below and update the code to test getStatistics - //instance.getStatistics(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getStatus', function() { - it('should call getStatus successfully', function(done) { - //uncomment below and update the code to test getStatus - //instance.getStatus(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('outputIP', function() { - it('should call outputIP successfully', function(done) { - //uncomment below and update the code to test outputIP - //instance.outputIP(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('setMe', function() { - it('should call setMe successfully', function(done) { - //uncomment below and update the code to test setMe - //instance.setMe(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('setSettings', function() { - it('should call setSettings successfully', function(done) { - //uncomment below and update the code to test setSettings - //instance.setSettings(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/js/test/api/MediaApi.spec.js b/js/test/api/MediaApi.spec.js deleted file mode 100644 index 7855193..0000000 --- a/js/test/api/MediaApi.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.MediaApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('MediaApi', function() { - describe('uploadMedia', function() { - it('should call uploadMedia successfully', function(done) { - //uncomment below and update the code to test uploadMedia - //instance.uploadMedia(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/js/test/api/MessagingApi.spec.js b/js/test/api/MessagingApi.spec.js deleted file mode 100644 index 9e35099..0000000 --- a/js/test/api/MessagingApi.spec.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.MessagingApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('MessagingApi', function() { - describe('messagesList', function() { - it('should call messagesList successfully', function(done) { - //uncomment below and update the code to test messagesList - //instance.messagesList(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('readMessage', function() { - it('should call readMessage successfully', function(done) { - //uncomment below and update the code to test readMessage - //instance.readMessage(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('sendContact', function() { - it('should call sendContact successfully', function(done) { - //uncomment below and update the code to test sendContact - //instance.sendContact(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('sendFile', function() { - it('should call sendFile successfully', function(done) { - //uncomment below and update the code to test sendFile - //instance.sendFile(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('sendList', function() { - it('should call sendList successfully', function(done) { - //uncomment below and update the code to test sendList - //instance.sendList(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('sendLocation', function() { - it('should call sendLocation successfully', function(done) { - //uncomment below and update the code to test sendLocation - //instance.sendLocation(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('sendMessage', function() { - it('should call sendMessage successfully', function(done) { - //uncomment below and update the code to test sendMessage - //instance.sendMessage(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/js/test/api/ProductsCatalogsApi.spec.js b/js/test/api/ProductsCatalogsApi.spec.js deleted file mode 100644 index 94e0f40..0000000 --- a/js/test/api/ProductsCatalogsApi.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ProductsCatalogsApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ProductsCatalogsApi', function() { - describe('sendProduct', function() { - it('should call sendProduct successfully', function(done) { - //uncomment below and update the code to test sendProduct - //instance.sendProduct(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('setCommerce', function() { - it('should call setCommerce successfully', function(done) { - //uncomment below and update the code to test setCommerce - //instance.setCommerce(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/js/test/api/TemplatesApi.spec.js b/js/test/api/TemplatesApi.spec.js deleted file mode 100644 index bd8fd7b..0000000 --- a/js/test/api/TemplatesApi.spec.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.TemplatesApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplatesApi', function() { - describe('addTemplate', function() { - it('should call addTemplate successfully', function(done) { - //uncomment below and update the code to test addTemplate - //instance.addTemplate(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('removeTemplate', function() { - it('should call removeTemplate successfully', function(done) { - //uncomment below and update the code to test removeTemplate - //instance.removeTemplate(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('sendTemplate', function() { - it('should call sendTemplate successfully', function(done) { - //uncomment below and update the code to test sendTemplate - //instance.sendTemplate(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('templatesList', function() { - it('should call templatesList successfully', function(done) { - //uncomment below and update the code to test templatesList - //instance.templatesList(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/js/test/api/WebhooksApi.spec.js b/js/test/api/WebhooksApi.spec.js deleted file mode 100644 index c5b1a49..0000000 --- a/js/test/api/WebhooksApi.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.WebhooksApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('WebhooksApi', function() { - describe('ackHookInfo', function() { - it('should call ackHookInfo successfully', function(done) { - //uncomment below and update the code to test ackHookInfo - //instance.ackHookInfo(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('setWebhook', function() { - it('should call setWebhook successfully', function(done) { - //uncomment below and update the code to test setWebhook - //instance.setWebhook(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/js/test/model/Ack.spec.js b/js/test/model/Ack.spec.js deleted file mode 100644 index 96ed83e..0000000 --- a/js/test/model/Ack.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.Ack(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('Ack', function() { - it('should create an instance of Ack', function() { - // uncomment below and update the code to test Ack - //var instance = new 1msgWabaSdk.Ack(); - //expect(instance).to.be.a(1msgWabaSdk.Ack); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.Ack(); - //expect(instance).to.be(); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.Ack(); - //expect(instance).to.be(); - }); - - it('should have the property status (base name: "status")', function() { - // uncomment below and update the code to test the property status - //var instance = new 1msgWabaSdk.Ack(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/AddTemplateRequest.spec.js b/js/test/model/AddTemplateRequest.spec.js deleted file mode 100644 index c480768..0000000 --- a/js/test/model/AddTemplateRequest.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.AddTemplateRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('AddTemplateRequest', function() { - it('should create an instance of AddTemplateRequest', function() { - // uncomment below and update the code to test AddTemplateRequest - //var instance = new 1msgWabaSdk.AddTemplateRequest(); - //expect(instance).to.be.a(1msgWabaSdk.AddTemplateRequest); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new 1msgWabaSdk.AddTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property category (base name: "category")', function() { - // uncomment below and update the code to test the property category - //var instance = new 1msgWabaSdk.AddTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property components (base name: "components")', function() { - // uncomment below and update the code to test the property components - //var instance = new 1msgWabaSdk.AddTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property language (base name: "language")', function() { - // uncomment below and update the code to test the property language - //var instance = new 1msgWabaSdk.AddTemplateRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ChannelExtendedStatistics.spec.js b/js/test/model/ChannelExtendedStatistics.spec.js deleted file mode 100644 index 4131bec..0000000 --- a/js/test/model/ChannelExtendedStatistics.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.ChannelExtendedStatistics(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ChannelExtendedStatistics', function() { - it('should create an instance of ChannelExtendedStatistics', function() { - // uncomment below and update the code to test ChannelExtendedStatistics - //var instance = new OneMsgWabaSdk.ChannelExtendedStatistics(); - //expect(instance).to.be.a(OneMsgWabaSdk.ChannelExtendedStatistics); - }); - - }); - -})); diff --git a/js/test/model/ChannelExtendedStatisticsInner.spec.js b/js/test/model/ChannelExtendedStatisticsInner.spec.js deleted file mode 100644 index c2cd5a2..0000000 --- a/js/test/model/ChannelExtendedStatisticsInner.spec.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ChannelExtendedStatisticsInner', function() { - it('should create an instance of ChannelExtendedStatisticsInner', function() { - // uncomment below and update the code to test ChannelExtendedStatisticsInner - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be.a(1msgWabaSdk.ChannelExtendedStatisticsInner); - }); - - it('should have the property businessInitiatedPaidQuantity (base name: "business_initiated_paid_quantity")', function() { - // uncomment below and update the code to test the property businessInitiatedPaidQuantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property businessInitiatedPrice (base name: "business_initiated_price")', function() { - // uncomment below and update the code to test the property businessInitiatedPrice - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property businessInitiatedQuantity (base name: "business_initiated_quantity")', function() { - // uncomment below and update the code to test the property businessInitiatedQuantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property freeEntryPoint (base name: "free_entry_point")', function() { - // uncomment below and update the code to test the property freeEntryPoint - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property freeQuantity (base name: "free_quantity")', function() { - // uncomment below and update the code to test the property freeQuantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property freeTier (base name: "free_tier")', function() { - // uncomment below and update the code to test the property freeTier - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property paidQuantity (base name: "paid_quantity")', function() { - // uncomment below and update the code to test the property paidQuantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property periodDate (base name: "period_date")', function() { - // uncomment below and update the code to test the property periodDate - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property quantity (base name: "quantity")', function() { - // uncomment below and update the code to test the property quantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property totalPrice (base name: "total_price")', function() { - // uncomment below and update the code to test the property totalPrice - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property userInitiatedPaidQuantity (base name: "user_initiated_paid_quantity")', function() { - // uncomment below and update the code to test the property userInitiatedPaidQuantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property userInitiatedPrice (base name: "user_initiated_price")', function() { - // uncomment below and update the code to test the property userInitiatedPrice - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - it('should have the property userInitiatedQuantity (base name: "user_initiated_quantity")', function() { - // uncomment below and update the code to test the property userInitiatedQuantity - //var instance = new 1msgWabaSdk.ChannelExtendedStatisticsInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ChannelStatistics.spec.js b/js/test/model/ChannelStatistics.spec.js deleted file mode 100644 index c8fee30..0000000 --- a/js/test/model/ChannelStatistics.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ChannelStatistics(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ChannelStatistics', function() { - it('should create an instance of ChannelStatistics', function() { - // uncomment below and update the code to test ChannelStatistics - //var instance = new 1msgWabaSdk.ChannelStatistics(); - //expect(instance).to.be.a(1msgWabaSdk.ChannelStatistics); - }); - - it('should have the property date (base name: "date")', function() { - // uncomment below and update the code to test the property date - //var instance = new 1msgWabaSdk.ChannelStatistics(); - //expect(instance).to.be(); - }); - - it('should have the property templatesCost (base name: "templates_cost")', function() { - // uncomment below and update the code to test the property templatesCost - //var instance = new 1msgWabaSdk.ChannelStatistics(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ChannelStatus.spec.js b/js/test/model/ChannelStatus.spec.js deleted file mode 100644 index 7729830..0000000 --- a/js/test/model/ChannelStatus.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ChannelStatus(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ChannelStatus', function() { - it('should create an instance of ChannelStatus', function() { - // uncomment below and update the code to test ChannelStatus - //var instance = new 1msgWabaSdk.ChannelStatus(); - //expect(instance).to.be.a(1msgWabaSdk.ChannelStatus); - }); - - it('should have the property status (base name: "status")', function() { - // uncomment below and update the code to test the property status - //var instance = new 1msgWabaSdk.ChannelStatus(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ChatIdProp.spec.js b/js/test/model/ChatIdProp.spec.js deleted file mode 100644 index 333431c..0000000 --- a/js/test/model/ChatIdProp.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.ChatIdProp(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ChatIdProp', function() { - it('should create an instance of ChatIdProp', function() { - // uncomment below and update the code to test ChatIdProp - //var instance = new OneMsgWabaSdk.ChatIdProp(); - //expect(instance).to.be.a(OneMsgWabaSdk.ChatIdProp); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new OneMsgWabaSdk.ChatIdProp(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/Commerce.spec.js b/js/test/model/Commerce.spec.js deleted file mode 100644 index bd8bba2..0000000 --- a/js/test/model/Commerce.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.Commerce(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('Commerce', function() { - it('should create an instance of Commerce', function() { - // uncomment below and update the code to test Commerce - //var instance = new 1msgWabaSdk.Commerce(); - //expect(instance).to.be.a(1msgWabaSdk.Commerce); - }); - - it('should have the property params (base name: "params")', function() { - // uncomment below and update the code to test the property params - //var instance = new 1msgWabaSdk.Commerce(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/CommerceParams.spec.js b/js/test/model/CommerceParams.spec.js deleted file mode 100644 index fb0b77b..0000000 --- a/js/test/model/CommerceParams.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.CommerceParams(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('CommerceParams', function() { - it('should create an instance of CommerceParams', function() { - // uncomment below and update the code to test CommerceParams - //var instance = new 1msgWabaSdk.CommerceParams(); - //expect(instance).to.be.a(1msgWabaSdk.CommerceParams); - }); - - it('should have the property isCartEnabled (base name: "is_cart_enabled")', function() { - // uncomment below and update the code to test the property isCartEnabled - //var instance = new 1msgWabaSdk.CommerceParams(); - //expect(instance).to.be(); - }); - - it('should have the property isCatalogVisible (base name: "is_catalog_visible")', function() { - // uncomment below and update the code to test the property isCatalogVisible - //var instance = new 1msgWabaSdk.CommerceParams(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/Contacts.spec.js b/js/test/model/Contacts.spec.js deleted file mode 100644 index 8dc3eaf..0000000 --- a/js/test/model/Contacts.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.Contacts(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('Contacts', function() { - it('should create an instance of Contacts', function() { - // uncomment below and update the code to test Contacts - //var instance = new 1msgWabaSdk.Contacts(); - //expect(instance).to.be.a(1msgWabaSdk.Contacts); - }); - - it('should have the property contacts (base name: "contacts")', function() { - // uncomment below and update the code to test the property contacts - //var instance = new 1msgWabaSdk.Contacts(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ContactsContactsInner.spec.js b/js/test/model/ContactsContactsInner.spec.js deleted file mode 100644 index 12593f8..0000000 --- a/js/test/model/ContactsContactsInner.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ContactsContactsInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ContactsContactsInner', function() { - it('should create an instance of ContactsContactsInner', function() { - // uncomment below and update the code to test ContactsContactsInner - //var instance = new 1msgWabaSdk.ContactsContactsInner(); - //expect(instance).to.be.a(1msgWabaSdk.ContactsContactsInner); - }); - - it('should have the property input (base name: "input")', function() { - // uncomment below and update the code to test the property input - //var instance = new 1msgWabaSdk.ContactsContactsInner(); - //expect(instance).to.be(); - }); - - it('should have the property status (base name: "status")', function() { - // uncomment below and update the code to test the property status - //var instance = new 1msgWabaSdk.ContactsContactsInner(); - //expect(instance).to.be(); - }); - - it('should have the property waId (base name: "wa_id")', function() { - // uncomment below and update the code to test the property waId - //var instance = new 1msgWabaSdk.ContactsContactsInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ContactsRequest.spec.js b/js/test/model/ContactsRequest.spec.js deleted file mode 100644 index d84a8fe..0000000 --- a/js/test/model/ContactsRequest.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ContactsRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ContactsRequest', function() { - it('should create an instance of ContactsRequest', function() { - // uncomment below and update the code to test ContactsRequest - //var instance = new 1msgWabaSdk.ContactsRequest(); - //expect(instance).to.be.a(1msgWabaSdk.ContactsRequest); - }); - - it('should have the property blocking (base name: "blocking")', function() { - // uncomment below and update the code to test the property blocking - //var instance = new 1msgWabaSdk.ContactsRequest(); - //expect(instance).to.be(); - }); - - it('should have the property forceCheck (base name: "force_check")', function() { - // uncomment below and update the code to test the property forceCheck - //var instance = new 1msgWabaSdk.ContactsRequest(); - //expect(instance).to.be(); - }); - - it('should have the property contacts (base name: "contacts")', function() { - // uncomment below and update the code to test the property contacts - //var instance = new 1msgWabaSdk.ContactsRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetAckInfo.spec.js b/js/test/model/GetAckInfo.spec.js deleted file mode 100644 index 2176809..0000000 --- a/js/test/model/GetAckInfo.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetAckInfo(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetAckInfo', function() { - it('should create an instance of GetAckInfo', function() { - // uncomment below and update the code to test GetAckInfo - //var instance = new 1msgWabaSdk.GetAckInfo(); - //expect(instance).to.be.a(1msgWabaSdk.GetAckInfo); - }); - - it('should have the property hooks (base name: "hooks")', function() { - // uncomment below and update the code to test the property hooks - //var instance = new 1msgWabaSdk.GetAckInfo(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetAckInfoHooksInner.spec.js b/js/test/model/GetAckInfoHooksInner.spec.js deleted file mode 100644 index ca6ceb4..0000000 --- a/js/test/model/GetAckInfoHooksInner.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetAckInfoHooksInner', function() { - it('should create an instance of GetAckInfoHooksInner', function() { - // uncomment below and update the code to test GetAckInfoHooksInner - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be.a(1msgWabaSdk.GetAckInfoHooksInner); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - it('should have the property type (base name: "type")', function() { - // uncomment below and update the code to test the property type - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - it('should have the property status (base name: "status")', function() { - // uncomment below and update the code to test the property status - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - it('should have the property pricing (base name: "pricing")', function() { - // uncomment below and update the code to test the property pricing - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - it('should have the property timestamp (base name: "timestamp")', function() { - // uncomment below and update the code to test the property timestamp - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - it('should have the property conversation (base name: "conversation")', function() { - // uncomment below and update the code to test the property conversation - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - it('should have the property recipientId (base name: "recipient_id")', function() { - // uncomment below and update the code to test the property recipientId - //var instance = new 1msgWabaSdk.GetAckInfoHooksInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetCommerce.spec.js b/js/test/model/GetCommerce.spec.js deleted file mode 100644 index 1484f59..0000000 --- a/js/test/model/GetCommerce.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.GetCommerce(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetCommerce', function() { - it('should create an instance of GetCommerce', function() { - // uncomment below and update the code to test GetCommerce - //var instance = new OneMsgWabaSdk.GetCommerce(); - //expect(instance).to.be.a(OneMsgWabaSdk.GetCommerce); - }); - - }); - -})); diff --git a/js/test/model/GetCommerceInner.spec.js b/js/test/model/GetCommerceInner.spec.js deleted file mode 100644 index f2f0b4d..0000000 --- a/js/test/model/GetCommerceInner.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetCommerceInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetCommerceInner', function() { - it('should create an instance of GetCommerceInner', function() { - // uncomment below and update the code to test GetCommerceInner - //var instance = new 1msgWabaSdk.GetCommerceInner(); - //expect(instance).to.be.a(1msgWabaSdk.GetCommerceInner); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.GetCommerceInner(); - //expect(instance).to.be(); - }); - - it('should have the property isCartEnabled (base name: "is_cart_enabled")', function() { - // uncomment below and update the code to test the property isCartEnabled - //var instance = new 1msgWabaSdk.GetCommerceInner(); - //expect(instance).to.be(); - }); - - it('should have the property isCatalogVisible (base name: "is_catalog_visible")', function() { - // uncomment below and update the code to test the property isCatalogVisible - //var instance = new 1msgWabaSdk.GetCommerceInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetIP.spec.js b/js/test/model/GetIP.spec.js deleted file mode 100644 index 956e317..0000000 --- a/js/test/model/GetIP.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetIP(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetIP', function() { - it('should create an instance of GetIP', function() { - // uncomment below and update the code to test GetIP - //var instance = new 1msgWabaSdk.GetIP(); - //expect(instance).to.be.a(1msgWabaSdk.GetIP); - }); - - it('should have the property result (base name: "result")', function() { - // uncomment below and update the code to test the property result - //var instance = new 1msgWabaSdk.GetIP(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetMe.spec.js b/js/test/model/GetMe.spec.js deleted file mode 100644 index 516b699..0000000 --- a/js/test/model/GetMe.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetMe(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetMe', function() { - it('should create an instance of GetMe', function() { - // uncomment below and update the code to test GetMe - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be.a(1msgWabaSdk.GetMe); - }); - - it('should have the property about (base name: "about")', function() { - // uncomment below and update the code to test the property about - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - it('should have the property address (base name: "address")', function() { - // uncomment below and update the code to test the property address - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - it('should have the property description (base name: "description")', function() { - // uncomment below and update the code to test the property description - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - it('should have the property email (base name: "email")', function() { - // uncomment below and update the code to test the property email - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - it('should have the property vertical (base name: "vertical")', function() { - // uncomment below and update the code to test the property vertical - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - it('should have the property photo (base name: "photo")', function() { - // uncomment below and update the code to test the property photo - //var instance = new 1msgWabaSdk.GetMe(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetMe401Response.spec.js b/js/test/model/GetMe401Response.spec.js deleted file mode 100644 index 77ccfbc..0000000 --- a/js/test/model/GetMe401Response.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetMe401Response(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetMe401Response', function() { - it('should create an instance of GetMe401Response', function() { - // uncomment below and update the code to test GetMe401Response - //var instance = new 1msgWabaSdk.GetMe401Response(); - //expect(instance).to.be.a(1msgWabaSdk.GetMe401Response); - }); - - it('should have the property error (base name: "error")', function() { - // uncomment below and update the code to test the property error - //var instance = new 1msgWabaSdk.GetMe401Response(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetMessages.spec.js b/js/test/model/GetMessages.spec.js deleted file mode 100644 index d9c48a5..0000000 --- a/js/test/model/GetMessages.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetMessages(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetMessages', function() { - it('should create an instance of GetMessages', function() { - // uncomment below and update the code to test GetMessages - //var instance = new 1msgWabaSdk.GetMessages(); - //expect(instance).to.be.a(1msgWabaSdk.GetMessages); - }); - - it('should have the property messages (base name: "messages")', function() { - // uncomment below and update the code to test the property messages - //var instance = new 1msgWabaSdk.GetMessages(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetMessagesMessagesInner.spec.js b/js/test/model/GetMessagesMessagesInner.spec.js deleted file mode 100644 index da20027..0000000 --- a/js/test/model/GetMessagesMessagesInner.spec.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetMessagesMessagesInner', function() { - it('should create an instance of GetMessagesMessagesInner', function() { - // uncomment below and update the code to test GetMessagesMessagesInner - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be.a(1msgWabaSdk.GetMessagesMessagesInner); - }); - - it('should have the property messageNumber (base name: "messageNumber")', function() { - // uncomment below and update the code to test the property messageNumber - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property fromMe (base name: "fromMe")', function() { - // uncomment below and update the code to test the property fromMe - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property self (base name: "self")', function() { - // uncomment below and update the code to test the property self - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property isForwarded (base name: "isForwarded")', function() { - // uncomment below and update the code to test the property isForwarded - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property author (base name: "author")', function() { - // uncomment below and update the code to test the property author - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property time (base name: "time")', function() { - // uncomment below and update the code to test the property time - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property type (base name: "type")', function() { - // uncomment below and update the code to test the property type - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property senderName (base name: "senderName")', function() { - // uncomment below and update the code to test the property senderName - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property caption (base name: "caption")', function() { - // uncomment below and update the code to test the property caption - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property quotedMsgId (base name: "quotedMsgId")', function() { - // uncomment below and update the code to test the property quotedMsgId - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property metadata (base name: "metadata")', function() { - // uncomment below and update the code to test the property metadata - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - it('should have the property chatName (base name: "chatName")', function() { - // uncomment below and update the code to test the property chatName - //var instance = new 1msgWabaSdk.GetMessagesMessagesInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetTemplates.spec.js b/js/test/model/GetTemplates.spec.js deleted file mode 100644 index cee7d81..0000000 --- a/js/test/model/GetTemplates.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetTemplates(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetTemplates', function() { - it('should create an instance of GetTemplates', function() { - // uncomment below and update the code to test GetTemplates - //var instance = new 1msgWabaSdk.GetTemplates(); - //expect(instance).to.be.a(1msgWabaSdk.GetTemplates); - }); - - it('should have the property total (base name: "total")', function() { - // uncomment below and update the code to test the property total - //var instance = new 1msgWabaSdk.GetTemplates(); - //expect(instance).to.be(); - }); - - it('should have the property templates (base name: "templates")', function() { - // uncomment below and update the code to test the property templates - //var instance = new 1msgWabaSdk.GetTemplates(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/GetTemplatesTemplatesInner.spec.js b/js/test/model/GetTemplatesTemplatesInner.spec.js deleted file mode 100644 index ff1ebf5..0000000 --- a/js/test/model/GetTemplatesTemplatesInner.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetTemplatesTemplatesInner', function() { - it('should create an instance of GetTemplatesTemplatesInner', function() { - // uncomment below and update the code to test GetTemplatesTemplatesInner - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be.a(1msgWabaSdk.GetTemplatesTemplatesInner); - }); - - it('should have the property category (base name: "category")', function() { - // uncomment below and update the code to test the property category - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - it('should have the property components (base name: "components")', function() { - // uncomment below and update the code to test the property components - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - it('should have the property language (base name: "language")', function() { - // uncomment below and update the code to test the property language - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - it('should have the property namespace (base name: "namespace")', function() { - // uncomment below and update the code to test the property namespace - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - it('should have the property rejectedReason (base name: "rejected_reason")', function() { - // uncomment below and update the code to test the property rejectedReason - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - it('should have the property status (base name: "status")', function() { - // uncomment below and update the code to test the property status - //var instance = new 1msgWabaSdk.GetTemplatesTemplatesInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/MeComponents.spec.js b/js/test/model/MeComponents.spec.js deleted file mode 100644 index 1925283..0000000 --- a/js/test/model/MeComponents.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.MeComponents(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('MeComponents', function() { - it('should create an instance of MeComponents', function() { - // uncomment below and update the code to test MeComponents - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be.a(1msgWabaSdk.MeComponents); - }); - - it('should have the property about (base name: "about")', function() { - // uncomment below and update the code to test the property about - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - it('should have the property address (base name: "address")', function() { - // uncomment below and update the code to test the property address - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - it('should have the property description (base name: "description")', function() { - // uncomment below and update the code to test the property description - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - it('should have the property email (base name: "email")', function() { - // uncomment below and update the code to test the property email - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - it('should have the property vertical (base name: "vertical")', function() { - // uncomment below and update the code to test the property vertical - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - it('should have the property photo (base name: "photo")', function() { - // uncomment below and update the code to test the property photo - //var instance = new 1msgWabaSdk.MeComponents(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/MediaId.spec.js b/js/test/model/MediaId.spec.js deleted file mode 100644 index 18afa70..0000000 --- a/js/test/model/MediaId.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.MediaId(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('MediaId', function() { - it('should create an instance of MediaId', function() { - // uncomment below and update the code to test MediaId - //var instance = new 1msgWabaSdk.MediaId(); - //expect(instance).to.be.a(1msgWabaSdk.MediaId); - }); - - it('should have the property mediaId (base name: "mediaId")', function() { - // uncomment below and update the code to test the property mediaId - //var instance = new 1msgWabaSdk.MediaId(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/Message.spec.js b/js/test/model/Message.spec.js deleted file mode 100644 index 1f4656a..0000000 --- a/js/test/model/Message.spec.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.Message(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('Message', function() { - it('should create an instance of Message', function() { - // uncomment below and update the code to test Message - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be.a(1msgWabaSdk.Message); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property fromMe (base name: "fromMe")', function() { - // uncomment below and update the code to test the property fromMe - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property self (base name: "self")', function() { - // uncomment below and update the code to test the property self - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property isForwarded (base name: "isForwarded")', function() { - // uncomment below and update the code to test the property isForwarded - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property author (base name: "author")', function() { - // uncomment below and update the code to test the property author - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property time (base name: "time")', function() { - // uncomment below and update the code to test the property time - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property type (base name: "type")', function() { - // uncomment below and update the code to test the property type - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property senderName (base name: "senderName")', function() { - // uncomment below and update the code to test the property senderName - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property caption (base name: "caption")', function() { - // uncomment below and update the code to test the property caption - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - it('should have the property quotedMsgId (base name: "quotedMsgId")', function() { - // uncomment below and update the code to test the property quotedMsgId - //var instance = new 1msgWabaSdk.Message(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/MessageIdProp.spec.js b/js/test/model/MessageIdProp.spec.js deleted file mode 100644 index 94235cd..0000000 --- a/js/test/model/MessageIdProp.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.MessageIdProp(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('MessageIdProp', function() { - it('should create an instance of MessageIdProp', function() { - // uncomment below and update the code to test MessageIdProp - //var instance = new OneMsgWabaSdk.MessageIdProp(); - //expect(instance).to.be.a(OneMsgWabaSdk.MessageIdProp); - }); - - it('should have the property messageId (base name: "messageId")', function() { - // uncomment below and update the code to test the property messageId - //var instance = new OneMsgWabaSdk.MessageIdProp(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/PhoneProp.spec.js b/js/test/model/PhoneProp.spec.js deleted file mode 100644 index aac0067..0000000 --- a/js/test/model/PhoneProp.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.PhoneProp(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('PhoneProp', function() { - it('should create an instance of PhoneProp', function() { - // uncomment below and update the code to test PhoneProp - //var instance = new OneMsgWabaSdk.PhoneProp(); - //expect(instance).to.be.a(OneMsgWabaSdk.PhoneProp); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new OneMsgWabaSdk.PhoneProp(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/ReadMessageRequest.spec.js b/js/test/model/ReadMessageRequest.spec.js deleted file mode 100644 index 0830429..0000000 --- a/js/test/model/ReadMessageRequest.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.ReadMessageRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ReadMessageRequest', function() { - it('should create an instance of ReadMessageRequest', function() { - // uncomment below and update the code to test ReadMessageRequest - //var instance = new 1msgWabaSdk.ReadMessageRequest(); - //expect(instance).to.be.a(1msgWabaSdk.ReadMessageRequest); - }); - - it('should have the property messageId (base name: "messageId")', function() { - // uncomment below and update the code to test the property messageId - //var instance = new 1msgWabaSdk.ReadMessageRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/RemoveTemplateRequest.spec.js b/js/test/model/RemoveTemplateRequest.spec.js deleted file mode 100644 index 14c7ccc..0000000 --- a/js/test/model/RemoveTemplateRequest.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.RemoveTemplateRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('RemoveTemplateRequest', function() { - it('should create an instance of RemoveTemplateRequest', function() { - // uncomment below and update the code to test RemoveTemplateRequest - //var instance = new 1msgWabaSdk.RemoveTemplateRequest(); - //expect(instance).to.be.a(1msgWabaSdk.RemoveTemplateRequest); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new 1msgWabaSdk.RemoveTemplateRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendContactRequest.spec.js b/js/test/model/SendContactRequest.spec.js deleted file mode 100644 index a6ee2f4..0000000 --- a/js/test/model/SendContactRequest.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendContactRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendContactRequest', function() { - it('should create an instance of SendContactRequest', function() { - // uncomment below and update the code to test SendContactRequest - //var instance = new 1msgWabaSdk.SendContactRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendContactRequest); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendContactRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendContactRequest(); - //expect(instance).to.be(); - }); - - it('should have the property contacts (base name: "contacts")', function() { - // uncomment below and update the code to test the property contacts - //var instance = new 1msgWabaSdk.SendContactRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendFileRequest.spec.js b/js/test/model/SendFileRequest.spec.js deleted file mode 100644 index e955395..0000000 --- a/js/test/model/SendFileRequest.spec.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendFileRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendFileRequest', function() { - it('should create an instance of SendFileRequest', function() { - // uncomment below and update the code to test SendFileRequest - //var instance = new 1msgWabaSdk.SendFileRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendFileRequest); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendFileRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendFileRequest(); - //expect(instance).to.be(); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.SendFileRequest(); - //expect(instance).to.be(); - }); - - it('should have the property filename (base name: "filename")', function() { - // uncomment below and update the code to test the property filename - //var instance = new 1msgWabaSdk.SendFileRequest(); - //expect(instance).to.be(); - }); - - it('should have the property caption (base name: "caption")', function() { - // uncomment below and update the code to test the property caption - //var instance = new 1msgWabaSdk.SendFileRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendListRequest.spec.js b/js/test/model/SendListRequest.spec.js deleted file mode 100644 index 5630754..0000000 --- a/js/test/model/SendListRequest.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendListRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendListRequest', function() { - it('should create an instance of SendListRequest', function() { - // uncomment below and update the code to test SendListRequest - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendListRequest); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - it('should have the property header (base name: "header")', function() { - // uncomment below and update the code to test the property header - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - it('should have the property footer (base name: "footer")', function() { - // uncomment below and update the code to test the property footer - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - it('should have the property action (base name: "action")', function() { - // uncomment below and update the code to test the property action - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - it('should have the property sections (base name: "sections")', function() { - // uncomment below and update the code to test the property sections - //var instance = new 1msgWabaSdk.SendListRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendListRequestAllOfRows.spec.js b/js/test/model/SendListRequestAllOfRows.spec.js deleted file mode 100644 index b4f8b54..0000000 --- a/js/test/model/SendListRequestAllOfRows.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendListRequestAllOfRows(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendListRequestAllOfRows', function() { - it('should create an instance of SendListRequestAllOfRows', function() { - // uncomment below and update the code to test SendListRequestAllOfRows - //var instance = new 1msgWabaSdk.SendListRequestAllOfRows(); - //expect(instance).to.be.a(1msgWabaSdk.SendListRequestAllOfRows); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.SendListRequestAllOfRows(); - //expect(instance).to.be(); - }); - - it('should have the property title (base name: "title")', function() { - // uncomment below and update the code to test the property title - //var instance = new 1msgWabaSdk.SendListRequestAllOfRows(); - //expect(instance).to.be(); - }); - - it('should have the property description (base name: "description")', function() { - // uncomment below and update the code to test the property description - //var instance = new 1msgWabaSdk.SendListRequestAllOfRows(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendListRequestAllOfSections.spec.js b/js/test/model/SendListRequestAllOfSections.spec.js deleted file mode 100644 index b00db65..0000000 --- a/js/test/model/SendListRequestAllOfSections.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendListRequestAllOfSections(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendListRequestAllOfSections', function() { - it('should create an instance of SendListRequestAllOfSections', function() { - // uncomment below and update the code to test SendListRequestAllOfSections - //var instance = new 1msgWabaSdk.SendListRequestAllOfSections(); - //expect(instance).to.be.a(1msgWabaSdk.SendListRequestAllOfSections); - }); - - it('should have the property title (base name: "title")', function() { - // uncomment below and update the code to test the property title - //var instance = new 1msgWabaSdk.SendListRequestAllOfSections(); - //expect(instance).to.be(); - }); - - it('should have the property rows (base name: "rows")', function() { - // uncomment below and update the code to test the property rows - //var instance = new 1msgWabaSdk.SendListRequestAllOfSections(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendLocationRequest.spec.js b/js/test/model/SendLocationRequest.spec.js deleted file mode 100644 index 822a5ce..0000000 --- a/js/test/model/SendLocationRequest.spec.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendLocationRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendLocationRequest', function() { - it('should create an instance of SendLocationRequest', function() { - // uncomment below and update the code to test SendLocationRequest - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendLocationRequest); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be(); - }); - - it('should have the property lat (base name: "lat")', function() { - // uncomment below and update the code to test the property lat - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be(); - }); - - it('should have the property lng (base name: "lng")', function() { - // uncomment below and update the code to test the property lng - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be(); - }); - - it('should have the property address (base name: "address")', function() { - // uncomment below and update the code to test the property address - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be(); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new 1msgWabaSdk.SendLocationRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendMessageRequest.spec.js b/js/test/model/SendMessageRequest.spec.js deleted file mode 100644 index 0704c98..0000000 --- a/js/test/model/SendMessageRequest.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendMessageRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendMessageRequest', function() { - it('should create an instance of SendMessageRequest', function() { - // uncomment below and update the code to test SendMessageRequest - //var instance = new 1msgWabaSdk.SendMessageRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendMessageRequest); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendMessageRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendMessageRequest(); - //expect(instance).to.be(); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.SendMessageRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendMessageStatus.spec.js b/js/test/model/SendMessageStatus.spec.js deleted file mode 100644 index 9762a41..0000000 --- a/js/test/model/SendMessageStatus.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendMessageStatus(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendMessageStatus', function() { - it('should create an instance of SendMessageStatus', function() { - // uncomment below and update the code to test SendMessageStatus - //var instance = new 1msgWabaSdk.SendMessageStatus(); - //expect(instance).to.be.a(1msgWabaSdk.SendMessageStatus); - }); - - it('should have the property sent (base name: "sent")', function() { - // uncomment below and update the code to test the property sent - //var instance = new 1msgWabaSdk.SendMessageStatus(); - //expect(instance).to.be(); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new 1msgWabaSdk.SendMessageStatus(); - //expect(instance).to.be(); - }); - - it('should have the property message (base name: "message")', function() { - // uncomment below and update the code to test the property message - //var instance = new 1msgWabaSdk.SendMessageStatus(); - //expect(instance).to.be(); - }); - - it('should have the property description (base name: "description")', function() { - // uncomment below and update the code to test the property description - //var instance = new 1msgWabaSdk.SendMessageStatus(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendProductRequest.spec.js b/js/test/model/SendProductRequest.spec.js deleted file mode 100644 index c0b3ff8..0000000 --- a/js/test/model/SendProductRequest.spec.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendProductRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendProductRequest', function() { - it('should create an instance of SendProductRequest', function() { - // uncomment below and update the code to test SendProductRequest - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendProductRequest); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be(); - }); - - it('should have the property action (base name: "action")', function() { - // uncomment below and update the code to test the property action - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be(); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be(); - }); - - it('should have the property footer (base name: "footer")', function() { - // uncomment below and update the code to test the property footer - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be(); - }); - - it('should have the property header (base name: "header")', function() { - // uncomment below and update the code to test the property header - //var instance = new 1msgWabaSdk.SendProductRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendProductRequestAllOfAction.spec.js b/js/test/model/SendProductRequestAllOfAction.spec.js deleted file mode 100644 index ab0c423..0000000 --- a/js/test/model/SendProductRequestAllOfAction.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendProductRequestAllOfAction(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendProductRequestAllOfAction', function() { - it('should create an instance of SendProductRequestAllOfAction', function() { - // uncomment below and update the code to test SendProductRequestAllOfAction - //var instance = new 1msgWabaSdk.SendProductRequestAllOfAction(); - //expect(instance).to.be.a(1msgWabaSdk.SendProductRequestAllOfAction); - }); - - it('should have the property catalogId (base name: "catalog_id")', function() { - // uncomment below and update the code to test the property catalogId - //var instance = new 1msgWabaSdk.SendProductRequestAllOfAction(); - //expect(instance).to.be(); - }); - - it('should have the property productRetailerId (base name: "product_retailer_id")', function() { - // uncomment below and update the code to test the property productRetailerId - //var instance = new 1msgWabaSdk.SendProductRequestAllOfAction(); - //expect(instance).to.be(); - }); - - it('should have the property sections (base name: "sections")', function() { - // uncomment below and update the code to test the property sections - //var instance = new 1msgWabaSdk.SendProductRequestAllOfAction(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendProductRequestAllOfActionProductItems.spec.js b/js/test/model/SendProductRequestAllOfActionProductItems.spec.js deleted file mode 100644 index 15b0ed0..0000000 --- a/js/test/model/SendProductRequestAllOfActionProductItems.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendProductRequestAllOfActionProductItems(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendProductRequestAllOfActionProductItems', function() { - it('should create an instance of SendProductRequestAllOfActionProductItems', function() { - // uncomment below and update the code to test SendProductRequestAllOfActionProductItems - //var instance = new 1msgWabaSdk.SendProductRequestAllOfActionProductItems(); - //expect(instance).to.be.a(1msgWabaSdk.SendProductRequestAllOfActionProductItems); - }); - - it('should have the property productRetailerId (base name: "product_retailer_id")', function() { - // uncomment below and update the code to test the property productRetailerId - //var instance = new 1msgWabaSdk.SendProductRequestAllOfActionProductItems(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendProductRequestAllOfActionSections.spec.js b/js/test/model/SendProductRequestAllOfActionSections.spec.js deleted file mode 100644 index 6f70282..0000000 --- a/js/test/model/SendProductRequestAllOfActionSections.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendProductRequestAllOfActionSections(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendProductRequestAllOfActionSections', function() { - it('should create an instance of SendProductRequestAllOfActionSections', function() { - // uncomment below and update the code to test SendProductRequestAllOfActionSections - //var instance = new 1msgWabaSdk.SendProductRequestAllOfActionSections(); - //expect(instance).to.be.a(1msgWabaSdk.SendProductRequestAllOfActionSections); - }); - - it('should have the property title (base name: "title")', function() { - // uncomment below and update the code to test the property title - //var instance = new 1msgWabaSdk.SendProductRequestAllOfActionSections(); - //expect(instance).to.be(); - }); - - it('should have the property productItems (base name: "product_items")', function() { - // uncomment below and update the code to test the property productItems - //var instance = new 1msgWabaSdk.SendProductRequestAllOfActionSections(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequest.spec.js b/js/test/model/SendTemplateRequest.spec.js deleted file mode 100644 index 6b384b3..0000000 --- a/js/test/model/SendTemplateRequest.spec.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequest', function() { - it('should create an instance of SendTemplateRequest', function() { - // uncomment below and update the code to test SendTemplateRequest - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequest); - }); - - it('should have the property namespace (base name: "namespace")', function() { - // uncomment below and update the code to test the property namespace - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property chatId (base name: "chatId")', function() { - // uncomment below and update the code to test the property chatId - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property template (base name: "template")', function() { - // uncomment below and update the code to test the property template - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property language (base name: "language")', function() { - // uncomment below and update the code to test the property language - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be(); - }); - - it('should have the property params (base name: "params")', function() { - // uncomment below and update the code to test the property params - //var instance = new 1msgWabaSdk.SendTemplateRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequestAllOfCurrency.spec.js b/js/test/model/SendTemplateRequestAllOfCurrency.spec.js deleted file mode 100644 index 6c0b1a6..0000000 --- a/js/test/model/SendTemplateRequestAllOfCurrency.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequestAllOfCurrency(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequestAllOfCurrency', function() { - it('should create an instance of SendTemplateRequestAllOfCurrency', function() { - // uncomment below and update the code to test SendTemplateRequestAllOfCurrency - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfCurrency(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequestAllOfCurrency); - }); - - it('should have the property currencyCode (base name: "currency_code")', function() { - // uncomment below and update the code to test the property currencyCode - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfCurrency(); - //expect(instance).to.be(); - }); - - it('should have the property amount1000 (base name: "amount_1000")', function() { - // uncomment below and update the code to test the property amount1000 - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfCurrency(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequestAllOfDateTime.spec.js b/js/test/model/SendTemplateRequestAllOfDateTime.spec.js deleted file mode 100644 index e9bce65..0000000 --- a/js/test/model/SendTemplateRequestAllOfDateTime.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTime(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequestAllOfDateTime', function() { - it('should create an instance of SendTemplateRequestAllOfDateTime', function() { - // uncomment below and update the code to test SendTemplateRequestAllOfDateTime - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTime(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequestAllOfDateTime); - }); - - it('should have the property component (base name: "component")', function() { - // uncomment below and update the code to test the property component - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTime(); - //expect(instance).to.be(); - }); - - it('should have the property unixEpoch (base name: "unix_epoch")', function() { - // uncomment below and update the code to test the property unixEpoch - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTime(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequestAllOfDateTimeComponent.spec.js b/js/test/model/SendTemplateRequestAllOfDateTimeComponent.spec.js deleted file mode 100644 index 6eb3023..0000000 --- a/js/test/model/SendTemplateRequestAllOfDateTimeComponent.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequestAllOfDateTimeComponent', function() { - it('should create an instance of SendTemplateRequestAllOfDateTimeComponent', function() { - // uncomment below and update the code to test SendTemplateRequestAllOfDateTimeComponent - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent); - }); - - it('should have the property dayOfWeek (base name: "day_of_week")', function() { - // uncomment below and update the code to test the property dayOfWeek - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - it('should have the property year (base name: "year")', function() { - // uncomment below and update the code to test the property year - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - it('should have the property month (base name: "month")', function() { - // uncomment below and update the code to test the property month - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - it('should have the property dayOfMonth (base name: "day_of_month")', function() { - // uncomment below and update the code to test the property dayOfMonth - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - it('should have the property hour (base name: "hour")', function() { - // uncomment below and update the code to test the property hour - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - it('should have the property minute (base name: "minute")', function() { - // uncomment below and update the code to test the property minute - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - it('should have the property calendar (base name: "calendar")', function() { - // uncomment below and update the code to test the property calendar - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeComponent(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequestAllOfDateTimeUnixEpoch.spec.js b/js/test/model/SendTemplateRequestAllOfDateTimeUnixEpoch.spec.js deleted file mode 100644 index 095c6bd..0000000 --- a/js/test/model/SendTemplateRequestAllOfDateTimeUnixEpoch.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeUnixEpoch(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequestAllOfDateTimeUnixEpoch', function() { - it('should create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch', function() { - // uncomment below and update the code to test SendTemplateRequestAllOfDateTimeUnixEpoch - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeUnixEpoch(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequestAllOfDateTimeUnixEpoch); - }); - - it('should have the property timestamp (base name: "timestamp")', function() { - // uncomment below and update the code to test the property timestamp - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfDateTimeUnixEpoch(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequestAllOfLanguage.spec.js b/js/test/model/SendTemplateRequestAllOfLanguage.spec.js deleted file mode 100644 index d603f37..0000000 --- a/js/test/model/SendTemplateRequestAllOfLanguage.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequestAllOfLanguage(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequestAllOfLanguage', function() { - it('should create an instance of SendTemplateRequestAllOfLanguage', function() { - // uncomment below and update the code to test SendTemplateRequestAllOfLanguage - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfLanguage(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequestAllOfLanguage); - }); - - it('should have the property policy (base name: "policy")', function() { - // uncomment below and update the code to test the property policy - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfLanguage(); - //expect(instance).to.be(); - }); - - it('should have the property code (base name: "code")', function() { - // uncomment below and update the code to test the property code - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfLanguage(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SendTemplateRequestAllOfParams.spec.js b/js/test/model/SendTemplateRequestAllOfParams.spec.js deleted file mode 100644 index 2e7ed11..0000000 --- a/js/test/model/SendTemplateRequestAllOfParams.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SendTemplateRequestAllOfParams(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SendTemplateRequestAllOfParams', function() { - it('should create an instance of SendTemplateRequestAllOfParams', function() { - // uncomment below and update the code to test SendTemplateRequestAllOfParams - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfParams(); - //expect(instance).to.be.a(1msgWabaSdk.SendTemplateRequestAllOfParams); - }); - - it('should have the property _default (base name: "default")', function() { - // uncomment below and update the code to test the property _default - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfParams(); - //expect(instance).to.be(); - }); - - it('should have the property currency (base name: "currency")', function() { - // uncomment below and update the code to test the property currency - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfParams(); - //expect(instance).to.be(); - }); - - it('should have the property dateTime (base name: "date_time")', function() { - // uncomment below and update the code to test the property dateTime - //var instance = new 1msgWabaSdk.SendTemplateRequestAllOfParams(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SetCommerce.spec.js b/js/test/model/SetCommerce.spec.js deleted file mode 100644 index e4b23e2..0000000 --- a/js/test/model/SetCommerce.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SetCommerce(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SetCommerce', function() { - it('should create an instance of SetCommerce', function() { - // uncomment below and update the code to test SetCommerce - //var instance = new 1msgWabaSdk.SetCommerce(); - //expect(instance).to.be.a(1msgWabaSdk.SetCommerce); - }); - - it('should have the property success (base name: "success")', function() { - // uncomment below and update the code to test the property success - //var instance = new 1msgWabaSdk.SetCommerce(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SetMe.spec.js b/js/test/model/SetMe.spec.js deleted file mode 100644 index 95881bd..0000000 --- a/js/test/model/SetMe.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SetMe(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SetMe', function() { - it('should create an instance of SetMe', function() { - // uncomment below and update the code to test SetMe - //var instance = new 1msgWabaSdk.SetMe(); - //expect(instance).to.be.a(1msgWabaSdk.SetMe); - }); - - it('should have the property result (base name: "result")', function() { - // uncomment below and update the code to test the property result - //var instance = new 1msgWabaSdk.SetMe(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SetMeRequest.spec.js b/js/test/model/SetMeRequest.spec.js deleted file mode 100644 index fcd2892..0000000 --- a/js/test/model/SetMeRequest.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SetMeRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SetMeRequest', function() { - it('should create an instance of SetMeRequest', function() { - // uncomment below and update the code to test SetMeRequest - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be.a(1msgWabaSdk.SetMeRequest); - }); - - it('should have the property about (base name: "about")', function() { - // uncomment below and update the code to test the property about - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - it('should have the property address (base name: "address")', function() { - // uncomment below and update the code to test the property address - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - it('should have the property description (base name: "description")', function() { - // uncomment below and update the code to test the property description - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - it('should have the property email (base name: "email")', function() { - // uncomment below and update the code to test the property email - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - it('should have the property phone (base name: "phone")', function() { - // uncomment below and update the code to test the property phone - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - it('should have the property vertical (base name: "vertical")', function() { - // uncomment below and update the code to test the property vertical - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - it('should have the property photo (base name: "photo")', function() { - // uncomment below and update the code to test the property photo - //var instance = new 1msgWabaSdk.SetMeRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SetSettings200Response.spec.js b/js/test/model/SetSettings200Response.spec.js deleted file mode 100644 index be12cbb..0000000 --- a/js/test/model/SetSettings200Response.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SetSettings200Response(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SetSettings200Response', function() { - it('should create an instance of SetSettings200Response', function() { - // uncomment below and update the code to test SetSettings200Response - //var instance = new 1msgWabaSdk.SetSettings200Response(); - //expect(instance).to.be.a(1msgWabaSdk.SetSettings200Response); - }); - - it('should have the property webhookUrl (base name: "webhookUrl")', function() { - // uncomment below and update the code to test the property webhookUrl - //var instance = new 1msgWabaSdk.SetSettings200Response(); - //expect(instance).to.be(); - }); - - it('should have the property update (base name: "update")', function() { - // uncomment below and update the code to test the property update - //var instance = new 1msgWabaSdk.SetSettings200Response(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SetSettings200ResponseAllOfUpdate.spec.js b/js/test/model/SetSettings200ResponseAllOfUpdate.spec.js deleted file mode 100644 index 44eec1a..0000000 --- a/js/test/model/SetSettings200ResponseAllOfUpdate.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SetSettings200ResponseAllOfUpdate(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SetSettings200ResponseAllOfUpdate', function() { - it('should create an instance of SetSettings200ResponseAllOfUpdate', function() { - // uncomment below and update the code to test SetSettings200ResponseAllOfUpdate - //var instance = new 1msgWabaSdk.SetSettings200ResponseAllOfUpdate(); - //expect(instance).to.be.a(1msgWabaSdk.SetSettings200ResponseAllOfUpdate); - }); - - it('should have the property webhookUrl (base name: "webhookUrl")', function() { - // uncomment below and update the code to test the property webhookUrl - //var instance = new 1msgWabaSdk.SetSettings200ResponseAllOfUpdate(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/SetWebhookStatus.spec.js b/js/test/model/SetWebhookStatus.spec.js deleted file mode 100644 index 0f30749..0000000 --- a/js/test/model/SetWebhookStatus.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.SetWebhookStatus(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SetWebhookStatus', function() { - it('should create an instance of SetWebhookStatus', function() { - // uncomment below and update the code to test SetWebhookStatus - //var instance = new 1msgWabaSdk.SetWebhookStatus(); - //expect(instance).to.be.a(1msgWabaSdk.SetWebhookStatus); - }); - - it('should have the property set (base name: "set")', function() { - // uncomment below and update the code to test the property set - //var instance = new 1msgWabaSdk.SetWebhookStatus(); - //expect(instance).to.be(); - }); - - it('should have the property message (base name: "message")', function() { - // uncomment below and update the code to test the property message - //var instance = new 1msgWabaSdk.SetWebhookStatus(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/Settings.spec.js b/js/test/model/Settings.spec.js deleted file mode 100644 index 362c875..0000000 --- a/js/test/model/Settings.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.Settings(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('Settings', function() { - it('should create an instance of Settings', function() { - // uncomment below and update the code to test Settings - //var instance = new 1msgWabaSdk.Settings(); - //expect(instance).to.be.a(1msgWabaSdk.Settings); - }); - - it('should have the property webhookUrl (base name: "webhookUrl")', function() { - // uncomment below and update the code to test the property webhookUrl - //var instance = new 1msgWabaSdk.Settings(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/TemplateCategoryProp.spec.js b/js/test/model/TemplateCategoryProp.spec.js deleted file mode 100644 index 68fb937..0000000 --- a/js/test/model/TemplateCategoryProp.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplateCategoryProp', function() { - it('should create an instance of TemplateCategoryProp', function() { - // uncomment below and update the code to test TemplateCategoryProp - //var instance = new 1msgWabaSdk.TemplateCategoryProp(); - //expect(instance).to.be.a(1msgWabaSdk.TemplateCategoryProp); - }); - - }); - -})); diff --git a/js/test/model/TemplateComponentsProp.spec.js b/js/test/model/TemplateComponentsProp.spec.js deleted file mode 100644 index 6f8dbbd..0000000 --- a/js/test/model/TemplateComponentsProp.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.TemplateComponentsProp(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplateComponentsProp', function() { - it('should create an instance of TemplateComponentsProp', function() { - // uncomment below and update the code to test TemplateComponentsProp - //var instance = new OneMsgWabaSdk.TemplateComponentsProp(); - //expect(instance).to.be.a(OneMsgWabaSdk.TemplateComponentsProp); - }); - - }); - -})); diff --git a/js/test/model/TemplateComponentsPropInner.spec.js b/js/test/model/TemplateComponentsPropInner.spec.js deleted file mode 100644 index 69dc148..0000000 --- a/js/test/model/TemplateComponentsPropInner.spec.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplateComponentsPropInner', function() { - it('should create an instance of TemplateComponentsPropInner', function() { - // uncomment below and update the code to test TemplateComponentsPropInner - //var instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - //expect(instance).to.be.a(1msgWabaSdk.TemplateComponentsPropInner); - }); - - it('should have the property type (base name: "type")', function() { - // uncomment below and update the code to test the property type - //var instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - //expect(instance).to.be(); - }); - - it('should have the property format (base name: "format")', function() { - // uncomment below and update the code to test the property format - //var instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - //expect(instance).to.be(); - }); - - it('should have the property text (base name: "text")', function() { - // uncomment below and update the code to test the property text - //var instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - //expect(instance).to.be(); - }); - - it('should have the property example (base name: "example")', function() { - // uncomment below and update the code to test the property example - //var instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - //expect(instance).to.be(); - }); - - it('should have the property buttons (base name: "buttons")', function() { - // uncomment below and update the code to test the property buttons - //var instance = new 1msgWabaSdk.TemplateComponentsPropInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/TemplateComponentsPropInnerButtonsInner.spec.js b/js/test/model/TemplateComponentsPropInnerButtonsInner.spec.js deleted file mode 100644 index e4cd9a3..0000000 --- a/js/test/model/TemplateComponentsPropInnerButtonsInner.spec.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplateComponentsPropInnerButtonsInner', function() { - it('should create an instance of TemplateComponentsPropInnerButtonsInner', function() { - // uncomment below and update the code to test TemplateComponentsPropInnerButtonsInner - //var instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - //expect(instance).to.be.a(1msgWabaSdk.TemplateComponentsPropInnerButtonsInner); - }); - - it('should have the property type (base name: "type")', function() { - // uncomment below and update the code to test the property type - //var instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - //expect(instance).to.be(); - }); - - it('should have the property text (base name: "text")', function() { - // uncomment below and update the code to test the property text - //var instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - //expect(instance).to.be(); - }); - - it('should have the property url (base name: "url")', function() { - // uncomment below and update the code to test the property url - //var instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - //expect(instance).to.be(); - }); - - it('should have the property phoneNumber (base name: "phone_number")', function() { - // uncomment below and update the code to test the property phoneNumber - //var instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - //expect(instance).to.be(); - }); - - it('should have the property example (base name: "example")', function() { - // uncomment below and update the code to test the property example - //var instance = new 1msgWabaSdk.TemplateComponentsPropInnerButtonsInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/TemplateLanguageProp.spec.js b/js/test/model/TemplateLanguageProp.spec.js deleted file mode 100644 index ec599d9..0000000 --- a/js/test/model/TemplateLanguageProp.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplateLanguageProp', function() { - it('should create an instance of TemplateLanguageProp', function() { - // uncomment below and update the code to test TemplateLanguageProp - //var instance = new 1msgWabaSdk.TemplateLanguageProp(); - //expect(instance).to.be.a(1msgWabaSdk.TemplateLanguageProp); - }); - - }); - -})); diff --git a/js/test/model/TemplateNamespaceField.spec.js b/js/test/model/TemplateNamespaceField.spec.js deleted file mode 100644 index 5f3bbec..0000000 --- a/js/test/model/TemplateNamespaceField.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OneMsgWabaSdk); - } -}(this, function(expect, OneMsgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OneMsgWabaSdk.TemplateNamespaceField(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('TemplateNamespaceField', function() { - it('should create an instance of TemplateNamespaceField', function() { - // uncomment below and update the code to test TemplateNamespaceField - //var instance = new OneMsgWabaSdk.TemplateNamespaceField(); - //expect(instance).to.be.a(OneMsgWabaSdk.TemplateNamespaceField); - }); - - it('should have the property namespace (base name: "namespace")', function() { - // uncomment below and update the code to test the property namespace - //var instance = new OneMsgWabaSdk.TemplateNamespaceField(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/UploadMedia.spec.js b/js/test/model/UploadMedia.spec.js deleted file mode 100644 index 4ab774c..0000000 --- a/js/test/model/UploadMedia.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.UploadMedia(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UploadMedia', function() { - it('should create an instance of UploadMedia', function() { - // uncomment below and update the code to test UploadMedia - //var instance = new 1msgWabaSdk.UploadMedia(); - //expect(instance).to.be.a(1msgWabaSdk.UploadMedia); - }); - - it('should have the property body (base name: "body")', function() { - // uncomment below and update the code to test the property body - //var instance = new 1msgWabaSdk.UploadMedia(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/js/test/model/WebhookUrl.spec.js b/js/test/model/WebhookUrl.spec.js deleted file mode 100644 index 0a71fee..0000000 --- a/js/test/model/WebhookUrl.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 1msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.1msgWabaSdk); - } -}(this, function(expect, 1msgWabaSdk) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new 1msgWabaSdk.WebhookUrl(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('WebhookUrl', function() { - it('should create an instance of WebhookUrl', function() { - // uncomment below and update the code to test WebhookUrl - //var instance = new 1msgWabaSdk.WebhookUrl(); - //expect(instance).to.be.a(1msgWabaSdk.WebhookUrl); - }); - - it('should have the property webhookUrl (base name: "webhookUrl")', function() { - // uncomment below and update the code to test the property webhookUrl - //var instance = new 1msgWabaSdk.WebhookUrl(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/php/README.md b/php/README.md deleted file mode 100644 index 22312ef..0000000 --- a/php/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# OpenAPIClient-php - -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Contents of php sdk now situated at https://github.com/1gretten1/1sdk_php due to composer issues diff --git a/python/.github/workflows/python.yml b/python/.github/workflows/python.yml deleted file mode 100644 index b9d7946..0000000 --- a/python/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: one_msg_waba_sdk Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/python/.gitignore b/python/.gitignore deleted file mode 100644 index 43995bd..0000000 --- a/python/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/python/.gitlab-ci.yml b/python/.gitlab-ci.yml deleted file mode 100644 index ce2596e..0000000 --- a/python/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=one_msg_waba_sdk - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/python/.openapi-generator-ignore b/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES deleted file mode 100644 index c3f2deb..0000000 --- a/python/.openapi-generator/FILES +++ /dev/null @@ -1,162 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.travis.yml -README.md -docs/Ack.md -docs/AddTemplateRequest.md -docs/ChannelApi.md -docs/ChannelExtendedStatistics.md -docs/ChannelExtendedStatisticsInner.md -docs/ChannelStatistics.md -docs/ChannelStatus.md -docs/ChatIdProp.md -docs/Commerce.md -docs/CommerceParams.md -docs/Contacts.md -docs/ContactsContactsInner.md -docs/ContactsRequest.md -docs/GetAckInfo.md -docs/GetAckInfoHooksInner.md -docs/GetCommerce.md -docs/GetCommerceInner.md -docs/GetIP.md -docs/GetMe.md -docs/GetMe401Response.md -docs/GetMessages.md -docs/GetMessagesMessagesInner.md -docs/GetTemplates.md -docs/GetTemplatesTemplatesInner.md -docs/MeComponents.md -docs/MediaApi.md -docs/MediaId.md -docs/Message.md -docs/MessageIdProp.md -docs/MessagingApi.md -docs/PhoneProp.md -docs/ProductsCatalogsApi.md -docs/ReadMessageRequest.md -docs/RemoveTemplateRequest.md -docs/SendContactRequest.md -docs/SendFileRequest.md -docs/SendListRequest.md -docs/SendListRequestAllOfRows.md -docs/SendListRequestAllOfSections.md -docs/SendLocationRequest.md -docs/SendMessageRequest.md -docs/SendMessageStatus.md -docs/SendProductRequest.md -docs/SendProductRequestAllOfAction.md -docs/SendProductRequestAllOfActionProductItems.md -docs/SendProductRequestAllOfActionSections.md -docs/SendTemplateRequest.md -docs/SendTemplateRequestAllOfCurrency.md -docs/SendTemplateRequestAllOfDateTime.md -docs/SendTemplateRequestAllOfDateTimeComponent.md -docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md -docs/SendTemplateRequestAllOfLanguage.md -docs/SendTemplateRequestAllOfParams.md -docs/SetCommerce.md -docs/SetMe.md -docs/SetMeRequest.md -docs/SetSettings200Response.md -docs/SetSettings200ResponseAllOfUpdate.md -docs/SetWebhookStatus.md -docs/Settings.md -docs/TemplateCategoryProp.md -docs/TemplateComponentsProp.md -docs/TemplateComponentsPropInner.md -docs/TemplateComponentsPropInnerButtonsInner.md -docs/TemplateLanguageProp.md -docs/TemplateNamespaceField.md -docs/TemplatesApi.md -docs/UploadMedia.md -docs/WebhookUrl.md -docs/WebhooksApi.md -git_push.sh -one_msg_waba_sdk/__init__.py -one_msg_waba_sdk/api/__init__.py -one_msg_waba_sdk/api/channel_api.py -one_msg_waba_sdk/api/media_api.py -one_msg_waba_sdk/api/messaging_api.py -one_msg_waba_sdk/api/products_catalogs_api.py -one_msg_waba_sdk/api/templates_api.py -one_msg_waba_sdk/api/webhooks_api.py -one_msg_waba_sdk/api_client.py -one_msg_waba_sdk/api_response.py -one_msg_waba_sdk/configuration.py -one_msg_waba_sdk/exceptions.py -one_msg_waba_sdk/models/__init__.py -one_msg_waba_sdk/models/ack.py -one_msg_waba_sdk/models/add_template_request.py -one_msg_waba_sdk/models/channel_extended_statistics.py -one_msg_waba_sdk/models/channel_extended_statistics_inner.py -one_msg_waba_sdk/models/channel_statistics.py -one_msg_waba_sdk/models/channel_status.py -one_msg_waba_sdk/models/chat_id_prop.py -one_msg_waba_sdk/models/commerce.py -one_msg_waba_sdk/models/commerce_params.py -one_msg_waba_sdk/models/contacts.py -one_msg_waba_sdk/models/contacts_contacts_inner.py -one_msg_waba_sdk/models/contacts_request.py -one_msg_waba_sdk/models/get_ack_info.py -one_msg_waba_sdk/models/get_ack_info_hooks_inner.py -one_msg_waba_sdk/models/get_commerce.py -one_msg_waba_sdk/models/get_commerce_inner.py -one_msg_waba_sdk/models/get_ip.py -one_msg_waba_sdk/models/get_me.py -one_msg_waba_sdk/models/get_me401_response.py -one_msg_waba_sdk/models/get_messages.py -one_msg_waba_sdk/models/get_messages_messages_inner.py -one_msg_waba_sdk/models/get_templates.py -one_msg_waba_sdk/models/get_templates_templates_inner.py -one_msg_waba_sdk/models/me_components.py -one_msg_waba_sdk/models/media_id.py -one_msg_waba_sdk/models/message.py -one_msg_waba_sdk/models/message_id_prop.py -one_msg_waba_sdk/models/phone_prop.py -one_msg_waba_sdk/models/read_message_request.py -one_msg_waba_sdk/models/remove_template_request.py -one_msg_waba_sdk/models/send_contact_request.py -one_msg_waba_sdk/models/send_file_request.py -one_msg_waba_sdk/models/send_list_request.py -one_msg_waba_sdk/models/send_list_request_all_of_rows.py -one_msg_waba_sdk/models/send_list_request_all_of_sections.py -one_msg_waba_sdk/models/send_location_request.py -one_msg_waba_sdk/models/send_message_request.py -one_msg_waba_sdk/models/send_message_status.py -one_msg_waba_sdk/models/send_product_request.py -one_msg_waba_sdk/models/send_product_request_all_of_action.py -one_msg_waba_sdk/models/send_product_request_all_of_action_product_items.py -one_msg_waba_sdk/models/send_product_request_all_of_action_sections.py -one_msg_waba_sdk/models/send_template_request.py -one_msg_waba_sdk/models/send_template_request_all_of_currency.py -one_msg_waba_sdk/models/send_template_request_all_of_date_time.py -one_msg_waba_sdk/models/send_template_request_all_of_date_time_component.py -one_msg_waba_sdk/models/send_template_request_all_of_date_time_unix_epoch.py -one_msg_waba_sdk/models/send_template_request_all_of_language.py -one_msg_waba_sdk/models/send_template_request_all_of_params.py -one_msg_waba_sdk/models/set_commerce.py -one_msg_waba_sdk/models/set_me.py -one_msg_waba_sdk/models/set_me_request.py -one_msg_waba_sdk/models/set_settings200_response.py -one_msg_waba_sdk/models/set_settings200_response_all_of_update.py -one_msg_waba_sdk/models/set_webhook_status.py -one_msg_waba_sdk/models/settings.py -one_msg_waba_sdk/models/template_category_prop.py -one_msg_waba_sdk/models/template_components_prop.py -one_msg_waba_sdk/models/template_components_prop_inner.py -one_msg_waba_sdk/models/template_components_prop_inner_buttons_inner.py -one_msg_waba_sdk/models/template_language_prop.py -one_msg_waba_sdk/models/template_namespace_field.py -one_msg_waba_sdk/models/upload_media.py -one_msg_waba_sdk/models/webhook_url.py -one_msg_waba_sdk/py.typed -one_msg_waba_sdk/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -tox.ini diff --git a/python/.openapi-generator/VERSION b/python/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/python/.travis.yml b/python/.travis.yml deleted file mode 100644 index e793a70..0000000 --- a/python/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=one_msg_waba_sdk diff --git a/python/README.md b/python/README.md deleted file mode 100644 index 7b0bc95..0000000 --- a/python/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# one-msg-waba-sdk -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 2.39.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.7+ - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install one_msg_waba_sdk -``` -(you may need to run `pip` with root permission: `sudo pip install one_msg_waba_sdk `) - -Then import the package: -```python -import one_msg_waba_sdk -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import one_msg_waba_sdk -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get Commerce Settings - api_response = api_instance.get_commerce() - print("The response of ChannelApi->get_commerce:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling ChannelApi->get_commerce: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ChannelApi* | [**get_commerce**](docs/ChannelApi.md#get_commerce) | **GET** /commerce | Get Commerce Settings -*ChannelApi* | [**get_extended_statistics**](docs/ChannelApi.md#get_extended_statistics) | **GET** /extendedStatistics | Get Extended Channel statistics -*ChannelApi* | [**get_me**](docs/ChannelApi.md#get_me) | **GET** /me | Get Profile Info -*ChannelApi* | [**get_settings**](docs/ChannelApi.md#get_settings) | **GET** /settings | Get Settings -*ChannelApi* | [**get_statistics**](docs/ChannelApi.md#get_statistics) | **GET** /statistics | Get Channel statistics -*ChannelApi* | [**get_status**](docs/ChannelApi.md#get_status) | **GET** /status | Get Status -*ChannelApi* | [**output_ip**](docs/ChannelApi.md#output_ip) | **GET** /outputIP | Get channel server IP -*ChannelApi* | [**set_me**](docs/ChannelApi.md#set_me) | **POST** /me | Change user info -*ChannelApi* | [**set_settings**](docs/ChannelApi.md#set_settings) | **POST** /settings | Set settings -*MediaApi* | [**upload_media**](docs/MediaApi.md#upload_media) | **POST** /uploadMedia | Upload media & get mediaId -*MessagingApi* | [**messages_list**](docs/MessagingApi.md#messages_list) | **GET** /messages | Get messages list -*MessagingApi* | [**read_message**](docs/MessagingApi.md#read_message) | **POST** /readMessage | Mark message as read -*MessagingApi* | [**send_contact**](docs/MessagingApi.md#send_contact) | **POST** /sendContact | Send a Contact -*MessagingApi* | [**send_file**](docs/MessagingApi.md#send_file) | **POST** /sendFile | Send a File -*MessagingApi* | [**send_list**](docs/MessagingApi.md#send_list) | **POST** /sendList | Send List Message -*MessagingApi* | [**send_location**](docs/MessagingApi.md#send_location) | **POST** /sendLocation | Send a Location -*MessagingApi* | [**send_message**](docs/MessagingApi.md#send_message) | **POST** /sendMessage | Send a Message -*ProductsCatalogsApi* | [**send_product**](docs/ProductsCatalogsApi.md#send_product) | **POST** /sendProduct | Send a Product -*ProductsCatalogsApi* | [**set_commerce**](docs/ProductsCatalogsApi.md#set_commerce) | **POST** /commerce | Set Commerce Settings -*TemplatesApi* | [**add_template**](docs/TemplatesApi.md#add_template) | **POST** /addTemplate | Create template -*TemplatesApi* | [**remove_template**](docs/TemplatesApi.md#remove_template) | **POST** /removeTemplate | Remove template -*TemplatesApi* | [**send_template**](docs/TemplatesApi.md#send_template) | **POST** /sendTemplate | Send Template Message -*TemplatesApi* | [**templates_list**](docs/TemplatesApi.md#templates_list) | **GET** /templates | Get templates list -*WebhooksApi* | [**ack_hook_info**](docs/WebhooksApi.md#ack_hook_info) | **GET** /hookInfo | Check ACKs -*WebhooksApi* | [**set_webhook**](docs/WebhooksApi.md#set_webhook) | **POST** /webhook | Set webhook - - -## Documentation For Models - - - [Ack](docs/Ack.md) - - [AddTemplateRequest](docs/AddTemplateRequest.md) - - [ChannelExtendedStatistics](docs/ChannelExtendedStatistics.md) - - [ChannelExtendedStatisticsInner](docs/ChannelExtendedStatisticsInner.md) - - [ChannelStatistics](docs/ChannelStatistics.md) - - [ChannelStatus](docs/ChannelStatus.md) - - [ChatIdProp](docs/ChatIdProp.md) - - [Commerce](docs/Commerce.md) - - [CommerceParams](docs/CommerceParams.md) - - [Contacts](docs/Contacts.md) - - [ContactsContactsInner](docs/ContactsContactsInner.md) - - [ContactsRequest](docs/ContactsRequest.md) - - [GetAckInfo](docs/GetAckInfo.md) - - [GetAckInfoHooksInner](docs/GetAckInfoHooksInner.md) - - [GetCommerce](docs/GetCommerce.md) - - [GetCommerceInner](docs/GetCommerceInner.md) - - [GetIP](docs/GetIP.md) - - [GetMe](docs/GetMe.md) - - [GetMe401Response](docs/GetMe401Response.md) - - [GetMessages](docs/GetMessages.md) - - [GetMessagesMessagesInner](docs/GetMessagesMessagesInner.md) - - [GetTemplates](docs/GetTemplates.md) - - [GetTemplatesTemplatesInner](docs/GetTemplatesTemplatesInner.md) - - [MeComponents](docs/MeComponents.md) - - [MediaId](docs/MediaId.md) - - [Message](docs/Message.md) - - [MessageIdProp](docs/MessageIdProp.md) - - [PhoneProp](docs/PhoneProp.md) - - [ReadMessageRequest](docs/ReadMessageRequest.md) - - [RemoveTemplateRequest](docs/RemoveTemplateRequest.md) - - [SendContactRequest](docs/SendContactRequest.md) - - [SendFileRequest](docs/SendFileRequest.md) - - [SendListRequest](docs/SendListRequest.md) - - [SendListRequestAllOfRows](docs/SendListRequestAllOfRows.md) - - [SendListRequestAllOfSections](docs/SendListRequestAllOfSections.md) - - [SendLocationRequest](docs/SendLocationRequest.md) - - [SendMessageRequest](docs/SendMessageRequest.md) - - [SendMessageStatus](docs/SendMessageStatus.md) - - [SendProductRequest](docs/SendProductRequest.md) - - [SendProductRequestAllOfAction](docs/SendProductRequestAllOfAction.md) - - [SendProductRequestAllOfActionProductItems](docs/SendProductRequestAllOfActionProductItems.md) - - [SendProductRequestAllOfActionSections](docs/SendProductRequestAllOfActionSections.md) - - [SendTemplateRequest](docs/SendTemplateRequest.md) - - [SendTemplateRequestAllOfCurrency](docs/SendTemplateRequestAllOfCurrency.md) - - [SendTemplateRequestAllOfDateTime](docs/SendTemplateRequestAllOfDateTime.md) - - [SendTemplateRequestAllOfDateTimeComponent](docs/SendTemplateRequestAllOfDateTimeComponent.md) - - [SendTemplateRequestAllOfDateTimeUnixEpoch](docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md) - - [SendTemplateRequestAllOfLanguage](docs/SendTemplateRequestAllOfLanguage.md) - - [SendTemplateRequestAllOfParams](docs/SendTemplateRequestAllOfParams.md) - - [SetCommerce](docs/SetCommerce.md) - - [SetMe](docs/SetMe.md) - - [SetMeRequest](docs/SetMeRequest.md) - - [SetSettings200Response](docs/SetSettings200Response.md) - - [SetSettings200ResponseAllOfUpdate](docs/SetSettings200ResponseAllOfUpdate.md) - - [SetWebhookStatus](docs/SetWebhookStatus.md) - - [Settings](docs/Settings.md) - - [TemplateCategoryProp](docs/TemplateCategoryProp.md) - - [TemplateComponentsProp](docs/TemplateComponentsProp.md) - - [TemplateComponentsPropInner](docs/TemplateComponentsPropInner.md) - - [TemplateComponentsPropInnerButtonsInner](docs/TemplateComponentsPropInnerButtonsInner.md) - - [TemplateLanguageProp](docs/TemplateLanguageProp.md) - - [TemplateNamespaceField](docs/TemplateNamespaceField.md) - - [UploadMedia](docs/UploadMedia.md) - - [WebhookUrl](docs/WebhookUrl.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### token - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - - -## Author - -hello@1msg.io - - diff --git a/python/docs/Ack.md b/python/docs/Ack.md deleted file mode 100644 index 9a93d53..0000000 --- a/python/docs/Ack.md +++ /dev/null @@ -1,30 +0,0 @@ -# Ack - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | unique id of message | [optional] -**chat_id** | **str** | chat ID | [optional] -**status** | **str** | type of the message status | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.ack import Ack - -# TODO update the JSON string below -json = "{}" -# create an instance of Ack from a JSON string -ack_instance = Ack.from_json(json) -# print the JSON string representation of the object -print Ack.to_json() - -# convert the object into a dict -ack_dict = ack_instance.to_dict() -# create an instance of Ack from a dict -ack_form_dict = ack.from_dict(ack_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/AddTemplateRequest.md b/python/docs/AddTemplateRequest.md deleted file mode 100644 index 95e04f6..0000000 --- a/python/docs/AddTemplateRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# AddTemplateRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of template | [optional] -**category** | [**TemplateCategoryProp**](TemplateCategoryProp.md) | | [optional] -**components** | [**TemplateComponentsProp**](TemplateComponentsProp.md) | | [optional] -**language** | [**TemplateLanguageProp**](TemplateLanguageProp.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.add_template_request import AddTemplateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AddTemplateRequest from a JSON string -add_template_request_instance = AddTemplateRequest.from_json(json) -# print the JSON string representation of the object -print AddTemplateRequest.to_json() - -# convert the object into a dict -add_template_request_dict = add_template_request_instance.to_dict() -# create an instance of AddTemplateRequest from a dict -add_template_request_form_dict = add_template_request.from_dict(add_template_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ChannelApi.md b/python/docs/ChannelApi.md deleted file mode 100644 index e20cdc2..0000000 --- a/python/docs/ChannelApi.md +++ /dev/null @@ -1,703 +0,0 @@ -# one_msg_waba_sdk.ChannelApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_commerce**](ChannelApi.md#get_commerce) | **GET** /commerce | Get Commerce Settings -[**get_extended_statistics**](ChannelApi.md#get_extended_statistics) | **GET** /extendedStatistics | Get Extended Channel statistics -[**get_me**](ChannelApi.md#get_me) | **GET** /me | Get Profile Info -[**get_settings**](ChannelApi.md#get_settings) | **GET** /settings | Get Settings -[**get_statistics**](ChannelApi.md#get_statistics) | **GET** /statistics | Get Channel statistics -[**get_status**](ChannelApi.md#get_status) | **GET** /status | Get Status -[**output_ip**](ChannelApi.md#output_ip) | **GET** /outputIP | Get channel server IP -[**set_me**](ChannelApi.md#set_me) | **POST** /me | Change user info -[**set_settings**](ChannelApi.md#set_settings) | **POST** /settings | Set settings - - -# **get_commerce** -> GetCommerce get_commerce() - -Get Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.get_commerce import GetCommerce -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get Commerce Settings - api_response = api_instance.get_commerce() - print("The response of ChannelApi->get_commerce:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->get_commerce: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetCommerce**](GetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_extended_statistics** -> ChannelExtendedStatistics get_extended_statistics() - -Get Extended Channel statistics - -Get channel usage extended statistics - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.channel_extended_statistics import ChannelExtendedStatistics -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get Extended Channel statistics - api_response = api_instance.get_extended_statistics() - print("The response of ChannelApi->get_extended_statistics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->get_extended_statistics: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ChannelExtendedStatistics**](ChannelExtendedStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_me** -> GetMe get_me() - -Get Profile Info - -Use this edge to retrieve your profile's About info - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.get_me import GetMe -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get Profile Info - api_response = api_instance.get_me() - print("The response of ChannelApi->get_me:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->get_me: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetMe**](GetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_settings** -> Settings get_settings() - -Get Settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.settings import Settings -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get Settings - api_response = api_instance.get_settings() - print("The response of ChannelApi->get_settings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->get_settings: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Settings**](Settings.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_statistics** -> ChannelStatistics get_statistics(var_date=var_date) - -Get Channel statistics - -Get channel usage statistics - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.channel_statistics import ChannelStatistics -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - var_date = '03.2022' # str | Month and year in format mm.YYYY. (optional) - - try: - # Get Channel statistics - api_response = api_instance.get_statistics(var_date=var_date) - print("The response of ChannelApi->get_statistics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->get_statistics: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **var_date** | **str**| Month and year in format mm.YYYY. | [optional] - -### Return type - -[**ChannelStatistics**](ChannelStatistics.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_status** -> ChannelStatus get_status() - - Get Status - -Returns the status of your WhatsApp Business API client. Channel statuses: **connected**/**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.channel_status import ChannelStatus -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get Status - api_response = api_instance.get_status() - print("The response of ChannelApi->get_status:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->get_status: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ChannelStatus**](ChannelStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **output_ip** -> GetIP output_ip() - -Get channel server IP - - - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.get_ip import GetIP -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - - try: - # Get channel server IP - api_response = api_instance.output_ip() - print("The response of ChannelApi->output_ip:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->output_ip: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetIP**](GetIP.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_me** -> SetMe set_me(set_me_request) - -Change user info - -Change user info - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.set_me import SetMe -from one_msg_waba_sdk.models.set_me_request import SetMeRequest -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - set_me_request = one_msg_waba_sdk.SetMeRequest() # SetMeRequest | - - try: - # Change user info - api_response = api_instance.set_me(set_me_request) - print("The response of ChannelApi->set_me:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->set_me: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set_me_request** | [**SetMeRequest**](SetMeRequest.md)| | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_settings** -> SetSettings200Response set_settings(settings) - -Set settings - -**webhookUrl** - Http or https URL for receiving notifications. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.set_settings200_response import SetSettings200Response -from one_msg_waba_sdk.models.settings import Settings -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ChannelApi(api_client) - settings = one_msg_waba_sdk.Settings() # Settings | - - try: - # Set settings - api_response = api_instance.set_settings(settings) - print("The response of ChannelApi->set_settings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChannelApi->set_settings: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settings** | [**Settings**](Settings.md)| | - -### Return type - -[**SetSettings200Response**](SetSettings200Response.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/ChannelExtendedStatistics.md b/python/docs/ChannelExtendedStatistics.md deleted file mode 100644 index fbb6b98..0000000 --- a/python/docs/ChannelExtendedStatistics.md +++ /dev/null @@ -1,27 +0,0 @@ -# ChannelExtendedStatistics - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from one_msg_waba_sdk.models.channel_extended_statistics import ChannelExtendedStatistics - -# TODO update the JSON string below -json = "{}" -# create an instance of ChannelExtendedStatistics from a JSON string -channel_extended_statistics_instance = ChannelExtendedStatistics.from_json(json) -# print the JSON string representation of the object -print ChannelExtendedStatistics.to_json() - -# convert the object into a dict -channel_extended_statistics_dict = channel_extended_statistics_instance.to_dict() -# create an instance of ChannelExtendedStatistics from a dict -channel_extended_statistics_form_dict = channel_extended_statistics.from_dict(channel_extended_statistics_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ChannelExtendedStatisticsInner.md b/python/docs/ChannelExtendedStatisticsInner.md deleted file mode 100644 index 0bf7dd7..0000000 --- a/python/docs/ChannelExtendedStatisticsInner.md +++ /dev/null @@ -1,40 +0,0 @@ -# ChannelExtendedStatisticsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**business_initiated_paid_quantity** | **int** | | [optional] -**business_initiated_price** | **float** | | [optional] -**business_initiated_quantity** | **int** | | [optional] -**free_entry_point** | **int** | | [optional] -**free_quantity** | **int** | | [optional] -**free_tier** | **int** | | [optional] -**paid_quantity** | **int** | | [optional] -**period_date** | **str** | | [optional] -**quantity** | **float** | | [optional] -**total_price** | **float** | | [optional] -**user_initiated_paid_quantity** | **int** | | [optional] -**user_initiated_price** | **float** | | [optional] -**user_initiated_quantity** | **int** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.channel_extended_statistics_inner import ChannelExtendedStatisticsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ChannelExtendedStatisticsInner from a JSON string -channel_extended_statistics_inner_instance = ChannelExtendedStatisticsInner.from_json(json) -# print the JSON string representation of the object -print ChannelExtendedStatisticsInner.to_json() - -# convert the object into a dict -channel_extended_statistics_inner_dict = channel_extended_statistics_inner_instance.to_dict() -# create an instance of ChannelExtendedStatisticsInner from a dict -channel_extended_statistics_inner_form_dict = channel_extended_statistics_inner.from_dict(channel_extended_statistics_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ChannelStatistics.md b/python/docs/ChannelStatistics.md deleted file mode 100644 index 71a8ff6..0000000 --- a/python/docs/ChannelStatistics.md +++ /dev/null @@ -1,29 +0,0 @@ -# ChannelStatistics - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_date** | **str** | | [optional] -**templates_cost** | **float** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.channel_statistics import ChannelStatistics - -# TODO update the JSON string below -json = "{}" -# create an instance of ChannelStatistics from a JSON string -channel_statistics_instance = ChannelStatistics.from_json(json) -# print the JSON string representation of the object -print ChannelStatistics.to_json() - -# convert the object into a dict -channel_statistics_dict = channel_statistics_instance.to_dict() -# create an instance of ChannelStatistics from a dict -channel_statistics_form_dict = channel_statistics.from_dict(channel_statistics_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ChannelStatus.md b/python/docs/ChannelStatus.md deleted file mode 100644 index 8733863..0000000 --- a/python/docs/ChannelStatus.md +++ /dev/null @@ -1,28 +0,0 @@ -# ChannelStatus - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | channel Status | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.channel_status import ChannelStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of ChannelStatus from a JSON string -channel_status_instance = ChannelStatus.from_json(json) -# print the JSON string representation of the object -print ChannelStatus.to_json() - -# convert the object into a dict -channel_status_dict = channel_status_instance.to_dict() -# create an instance of ChannelStatus from a dict -channel_status_form_dict = channel_status.from_dict(channel_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ChatIdProp.md b/python/docs/ChatIdProp.md deleted file mode 100644 index 511df62..0000000 --- a/python/docs/ChatIdProp.md +++ /dev/null @@ -1,28 +0,0 @@ -# ChatIdProp - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.chat_id_prop import ChatIdProp - -# TODO update the JSON string below -json = "{}" -# create an instance of ChatIdProp from a JSON string -chat_id_prop_instance = ChatIdProp.from_json(json) -# print the JSON string representation of the object -print ChatIdProp.to_json() - -# convert the object into a dict -chat_id_prop_dict = chat_id_prop_instance.to_dict() -# create an instance of ChatIdProp from a dict -chat_id_prop_form_dict = chat_id_prop.from_dict(chat_id_prop_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/Commerce.md b/python/docs/Commerce.md deleted file mode 100644 index 7b4d74b..0000000 --- a/python/docs/Commerce.md +++ /dev/null @@ -1,28 +0,0 @@ -# Commerce - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**params** | [**CommerceParams**](CommerceParams.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.commerce import Commerce - -# TODO update the JSON string below -json = "{}" -# create an instance of Commerce from a JSON string -commerce_instance = Commerce.from_json(json) -# print the JSON string representation of the object -print Commerce.to_json() - -# convert the object into a dict -commerce_dict = commerce_instance.to_dict() -# create an instance of Commerce from a dict -commerce_form_dict = commerce.from_dict(commerce_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/CommerceParams.md b/python/docs/CommerceParams.md deleted file mode 100644 index 386a319..0000000 --- a/python/docs/CommerceParams.md +++ /dev/null @@ -1,29 +0,0 @@ -# CommerceParams - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**is_cart_enabled** | **bool** | | -**is_catalog_visible** | **bool** | | - -## Example - -```python -from one_msg_waba_sdk.models.commerce_params import CommerceParams - -# TODO update the JSON string below -json = "{}" -# create an instance of CommerceParams from a JSON string -commerce_params_instance = CommerceParams.from_json(json) -# print the JSON string representation of the object -print CommerceParams.to_json() - -# convert the object into a dict -commerce_params_dict = commerce_params_instance.to_dict() -# create an instance of CommerceParams from a dict -commerce_params_form_dict = commerce_params.from_dict(commerce_params_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/Contacts.md b/python/docs/Contacts.md deleted file mode 100644 index 4c30e7e..0000000 --- a/python/docs/Contacts.md +++ /dev/null @@ -1,28 +0,0 @@ -# Contacts - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contacts** | [**List[ContactsContactsInner]**](ContactsContactsInner.md) | List of checked numbers | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.contacts import Contacts - -# TODO update the JSON string below -json = "{}" -# create an instance of Contacts from a JSON string -contacts_instance = Contacts.from_json(json) -# print the JSON string representation of the object -print Contacts.to_json() - -# convert the object into a dict -contacts_dict = contacts_instance.to_dict() -# create an instance of Contacts from a dict -contacts_form_dict = contacts.from_dict(contacts_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ContactsContactsInner.md b/python/docs/ContactsContactsInner.md deleted file mode 100644 index a4de27f..0000000 --- a/python/docs/ContactsContactsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ContactsContactsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**input** | **str** | Sent value | [optional] -**status** | **str** | Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending | [optional] -**wa_id** | **str** | Formatted contact phone | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.contacts_contacts_inner import ContactsContactsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ContactsContactsInner from a JSON string -contacts_contacts_inner_instance = ContactsContactsInner.from_json(json) -# print the JSON string representation of the object -print ContactsContactsInner.to_json() - -# convert the object into a dict -contacts_contacts_inner_dict = contacts_contacts_inner_instance.to_dict() -# create an instance of ContactsContactsInner from a dict -contacts_contacts_inner_form_dict = contacts_contacts_inner.from_dict(contacts_contacts_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ContactsRequest.md b/python/docs/ContactsRequest.md deleted file mode 100644 index 185231e..0000000 --- a/python/docs/ContactsRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# ContactsRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**blocking** | **str** | Operating mode: *wait* - synchronous *no_wait* - asynchronous (default) | [optional] -**force_check** | **bool** | Using cache: *true* - ignore cache *false* - use cache (default) | [optional] -**contacts** | **List[str]** | Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"] | - -## Example - -```python -from one_msg_waba_sdk.models.contacts_request import ContactsRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ContactsRequest from a JSON string -contacts_request_instance = ContactsRequest.from_json(json) -# print the JSON string representation of the object -print ContactsRequest.to_json() - -# convert the object into a dict -contacts_request_dict = contacts_request_instance.to_dict() -# create an instance of ContactsRequest from a dict -contacts_request_form_dict = contacts_request.from_dict(contacts_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetAckInfo.md b/python/docs/GetAckInfo.md deleted file mode 100644 index ad84501..0000000 --- a/python/docs/GetAckInfo.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetAckInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hooks** | [**List[GetAckInfoHooksInner]**](GetAckInfoHooksInner.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_ack_info import GetAckInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAckInfo from a JSON string -get_ack_info_instance = GetAckInfo.from_json(json) -# print the JSON string representation of the object -print GetAckInfo.to_json() - -# convert the object into a dict -get_ack_info_dict = get_ack_info_instance.to_dict() -# create an instance of GetAckInfo from a dict -get_ack_info_form_dict = get_ack_info.from_dict(get_ack_info_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetAckInfoHooksInner.md b/python/docs/GetAckInfoHooksInner.md deleted file mode 100644 index 4f20298..0000000 --- a/python/docs/GetAckInfoHooksInner.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetAckInfoHooksInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**type** | **str** | | [optional] -**status** | **str** | | [optional] -**pricing** | **object** | | [optional] -**timestamp** | **str** | | [optional] -**conversation** | **object** | | [optional] -**recipient_id** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_ack_info_hooks_inner import GetAckInfoHooksInner - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAckInfoHooksInner from a JSON string -get_ack_info_hooks_inner_instance = GetAckInfoHooksInner.from_json(json) -# print the JSON string representation of the object -print GetAckInfoHooksInner.to_json() - -# convert the object into a dict -get_ack_info_hooks_inner_dict = get_ack_info_hooks_inner_instance.to_dict() -# create an instance of GetAckInfoHooksInner from a dict -get_ack_info_hooks_inner_form_dict = get_ack_info_hooks_inner.from_dict(get_ack_info_hooks_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetCommerce.md b/python/docs/GetCommerce.md deleted file mode 100644 index 6f6c118..0000000 --- a/python/docs/GetCommerce.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetCommerce - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from one_msg_waba_sdk.models.get_commerce import GetCommerce - -# TODO update the JSON string below -json = "{}" -# create an instance of GetCommerce from a JSON string -get_commerce_instance = GetCommerce.from_json(json) -# print the JSON string representation of the object -print GetCommerce.to_json() - -# convert the object into a dict -get_commerce_dict = get_commerce_instance.to_dict() -# create an instance of GetCommerce from a dict -get_commerce_form_dict = get_commerce.from_dict(get_commerce_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetCommerceInner.md b/python/docs/GetCommerceInner.md deleted file mode 100644 index 4299334..0000000 --- a/python/docs/GetCommerceInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetCommerceInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**is_cart_enabled** | **bool** | | [optional] -**is_catalog_visible** | **bool** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_commerce_inner import GetCommerceInner - -# TODO update the JSON string below -json = "{}" -# create an instance of GetCommerceInner from a JSON string -get_commerce_inner_instance = GetCommerceInner.from_json(json) -# print the JSON string representation of the object -print GetCommerceInner.to_json() - -# convert the object into a dict -get_commerce_inner_dict = get_commerce_inner_instance.to_dict() -# create an instance of GetCommerceInner from a dict -get_commerce_inner_form_dict = get_commerce_inner.from_dict(get_commerce_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetIP.md b/python/docs/GetIP.md deleted file mode 100644 index 17f6f5b..0000000 --- a/python/docs/GetIP.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetIP - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_ip import GetIP - -# TODO update the JSON string below -json = "{}" -# create an instance of GetIP from a JSON string -get_ip_instance = GetIP.from_json(json) -# print the JSON string representation of the object -print GetIP.to_json() - -# convert the object into a dict -get_ip_dict = get_ip_instance.to_dict() -# create an instance of GetIP from a dict -get_ip_form_dict = get_ip.from_dict(get_ip_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetMe.md b/python/docs/GetMe.md deleted file mode 100644 index 436b6c5..0000000 --- a/python/docs/GetMe.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetMe - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **str** | Profile`s About section. | [optional] -**address** | **str** | Address of the business | [optional] -**description** | **str** | Description of the business. Max 256 characters | [optional] -**email** | **str** | Business email | [optional] -**phone** | **str** | Linked phone number | [optional] -**vertical** | **str** | Industry of the business | [optional] -**photo** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_me import GetMe - -# TODO update the JSON string below -json = "{}" -# create an instance of GetMe from a JSON string -get_me_instance = GetMe.from_json(json) -# print the JSON string representation of the object -print GetMe.to_json() - -# convert the object into a dict -get_me_dict = get_me_instance.to_dict() -# create an instance of GetMe from a dict -get_me_form_dict = get_me.from_dict(get_me_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetMe401Response.md b/python/docs/GetMe401Response.md deleted file mode 100644 index 8018dfb..0000000 --- a/python/docs/GetMe401Response.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetMe401Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_me401_response import GetMe401Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetMe401Response from a JSON string -get_me401_response_instance = GetMe401Response.from_json(json) -# print the JSON string representation of the object -print GetMe401Response.to_json() - -# convert the object into a dict -get_me401_response_dict = get_me401_response_instance.to_dict() -# create an instance of GetMe401Response from a dict -get_me401_response_form_dict = get_me401_response.from_dict(get_me401_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetMessages.md b/python/docs/GetMessages.md deleted file mode 100644 index 9f56cbb..0000000 --- a/python/docs/GetMessages.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetMessages - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messages** | [**List[GetMessagesMessagesInner]**](GetMessagesMessagesInner.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_messages import GetMessages - -# TODO update the JSON string below -json = "{}" -# create an instance of GetMessages from a JSON string -get_messages_instance = GetMessages.from_json(json) -# print the JSON string representation of the object -print GetMessages.to_json() - -# convert the object into a dict -get_messages_dict = get_messages_instance.to_dict() -# create an instance of GetMessages from a dict -get_messages_form_dict = get_messages.from_dict(get_messages_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetMessagesMessagesInner.md b/python/docs/GetMessagesMessagesInner.md deleted file mode 100644 index 7faa78b..0000000 --- a/python/docs/GetMessagesMessagesInner.md +++ /dev/null @@ -1,42 +0,0 @@ -# GetMessagesMessagesInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message_number** | **int** | | [optional] -**id** | **str** | | [optional] -**body** | **str** | | [optional] -**from_me** | **bool** | | [optional] -**var_self** | **int** | | [optional] -**is_forwarded** | **int** | | [optional] -**author** | **str** | | [optional] -**time** | **int** | | [optional] -**chat_id** | **str** | | [optional] -**type** | **str** | | [optional] -**sender_name** | **str** | | [optional] -**caption** | **str** | | [optional] -**quoted_msg_id** | **str** | | [optional] -**metadata** | **object** | | [optional] -**chat_name** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_messages_messages_inner import GetMessagesMessagesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of GetMessagesMessagesInner from a JSON string -get_messages_messages_inner_instance = GetMessagesMessagesInner.from_json(json) -# print the JSON string representation of the object -print GetMessagesMessagesInner.to_json() - -# convert the object into a dict -get_messages_messages_inner_dict = get_messages_messages_inner_instance.to_dict() -# create an instance of GetMessagesMessagesInner from a dict -get_messages_messages_inner_form_dict = get_messages_messages_inner.from_dict(get_messages_messages_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetTemplates.md b/python/docs/GetTemplates.md deleted file mode 100644 index 7e74ba8..0000000 --- a/python/docs/GetTemplates.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetTemplates - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | | [optional] -**templates** | [**List[GetTemplatesTemplatesInner]**](GetTemplatesTemplatesInner.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_templates import GetTemplates - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTemplates from a JSON string -get_templates_instance = GetTemplates.from_json(json) -# print the JSON string representation of the object -print GetTemplates.to_json() - -# convert the object into a dict -get_templates_dict = get_templates_instance.to_dict() -# create an instance of GetTemplates from a dict -get_templates_form_dict = get_templates.from_dict(get_templates_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetTemplatesTemplatesInner.md b/python/docs/GetTemplatesTemplatesInner.md deleted file mode 100644 index 81fa0f2..0000000 --- a/python/docs/GetTemplatesTemplatesInner.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetTemplatesTemplatesInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | [**TemplateCategoryProp**](TemplateCategoryProp.md) | | [optional] -**components** | [**TemplateComponentsProp**](TemplateComponentsProp.md) | | [optional] -**language** | [**TemplateLanguageProp**](TemplateLanguageProp.md) | | [optional] -**name** | **str** | | [optional] -**namespace** | **str** | Can be found by method /templates | [optional] -**rejected_reason** | **str** | | [optional] -**status** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.get_templates_templates_inner import GetTemplatesTemplatesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTemplatesTemplatesInner from a JSON string -get_templates_templates_inner_instance = GetTemplatesTemplatesInner.from_json(json) -# print the JSON string representation of the object -print GetTemplatesTemplatesInner.to_json() - -# convert the object into a dict -get_templates_templates_inner_dict = get_templates_templates_inner_instance.to_dict() -# create an instance of GetTemplatesTemplatesInner from a dict -get_templates_templates_inner_form_dict = get_templates_templates_inner.from_dict(get_templates_templates_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MeComponents.md b/python/docs/MeComponents.md deleted file mode 100644 index 5861e85..0000000 --- a/python/docs/MeComponents.md +++ /dev/null @@ -1,34 +0,0 @@ -# MeComponents - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **str** | Profile`s About section. | [optional] -**address** | **str** | Address of the business | [optional] -**description** | **str** | Description of the business. Max 256 characters | [optional] -**email** | **str** | Business email | [optional] -**phone** | **str** | Linked phone number | [optional] -**vertical** | **str** | Industry of the business | [optional] -**photo** | **str** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.me_components import MeComponents - -# TODO update the JSON string below -json = "{}" -# create an instance of MeComponents from a JSON string -me_components_instance = MeComponents.from_json(json) -# print the JSON string representation of the object -print MeComponents.to_json() - -# convert the object into a dict -me_components_dict = me_components_instance.to_dict() -# create an instance of MeComponents from a dict -me_components_form_dict = me_components.from_dict(me_components_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MediaApi.md b/python/docs/MediaApi.md deleted file mode 100644 index e215d81..0000000 --- a/python/docs/MediaApi.md +++ /dev/null @@ -1,88 +0,0 @@ -# one_msg_waba_sdk.MediaApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**upload_media**](MediaApi.md#upload_media) | **POST** /uploadMedia | Upload media & get mediaId - - -# **upload_media** -> MediaId upload_media(upload_media) - -Upload media & get mediaId - -Upload media and get mediaId. Uploaded media can be sent in template - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.media_id import MediaId -from one_msg_waba_sdk.models.upload_media import UploadMedia -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MediaApi(api_client) - upload_media = one_msg_waba_sdk.UploadMedia() # UploadMedia | - - try: - # Upload media & get mediaId - api_response = api_instance.upload_media(upload_media) - print("The response of MediaApi->upload_media:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MediaApi->upload_media: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_media** | [**UploadMedia**](UploadMedia.md)| | - -### Return type - -[**MediaId**](MediaId.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/MediaId.md b/python/docs/MediaId.md deleted file mode 100644 index 88acfcd..0000000 --- a/python/docs/MediaId.md +++ /dev/null @@ -1,28 +0,0 @@ -# MediaId - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**media_id** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.media_id import MediaId - -# TODO update the JSON string below -json = "{}" -# create an instance of MediaId from a JSON string -media_id_instance = MediaId.from_json(json) -# print the JSON string representation of the object -print MediaId.to_json() - -# convert the object into a dict -media_id_dict = media_id_instance.to_dict() -# create an instance of MediaId from a dict -media_id_form_dict = media_id.from_dict(media_id_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/Message.md b/python/docs/Message.md deleted file mode 100644 index ab2791f..0000000 --- a/python/docs/Message.md +++ /dev/null @@ -1,39 +0,0 @@ -# Message - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | unique id | [optional] -**body** | **str** | text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\" | [optional] -**from_me** | **bool** | true - outgoing, false - incoming | [optional] -**var_self** | **int** | 1 - generated by api, 0 - generated by app | [optional] -**is_forwarded** | **bool** | true - forwarded message, false - direct message | [optional] -**author** | **str** | Author ID of the message | [optional] -**time** | **int** | send time, unix timestamp | [optional] -**chat_id** | **str** | chat ID | [optional] -**type** | **str** | type of the message | [optional] -**sender_name** | **str** | Sender name | [optional] -**caption** | **str** | File caption or filename | [optional] -**quoted_msg_id** | **str** | ID of quoted message | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.message import Message - -# TODO update the JSON string below -json = "{}" -# create an instance of Message from a JSON string -message_instance = Message.from_json(json) -# print the JSON string representation of the object -print Message.to_json() - -# convert the object into a dict -message_dict = message_instance.to_dict() -# create an instance of Message from a dict -message_form_dict = message.from_dict(message_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MessageIdProp.md b/python/docs/MessageIdProp.md deleted file mode 100644 index 2b3f41c..0000000 --- a/python/docs/MessageIdProp.md +++ /dev/null @@ -1,28 +0,0 @@ -# MessageIdProp - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message_id** | **str** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.message_id_prop import MessageIdProp - -# TODO update the JSON string below -json = "{}" -# create an instance of MessageIdProp from a JSON string -message_id_prop_instance = MessageIdProp.from_json(json) -# print the JSON string representation of the object -print MessageIdProp.to_json() - -# convert the object into a dict -message_id_prop_dict = message_id_prop_instance.to_dict() -# create an instance of MessageIdProp from a dict -message_id_prop_form_dict = message_id_prop.from_dict(message_id_prop_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MessagingApi.md b/python/docs/MessagingApi.md deleted file mode 100644 index 65a8e85..0000000 --- a/python/docs/MessagingApi.md +++ /dev/null @@ -1,583 +0,0 @@ -# one_msg_waba_sdk.MessagingApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**messages_list**](MessagingApi.md#messages_list) | **GET** /messages | Get messages list -[**read_message**](MessagingApi.md#read_message) | **POST** /readMessage | Mark message as read -[**send_contact**](MessagingApi.md#send_contact) | **POST** /sendContact | Send a Contact -[**send_file**](MessagingApi.md#send_file) | **POST** /sendFile | Send a File -[**send_list**](MessagingApi.md#send_list) | **POST** /sendList | Send List Message -[**send_location**](MessagingApi.md#send_location) | **POST** /sendLocation | Send a Location -[**send_message**](MessagingApi.md#send_message) | **POST** /sendMessage | Send a Message - - -# **messages_list** -> GetMessages messages_list(last=last, last_message_number=last_message_number, first_message_number=first_message_number, limit=limit, chat_id=chat_id, min_time=min_time, max_time=max_time, msg_id=msg_id) - -Get messages list - - - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.get_messages import GetMessages -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - last = true # bool | Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. (optional) - last_message_number = 100 # int | The lastMessageNumber parameter from the last response. Example: 100 (optional) - first_message_number = 1 # int | The firstMessageNumber parameter from the last response. Example: 1 (optional) - limit = 200 # int | Sets length of the message list. Default 100. With value 0 returns all messages. (optional) - chat_id = '556123122026@c.us' # str | Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us (optional) - min_time = 1665396610 # int | Filter messages received after specified time. Example: 1665396610 (optional) - max_time = 1665396610 # int | Filter messages received before specified time. Example: 1665396610 (optional) - msg_id = '0XzkmGNn4prUAQlzsHApGNRXQ0U' # str | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) - - try: - # Get messages list - api_response = api_instance.messages_list(last=last, last_message_number=last_message_number, first_message_number=first_message_number, limit=limit, chat_id=chat_id, min_time=min_time, max_time=max_time, msg_id=msg_id) - print("The response of MessagingApi->messages_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->messages_list: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **last** | **bool**| Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. | [optional] - **last_message_number** | **int**| The lastMessageNumber parameter from the last response. Example: 100 | [optional] - **first_message_number** | **int**| The firstMessageNumber parameter from the last response. Example: 1 | [optional] - **limit** | **int**| Sets length of the message list. Default 100. With value 0 returns all messages. | [optional] - **chat_id** | **str**| Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us | [optional] - **min_time** | **int**| Filter messages received after specified time. Example: 1665396610 | [optional] - **max_time** | **int**| Filter messages received before specified time. Example: 1665396610 | [optional] - **msg_id** | **str**| Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -### Return type - -[**GetMessages**](GetMessages.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **read_message** -> SetMe read_message(read_message_request=read_message_request) - -Mark message as read - - - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.read_message_request import ReadMessageRequest -from one_msg_waba_sdk.models.set_me import SetMe -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - read_message_request = one_msg_waba_sdk.ReadMessageRequest() # ReadMessageRequest | (optional) - - try: - # Mark message as read - api_response = api_instance.read_message(read_message_request=read_message_request) - print("The response of MessagingApi->read_message:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->read_message: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **read_message_request** | [**ReadMessageRequest**](ReadMessageRequest.md)| | [optional] - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_contact** -> SendMessageStatus send_contact(send_contact_request) - -Send a Contact - -Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_contact_request import SendContactRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - send_contact_request = one_msg_waba_sdk.SendContactRequest() # SendContactRequest | - - try: - # Send a Contact - api_response = api_instance.send_contact(send_contact_request) - print("The response of MessagingApi->send_contact:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->send_contact: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_contact_request** | [**SendContactRequest**](SendContactRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_file** -> SendMessageStatus send_file(send_file_request) - -Send a File - -Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_file_request import SendFileRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - send_file_request = one_msg_waba_sdk.SendFileRequest() # SendFileRequest | - - try: - # Send a File - api_response = api_instance.send_file(send_file_request) - print("The response of MessagingApi->send_file:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->send_file: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_file_request** | [**SendFileRequest**](SendFileRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_list** -> SendMessageStatus send_list(send_list_request) - -Send List Message - -Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_list_request import SendListRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - send_list_request = one_msg_waba_sdk.SendListRequest() # SendListRequest | - - try: - # Send List Message - api_response = api_instance.send_list(send_list_request) - print("The response of MessagingApi->send_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->send_list: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_list_request** | [**SendListRequest**](SendListRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_location** -> SendMessageStatus send_location(send_location_request) - -Send a Location - -Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_location_request import SendLocationRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - send_location_request = one_msg_waba_sdk.SendLocationRequest() # SendLocationRequest | - - try: - # Send a Location - api_response = api_instance.send_location(send_location_request) - print("The response of MessagingApi->send_location:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->send_location: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_location_request** | [**SendLocationRequest**](SendLocationRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_message** -> SendMessageStatus send_message(send_message_request) - -Send a Message - -Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_message_request import SendMessageRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.MessagingApi(api_client) - send_message_request = one_msg_waba_sdk.SendMessageRequest() # SendMessageRequest | - - try: - # Send a Message - api_response = api_instance.send_message(send_message_request) - print("The response of MessagingApi->send_message:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->send_message: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_message_request** | [**SendMessageRequest**](SendMessageRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/PhoneProp.md b/python/docs/PhoneProp.md deleted file mode 100644 index 8671afb..0000000 --- a/python/docs/PhoneProp.md +++ /dev/null @@ -1,28 +0,0 @@ -# PhoneProp - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.phone_prop import PhoneProp - -# TODO update the JSON string below -json = "{}" -# create an instance of PhoneProp from a JSON string -phone_prop_instance = PhoneProp.from_json(json) -# print the JSON string representation of the object -print PhoneProp.to_json() - -# convert the object into a dict -phone_prop_dict = phone_prop_instance.to_dict() -# create an instance of PhoneProp from a dict -phone_prop_form_dict = phone_prop.from_dict(phone_prop_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ProductsCatalogsApi.md b/python/docs/ProductsCatalogsApi.md deleted file mode 100644 index 482b07a..0000000 --- a/python/docs/ProductsCatalogsApi.md +++ /dev/null @@ -1,169 +0,0 @@ -# one_msg_waba_sdk.ProductsCatalogsApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**send_product**](ProductsCatalogsApi.md#send_product) | **POST** /sendProduct | Send a Product -[**set_commerce**](ProductsCatalogsApi.md#set_commerce) | **POST** /commerce | Set Commerce Settings - - -# **send_product** -> SendMessageStatus send_product(send_product_request) - -Send a Product - -Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.send_product_request import SendProductRequest -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ProductsCatalogsApi(api_client) - send_product_request = one_msg_waba_sdk.SendProductRequest() # SendProductRequest | - - try: - # Send a Product - api_response = api_instance.send_product(send_product_request) - print("The response of ProductsCatalogsApi->send_product:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ProductsCatalogsApi->send_product: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_product_request** | [**SendProductRequest**](SendProductRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_commerce** -> SetCommerce set_commerce(commerce) - -Set Commerce Settings - -**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.commerce import Commerce -from one_msg_waba_sdk.models.set_commerce import SetCommerce -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.ProductsCatalogsApi(api_client) - commerce = one_msg_waba_sdk.Commerce() # Commerce | - - try: - # Set Commerce Settings - api_response = api_instance.set_commerce(commerce) - print("The response of ProductsCatalogsApi->set_commerce:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ProductsCatalogsApi->set_commerce: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **commerce** | [**Commerce**](Commerce.md)| | - -### Return type - -[**SetCommerce**](SetCommerce.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/ReadMessageRequest.md b/python/docs/ReadMessageRequest.md deleted file mode 100644 index 782e40e..0000000 --- a/python/docs/ReadMessageRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# ReadMessageRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message_id** | **str** | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.read_message_request import ReadMessageRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ReadMessageRequest from a JSON string -read_message_request_instance = ReadMessageRequest.from_json(json) -# print the JSON string representation of the object -print ReadMessageRequest.to_json() - -# convert the object into a dict -read_message_request_dict = read_message_request_instance.to_dict() -# create an instance of ReadMessageRequest from a dict -read_message_request_form_dict = read_message_request.from_dict(read_message_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/RemoveTemplateRequest.md b/python/docs/RemoveTemplateRequest.md deleted file mode 100644 index 832f992..0000000 --- a/python/docs/RemoveTemplateRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# RemoveTemplateRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Template name | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.remove_template_request import RemoveTemplateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RemoveTemplateRequest from a JSON string -remove_template_request_instance = RemoveTemplateRequest.from_json(json) -# print the JSON string representation of the object -print RemoveTemplateRequest.to_json() - -# convert the object into a dict -remove_template_request_dict = remove_template_request_instance.to_dict() -# create an instance of RemoveTemplateRequest from a dict -remove_template_request_form_dict = remove_template_request.from_dict(remove_template_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendContactRequest.md b/python/docs/SendContactRequest.md deleted file mode 100644 index 5c6294c..0000000 --- a/python/docs/SendContactRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# SendContactRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**contacts** | **List[object]** | Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}] | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_contact_request import SendContactRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendContactRequest from a JSON string -send_contact_request_instance = SendContactRequest.from_json(json) -# print the JSON string representation of the object -print SendContactRequest.to_json() - -# convert the object into a dict -send_contact_request_dict = send_contact_request_instance.to_dict() -# create an instance of SendContactRequest from a dict -send_contact_request_form_dict = send_contact_request.from_dict(send_contact_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendFileRequest.md b/python/docs/SendFileRequest.md deleted file mode 100644 index 2751ced..0000000 --- a/python/docs/SendFileRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# SendFileRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **str** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | -**filename** | **str** | File name, for *example 1.jpg* or *hello.xlsx* | -**caption** | **str** | Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_file_request import SendFileRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendFileRequest from a JSON string -send_file_request_instance = SendFileRequest.from_json(json) -# print the JSON string representation of the object -print SendFileRequest.to_json() - -# convert the object into a dict -send_file_request_dict = send_file_request_instance.to_dict() -# create an instance of SendFileRequest from a dict -send_file_request_form_dict = send_file_request.from_dict(send_file_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendListRequest.md b/python/docs/SendListRequest.md deleted file mode 100644 index 1347c7b..0000000 --- a/python/docs/SendListRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# SendListRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **str** | Main message text | -**header** | **str** | Header will be located above message text | [optional] -**footer** | **str** | Footer will be placed under message text | [optional] -**action** | **str** | Action for open list | -**sections** | [**List[SendListRequestAllOfSections]**](SendListRequestAllOfSections.md) | Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}] | - -## Example - -```python -from one_msg_waba_sdk.models.send_list_request import SendListRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendListRequest from a JSON string -send_list_request_instance = SendListRequest.from_json(json) -# print the JSON string representation of the object -print SendListRequest.to_json() - -# convert the object into a dict -send_list_request_dict = send_list_request_instance.to_dict() -# create an instance of SendListRequest from a dict -send_list_request_form_dict = send_list_request.from_dict(send_list_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendListRequestAllOfRows.md b/python/docs/SendListRequestAllOfRows.md deleted file mode 100644 index f3a3e0d..0000000 --- a/python/docs/SendListRequestAllOfRows.md +++ /dev/null @@ -1,30 +0,0 @@ -# SendListRequestAllOfRows - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique id for option, up to 200 symbols | -**title** | **str** | Title of option, up to 24 symbols. | -**description** | **str** | Description of option, up to 72 symbols | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_list_request_all_of_rows import SendListRequestAllOfRows - -# TODO update the JSON string below -json = "{}" -# create an instance of SendListRequestAllOfRows from a JSON string -send_list_request_all_of_rows_instance = SendListRequestAllOfRows.from_json(json) -# print the JSON string representation of the object -print SendListRequestAllOfRows.to_json() - -# convert the object into a dict -send_list_request_all_of_rows_dict = send_list_request_all_of_rows_instance.to_dict() -# create an instance of SendListRequestAllOfRows from a dict -send_list_request_all_of_rows_form_dict = send_list_request_all_of_rows.from_dict(send_list_request_all_of_rows_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendListRequestAllOfSections.md b/python/docs/SendListRequestAllOfSections.md deleted file mode 100644 index 93d6cdf..0000000 --- a/python/docs/SendListRequestAllOfSections.md +++ /dev/null @@ -1,29 +0,0 @@ -# SendListRequestAllOfSections - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | Title of section, up to 24 symbols. Required if there are more then 1 section | [optional] -**rows** | [**List[SendListRequestAllOfRows]**](SendListRequestAllOfRows.md) | | - -## Example - -```python -from one_msg_waba_sdk.models.send_list_request_all_of_sections import SendListRequestAllOfSections - -# TODO update the JSON string below -json = "{}" -# create an instance of SendListRequestAllOfSections from a JSON string -send_list_request_all_of_sections_instance = SendListRequestAllOfSections.from_json(json) -# print the JSON string representation of the object -print SendListRequestAllOfSections.to_json() - -# convert the object into a dict -send_list_request_all_of_sections_dict = send_list_request_all_of_sections_instance.to_dict() -# create an instance of SendListRequestAllOfSections from a dict -send_list_request_all_of_sections_form_dict = send_list_request_all_of_sections.from_dict(send_list_request_all_of_sections_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendLocationRequest.md b/python/docs/SendLocationRequest.md deleted file mode 100644 index f21f18a..0000000 --- a/python/docs/SendLocationRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# SendLocationRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**lat** | **str** | Latitude of the location. Example: 45.018337 | -**lng** | **str** | Longitude of the location. Example: -73.968285 | -**address** | **str** | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 | [optional] -**name** | **str** | Name of the location. Example: Facebook HQ | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_location_request import SendLocationRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendLocationRequest from a JSON string -send_location_request_instance = SendLocationRequest.from_json(json) -# print the JSON string representation of the object -print SendLocationRequest.to_json() - -# convert the object into a dict -send_location_request_dict = send_location_request_instance.to_dict() -# create an instance of SendLocationRequest from a dict -send_location_request_form_dict = send_location_request.from_dict(send_location_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendMessageRequest.md b/python/docs/SendMessageRequest.md deleted file mode 100644 index 64b09f3..0000000 --- a/python/docs/SendMessageRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# SendMessageRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**body** | **str** | Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 | - -## Example - -```python -from one_msg_waba_sdk.models.send_message_request import SendMessageRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendMessageRequest from a JSON string -send_message_request_instance = SendMessageRequest.from_json(json) -# print the JSON string representation of the object -print SendMessageRequest.to_json() - -# convert the object into a dict -send_message_request_dict = send_message_request_instance.to_dict() -# create an instance of SendMessageRequest from a dict -send_message_request_form_dict = send_message_request.from_dict(send_message_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendMessageStatus.md b/python/docs/SendMessageStatus.md deleted file mode 100644 index bf66526..0000000 --- a/python/docs/SendMessageStatus.md +++ /dev/null @@ -1,31 +0,0 @@ -# SendMessageStatus - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sent** | **bool** | | [optional] -**id** | **str** | unique message id | [optional] -**message** | **str** | Posting status message | [optional] -**description** | **str** | Result description | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of SendMessageStatus from a JSON string -send_message_status_instance = SendMessageStatus.from_json(json) -# print the JSON string representation of the object -print SendMessageStatus.to_json() - -# convert the object into a dict -send_message_status_dict = send_message_status_instance.to_dict() -# create an instance of SendMessageStatus from a dict -send_message_status_form_dict = send_message_status.from_dict(send_message_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendProductRequest.md b/python/docs/SendProductRequest.md deleted file mode 100644 index 31ed815..0000000 --- a/python/docs/SendProductRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# SendProductRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**action** | [**SendProductRequestAllOfAction**](SendProductRequestAllOfAction.md) | | -**body** | **str** | Text of message. Example: Some text. | [optional] -**footer** | **str** | Located under the message text. Example: Footer. | [optional] -**header** | **str** | Header of catalog. Example: Header. **Required when sending the catalog.** | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_product_request import SendProductRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendProductRequest from a JSON string -send_product_request_instance = SendProductRequest.from_json(json) -# print the JSON string representation of the object -print SendProductRequest.to_json() - -# convert the object into a dict -send_product_request_dict = send_product_request_instance.to_dict() -# create an instance of SendProductRequest from a dict -send_product_request_form_dict = send_product_request.from_dict(send_product_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendProductRequestAllOfAction.md b/python/docs/SendProductRequestAllOfAction.md deleted file mode 100644 index dc09904..0000000 --- a/python/docs/SendProductRequestAllOfAction.md +++ /dev/null @@ -1,31 +0,0 @@ -# SendProductRequestAllOfAction - -Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**catalog_id** | **str** | id of the catalog | [optional] -**product_retailer_id** | **str** | id of the product | [optional] -**sections** | [**List[SendProductRequestAllOfActionSections]**](SendProductRequestAllOfActionSections.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_product_request_all_of_action import SendProductRequestAllOfAction - -# TODO update the JSON string below -json = "{}" -# create an instance of SendProductRequestAllOfAction from a JSON string -send_product_request_all_of_action_instance = SendProductRequestAllOfAction.from_json(json) -# print the JSON string representation of the object -print SendProductRequestAllOfAction.to_json() - -# convert the object into a dict -send_product_request_all_of_action_dict = send_product_request_all_of_action_instance.to_dict() -# create an instance of SendProductRequestAllOfAction from a dict -send_product_request_all_of_action_form_dict = send_product_request_all_of_action.from_dict(send_product_request_all_of_action_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendProductRequestAllOfActionProductItems.md b/python/docs/SendProductRequestAllOfActionProductItems.md deleted file mode 100644 index 5d76912..0000000 --- a/python/docs/SendProductRequestAllOfActionProductItems.md +++ /dev/null @@ -1,28 +0,0 @@ -# SendProductRequestAllOfActionProductItems - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product_retailer_id** | **str** | id of the product | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_product_request_all_of_action_product_items import SendProductRequestAllOfActionProductItems - -# TODO update the JSON string below -json = "{}" -# create an instance of SendProductRequestAllOfActionProductItems from a JSON string -send_product_request_all_of_action_product_items_instance = SendProductRequestAllOfActionProductItems.from_json(json) -# print the JSON string representation of the object -print SendProductRequestAllOfActionProductItems.to_json() - -# convert the object into a dict -send_product_request_all_of_action_product_items_dict = send_product_request_all_of_action_product_items_instance.to_dict() -# create an instance of SendProductRequestAllOfActionProductItems from a dict -send_product_request_all_of_action_product_items_form_dict = send_product_request_all_of_action_product_items.from_dict(send_product_request_all_of_action_product_items_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendProductRequestAllOfActionSections.md b/python/docs/SendProductRequestAllOfActionSections.md deleted file mode 100644 index 39b004a..0000000 --- a/python/docs/SendProductRequestAllOfActionSections.md +++ /dev/null @@ -1,29 +0,0 @@ -# SendProductRequestAllOfActionSections - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | Title of the section. Example: the-section-title | [optional] -**product_items** | [**List[SendProductRequestAllOfActionProductItems]**](SendProductRequestAllOfActionProductItems.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_product_request_all_of_action_sections import SendProductRequestAllOfActionSections - -# TODO update the JSON string below -json = "{}" -# create an instance of SendProductRequestAllOfActionSections from a JSON string -send_product_request_all_of_action_sections_instance = SendProductRequestAllOfActionSections.from_json(json) -# print the JSON string representation of the object -print SendProductRequestAllOfActionSections.to_json() - -# convert the object into a dict -send_product_request_all_of_action_sections_dict = send_product_request_all_of_action_sections_instance.to_dict() -# create an instance of SendProductRequestAllOfActionSections from a dict -send_product_request_all_of_action_sections_form_dict = send_product_request_all_of_action_sections.from_dict(send_product_request_all_of_action_sections_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequest.md b/python/docs/SendTemplateRequest.md deleted file mode 100644 index 6039f44..0000000 --- a/python/docs/SendTemplateRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# SendTemplateRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | **str** | Can be found by method /templates | -**chat_id** | **str** | **Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter. | [optional] -**phone** | **int** | **Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369. | [optional] -**template** | **str** | Name of template | -**language** | [**SendTemplateRequestAllOfLanguage**](SendTemplateRequestAllOfLanguage.md) | | -**params** | [**List[SendTemplateRequestAllOfParams]**](SendTemplateRequestAllOfParams.md) | Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template** | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request import SendTemplateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequest from a JSON string -send_template_request_instance = SendTemplateRequest.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequest.to_json() - -# convert the object into a dict -send_template_request_dict = send_template_request_instance.to_dict() -# create an instance of SendTemplateRequest from a dict -send_template_request_form_dict = send_template_request.from_dict(send_template_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequestAllOfCurrency.md b/python/docs/SendTemplateRequestAllOfCurrency.md deleted file mode 100644 index c3d69fd..0000000 --- a/python/docs/SendTemplateRequestAllOfCurrency.md +++ /dev/null @@ -1,29 +0,0 @@ -# SendTemplateRequestAllOfCurrency - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_code** | **str** | | [optional] -**amount_1000** | **int** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request_all_of_currency import SendTemplateRequestAllOfCurrency - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequestAllOfCurrency from a JSON string -send_template_request_all_of_currency_instance = SendTemplateRequestAllOfCurrency.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequestAllOfCurrency.to_json() - -# convert the object into a dict -send_template_request_all_of_currency_dict = send_template_request_all_of_currency_instance.to_dict() -# create an instance of SendTemplateRequestAllOfCurrency from a dict -send_template_request_all_of_currency_form_dict = send_template_request_all_of_currency.from_dict(send_template_request_all_of_currency_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequestAllOfDateTime.md b/python/docs/SendTemplateRequestAllOfDateTime.md deleted file mode 100644 index 66256b9..0000000 --- a/python/docs/SendTemplateRequestAllOfDateTime.md +++ /dev/null @@ -1,29 +0,0 @@ -# SendTemplateRequestAllOfDateTime - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | [**SendTemplateRequestAllOfDateTimeComponent**](SendTemplateRequestAllOfDateTimeComponent.md) | | [optional] -**unix_epoch** | [**SendTemplateRequestAllOfDateTimeUnixEpoch**](SendTemplateRequestAllOfDateTimeUnixEpoch.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request_all_of_date_time import SendTemplateRequestAllOfDateTime - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequestAllOfDateTime from a JSON string -send_template_request_all_of_date_time_instance = SendTemplateRequestAllOfDateTime.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequestAllOfDateTime.to_json() - -# convert the object into a dict -send_template_request_all_of_date_time_dict = send_template_request_all_of_date_time_instance.to_dict() -# create an instance of SendTemplateRequestAllOfDateTime from a dict -send_template_request_all_of_date_time_form_dict = send_template_request_all_of_date_time.from_dict(send_template_request_all_of_date_time_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequestAllOfDateTimeComponent.md b/python/docs/SendTemplateRequestAllOfDateTimeComponent.md deleted file mode 100644 index 0bc28a5..0000000 --- a/python/docs/SendTemplateRequestAllOfDateTimeComponent.md +++ /dev/null @@ -1,34 +0,0 @@ -# SendTemplateRequestAllOfDateTimeComponent - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**day_of_week** | **str** | | [optional] -**year** | **int** | | [optional] -**month** | **int** | | [optional] -**day_of_month** | **int** | | [optional] -**hour** | **int** | | [optional] -**minute** | **int** | | [optional] -**calendar** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_component import SendTemplateRequestAllOfDateTimeComponent - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequestAllOfDateTimeComponent from a JSON string -send_template_request_all_of_date_time_component_instance = SendTemplateRequestAllOfDateTimeComponent.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequestAllOfDateTimeComponent.to_json() - -# convert the object into a dict -send_template_request_all_of_date_time_component_dict = send_template_request_all_of_date_time_component_instance.to_dict() -# create an instance of SendTemplateRequestAllOfDateTimeComponent from a dict -send_template_request_all_of_date_time_component_form_dict = send_template_request_all_of_date_time_component.from_dict(send_template_request_all_of_date_time_component_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md b/python/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md deleted file mode 100644 index 3236174..0000000 --- a/python/docs/SendTemplateRequestAllOfDateTimeUnixEpoch.md +++ /dev/null @@ -1,28 +0,0 @@ -# SendTemplateRequestAllOfDateTimeUnixEpoch - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **int** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch import SendTemplateRequestAllOfDateTimeUnixEpoch - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch from a JSON string -send_template_request_all_of_date_time_unix_epoch_instance = SendTemplateRequestAllOfDateTimeUnixEpoch.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequestAllOfDateTimeUnixEpoch.to_json() - -# convert the object into a dict -send_template_request_all_of_date_time_unix_epoch_dict = send_template_request_all_of_date_time_unix_epoch_instance.to_dict() -# create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch from a dict -send_template_request_all_of_date_time_unix_epoch_form_dict = send_template_request_all_of_date_time_unix_epoch.from_dict(send_template_request_all_of_date_time_unix_epoch_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequestAllOfLanguage.md b/python/docs/SendTemplateRequestAllOfLanguage.md deleted file mode 100644 index 3602358..0000000 --- a/python/docs/SendTemplateRequestAllOfLanguage.md +++ /dev/null @@ -1,30 +0,0 @@ -# SendTemplateRequestAllOfLanguage - -Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**policy** | **str** | | [optional] -**code** | [**TemplateLanguageProp**](TemplateLanguageProp.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request_all_of_language import SendTemplateRequestAllOfLanguage - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequestAllOfLanguage from a JSON string -send_template_request_all_of_language_instance = SendTemplateRequestAllOfLanguage.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequestAllOfLanguage.to_json() - -# convert the object into a dict -send_template_request_all_of_language_dict = send_template_request_all_of_language_instance.to_dict() -# create an instance of SendTemplateRequestAllOfLanguage from a dict -send_template_request_all_of_language_form_dict = send_template_request_all_of_language.from_dict(send_template_request_all_of_language_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SendTemplateRequestAllOfParams.md b/python/docs/SendTemplateRequestAllOfParams.md deleted file mode 100644 index e301ff7..0000000 --- a/python/docs/SendTemplateRequestAllOfParams.md +++ /dev/null @@ -1,30 +0,0 @@ -# SendTemplateRequestAllOfParams - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**default** | **str** | | [optional] -**currency** | [**SendTemplateRequestAllOfCurrency**](SendTemplateRequestAllOfCurrency.md) | | [optional] -**date_time** | [**SendTemplateRequestAllOfDateTime**](SendTemplateRequestAllOfDateTime.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.send_template_request_all_of_params import SendTemplateRequestAllOfParams - -# TODO update the JSON string below -json = "{}" -# create an instance of SendTemplateRequestAllOfParams from a JSON string -send_template_request_all_of_params_instance = SendTemplateRequestAllOfParams.from_json(json) -# print the JSON string representation of the object -print SendTemplateRequestAllOfParams.to_json() - -# convert the object into a dict -send_template_request_all_of_params_dict = send_template_request_all_of_params_instance.to_dict() -# create an instance of SendTemplateRequestAllOfParams from a dict -send_template_request_all_of_params_form_dict = send_template_request_all_of_params.from_dict(send_template_request_all_of_params_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SetCommerce.md b/python/docs/SetCommerce.md deleted file mode 100644 index f57c67e..0000000 --- a/python/docs/SetCommerce.md +++ /dev/null @@ -1,28 +0,0 @@ -# SetCommerce - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.set_commerce import SetCommerce - -# TODO update the JSON string below -json = "{}" -# create an instance of SetCommerce from a JSON string -set_commerce_instance = SetCommerce.from_json(json) -# print the JSON string representation of the object -print SetCommerce.to_json() - -# convert the object into a dict -set_commerce_dict = set_commerce_instance.to_dict() -# create an instance of SetCommerce from a dict -set_commerce_form_dict = set_commerce.from_dict(set_commerce_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SetMe.md b/python/docs/SetMe.md deleted file mode 100644 index e2ff4cc..0000000 --- a/python/docs/SetMe.md +++ /dev/null @@ -1,28 +0,0 @@ -# SetMe - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.set_me import SetMe - -# TODO update the JSON string below -json = "{}" -# create an instance of SetMe from a JSON string -set_me_instance = SetMe.from_json(json) -# print the JSON string representation of the object -print SetMe.to_json() - -# convert the object into a dict -set_me_dict = set_me_instance.to_dict() -# create an instance of SetMe from a dict -set_me_form_dict = set_me.from_dict(set_me_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SetMeRequest.md b/python/docs/SetMeRequest.md deleted file mode 100644 index 3544a1d..0000000 --- a/python/docs/SetMeRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# SetMeRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | **str** | Profile`s About section. | [optional] -**address** | **str** | Address of the business | [optional] -**description** | **str** | Description of the business. Max 256 characters | [optional] -**email** | **str** | Business email | [optional] -**phone** | **str** | Linked phone number | [optional] -**vertical** | **str** | Industry of the business | [optional] -**photo** | **str** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.set_me_request import SetMeRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SetMeRequest from a JSON string -set_me_request_instance = SetMeRequest.from_json(json) -# print the JSON string representation of the object -print SetMeRequest.to_json() - -# convert the object into a dict -set_me_request_dict = set_me_request_instance.to_dict() -# create an instance of SetMeRequest from a dict -set_me_request_form_dict = set_me_request.from_dict(set_me_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SetSettings200Response.md b/python/docs/SetSettings200Response.md deleted file mode 100644 index 4e188ba..0000000 --- a/python/docs/SetSettings200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# SetSettings200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **str** | | [optional] -**update** | [**SetSettings200ResponseAllOfUpdate**](SetSettings200ResponseAllOfUpdate.md) | | - -## Example - -```python -from one_msg_waba_sdk.models.set_settings200_response import SetSettings200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of SetSettings200Response from a JSON string -set_settings200_response_instance = SetSettings200Response.from_json(json) -# print the JSON string representation of the object -print SetSettings200Response.to_json() - -# convert the object into a dict -set_settings200_response_dict = set_settings200_response_instance.to_dict() -# create an instance of SetSettings200Response from a dict -set_settings200_response_form_dict = set_settings200_response.from_dict(set_settings200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SetSettings200ResponseAllOfUpdate.md b/python/docs/SetSettings200ResponseAllOfUpdate.md deleted file mode 100644 index 9925975..0000000 --- a/python/docs/SetSettings200ResponseAllOfUpdate.md +++ /dev/null @@ -1,28 +0,0 @@ -# SetSettings200ResponseAllOfUpdate - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.set_settings200_response_all_of_update import SetSettings200ResponseAllOfUpdate - -# TODO update the JSON string below -json = "{}" -# create an instance of SetSettings200ResponseAllOfUpdate from a JSON string -set_settings200_response_all_of_update_instance = SetSettings200ResponseAllOfUpdate.from_json(json) -# print the JSON string representation of the object -print SetSettings200ResponseAllOfUpdate.to_json() - -# convert the object into a dict -set_settings200_response_all_of_update_dict = set_settings200_response_all_of_update_instance.to_dict() -# create an instance of SetSettings200ResponseAllOfUpdate from a dict -set_settings200_response_all_of_update_form_dict = set_settings200_response_all_of_update.from_dict(set_settings200_response_all_of_update_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/SetWebhookStatus.md b/python/docs/SetWebhookStatus.md deleted file mode 100644 index 3a9340a..0000000 --- a/python/docs/SetWebhookStatus.md +++ /dev/null @@ -1,29 +0,0 @@ -# SetWebhookStatus - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**set** | **bool** | Flag indicating that the current request has changed webhook | [optional] -**message** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.set_webhook_status import SetWebhookStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of SetWebhookStatus from a JSON string -set_webhook_status_instance = SetWebhookStatus.from_json(json) -# print the JSON string representation of the object -print SetWebhookStatus.to_json() - -# convert the object into a dict -set_webhook_status_dict = set_webhook_status_instance.to_dict() -# create an instance of SetWebhookStatus from a dict -set_webhook_status_form_dict = set_webhook_status.from_dict(set_webhook_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/Settings.md b/python/docs/Settings.md deleted file mode 100644 index e5b88e0..0000000 --- a/python/docs/Settings.md +++ /dev/null @@ -1,28 +0,0 @@ -# Settings - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.settings import Settings - -# TODO update the JSON string below -json = "{}" -# create an instance of Settings from a JSON string -settings_instance = Settings.from_json(json) -# print the JSON string representation of the object -print Settings.to_json() - -# convert the object into a dict -settings_dict = settings_instance.to_dict() -# create an instance of Settings from a dict -settings_form_dict = settings.from_dict(settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplateCategoryProp.md b/python/docs/TemplateCategoryProp.md deleted file mode 100644 index a3cff7d..0000000 --- a/python/docs/TemplateCategoryProp.md +++ /dev/null @@ -1,11 +0,0 @@ -# TemplateCategoryProp - -Template category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplateComponentsProp.md b/python/docs/TemplateComponentsProp.md deleted file mode 100644 index 32ae422..0000000 --- a/python/docs/TemplateComponentsProp.md +++ /dev/null @@ -1,28 +0,0 @@ -# TemplateComponentsProp - -Array of template components - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from one_msg_waba_sdk.models.template_components_prop import TemplateComponentsProp - -# TODO update the JSON string below -json = "{}" -# create an instance of TemplateComponentsProp from a JSON string -template_components_prop_instance = TemplateComponentsProp.from_json(json) -# print the JSON string representation of the object -print TemplateComponentsProp.to_json() - -# convert the object into a dict -template_components_prop_dict = template_components_prop_instance.to_dict() -# create an instance of TemplateComponentsProp from a dict -template_components_prop_form_dict = template_components_prop.from_dict(template_components_prop_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplateComponentsPropInner.md b/python/docs/TemplateComponentsPropInner.md deleted file mode 100644 index 2472a66..0000000 --- a/python/docs/TemplateComponentsPropInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# TemplateComponentsPropInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | [optional] -**format** | **str** | Only for HEADER type | [optional] -**text** | **str** | | [optional] -**example** | **object** | | [optional] -**buttons** | [**List[TemplateComponentsPropInnerButtonsInner]**](TemplateComponentsPropInnerButtonsInner.md) | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.template_components_prop_inner import TemplateComponentsPropInner - -# TODO update the JSON string below -json = "{}" -# create an instance of TemplateComponentsPropInner from a JSON string -template_components_prop_inner_instance = TemplateComponentsPropInner.from_json(json) -# print the JSON string representation of the object -print TemplateComponentsPropInner.to_json() - -# convert the object into a dict -template_components_prop_inner_dict = template_components_prop_inner_instance.to_dict() -# create an instance of TemplateComponentsPropInner from a dict -template_components_prop_inner_form_dict = template_components_prop_inner.from_dict(template_components_prop_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplateComponentsPropInnerButtonsInner.md b/python/docs/TemplateComponentsPropInnerButtonsInner.md deleted file mode 100644 index 626526e..0000000 --- a/python/docs/TemplateComponentsPropInnerButtonsInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# TemplateComponentsPropInnerButtonsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | [optional] -**text** | **str** | | [optional] -**url** | **str** | | [optional] -**phone_number** | **str** | | [optional] -**example** | **List[object]** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner import TemplateComponentsPropInnerButtonsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of TemplateComponentsPropInnerButtonsInner from a JSON string -template_components_prop_inner_buttons_inner_instance = TemplateComponentsPropInnerButtonsInner.from_json(json) -# print the JSON string representation of the object -print TemplateComponentsPropInnerButtonsInner.to_json() - -# convert the object into a dict -template_components_prop_inner_buttons_inner_dict = template_components_prop_inner_buttons_inner_instance.to_dict() -# create an instance of TemplateComponentsPropInnerButtonsInner from a dict -template_components_prop_inner_buttons_inner_form_dict = template_components_prop_inner_buttons_inner.from_dict(template_components_prop_inner_buttons_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplateLanguageProp.md b/python/docs/TemplateLanguageProp.md deleted file mode 100644 index 269bc5b..0000000 --- a/python/docs/TemplateLanguageProp.md +++ /dev/null @@ -1,11 +0,0 @@ -# TemplateLanguageProp - -Template language - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplateNamespaceField.md b/python/docs/TemplateNamespaceField.md deleted file mode 100644 index 3e755de..0000000 --- a/python/docs/TemplateNamespaceField.md +++ /dev/null @@ -1,28 +0,0 @@ -# TemplateNamespaceField - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | **str** | | [optional] - -## Example - -```python -from one_msg_waba_sdk.models.template_namespace_field import TemplateNamespaceField - -# TODO update the JSON string below -json = "{}" -# create an instance of TemplateNamespaceField from a JSON string -template_namespace_field_instance = TemplateNamespaceField.from_json(json) -# print the JSON string representation of the object -print TemplateNamespaceField.to_json() - -# convert the object into a dict -template_namespace_field_dict = template_namespace_field_instance.to_dict() -# create an instance of TemplateNamespaceField from a dict -template_namespace_field_form_dict = template_namespace_field.from_dict(template_namespace_field_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/TemplatesApi.md b/python/docs/TemplatesApi.md deleted file mode 100644 index 652f7f2..0000000 --- a/python/docs/TemplatesApi.md +++ /dev/null @@ -1,323 +0,0 @@ -# one_msg_waba_sdk.TemplatesApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_template**](TemplatesApi.md#add_template) | **POST** /addTemplate | Create template -[**remove_template**](TemplatesApi.md#remove_template) | **POST** /removeTemplate | Remove template -[**send_template**](TemplatesApi.md#send_template) | **POST** /sendTemplate | Send Template Message -[**templates_list**](TemplatesApi.md#templates_list) | **GET** /templates | Get templates list - - -# **add_template** -> object add_template(add_template_request) - -Create template - -Create new template for sending. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.add_template_request import AddTemplateRequest -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.TemplatesApi(api_client) - add_template_request = one_msg_waba_sdk.AddTemplateRequest() # AddTemplateRequest | - - try: - # Create template - api_response = api_instance.add_template(add_template_request) - print("The response of TemplatesApi->add_template:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TemplatesApi->add_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **add_template_request** | [**AddTemplateRequest**](AddTemplateRequest.md)| | - -### Return type - -**object** - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **remove_template** -> SetMe remove_template(remove_template_request) - -Remove template - -Deleted template can not be restored. - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.remove_template_request import RemoveTemplateRequest -from one_msg_waba_sdk.models.set_me import SetMe -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.TemplatesApi(api_client) - remove_template_request = one_msg_waba_sdk.RemoveTemplateRequest() # RemoveTemplateRequest | - - try: - # Remove template - api_response = api_instance.remove_template(remove_template_request) - print("The response of TemplatesApi->remove_template:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TemplatesApi->remove_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **remove_template_request** | [**RemoveTemplateRequest**](RemoveTemplateRequest.md)| | - -### Return type - -[**SetMe**](SetMe.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **send_template** -> SendMessageStatus send_template(send_template_request) - -Send Template Message - -Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.send_template_request import SendTemplateRequest -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.TemplatesApi(api_client) - send_template_request = one_msg_waba_sdk.SendTemplateRequest() # SendTemplateRequest | - - try: - # Send Template Message - api_response = api_instance.send_template(send_template_request) - print("The response of TemplatesApi->send_template:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TemplatesApi->send_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **send_template_request** | [**SendTemplateRequest**](SendTemplateRequest.md)| | - -### Return type - -[**SendMessageStatus**](SendMessageStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **templates_list** -> GetTemplates templates_list() - -Get templates list - - - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.get_templates import GetTemplates -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.TemplatesApi(api_client) - - try: - # Get templates list - api_response = api_instance.templates_list() - print("The response of TemplatesApi->templates_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TemplatesApi->templates_list: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetTemplates**](GetTemplates.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/UploadMedia.md b/python/docs/UploadMedia.md deleted file mode 100644 index f3a6485..0000000 --- a/python/docs/UploadMedia.md +++ /dev/null @@ -1,28 +0,0 @@ -# UploadMedia - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | **str** | HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field | - -## Example - -```python -from one_msg_waba_sdk.models.upload_media import UploadMedia - -# TODO update the JSON string below -json = "{}" -# create an instance of UploadMedia from a JSON string -upload_media_instance = UploadMedia.from_json(json) -# print the JSON string representation of the object -print UploadMedia.to_json() - -# convert the object into a dict -upload_media_dict = upload_media_instance.to_dict() -# create an instance of UploadMedia from a dict -upload_media_form_dict = upload_media.from_dict(upload_media_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/WebhookUrl.md b/python/docs/WebhookUrl.md deleted file mode 100644 index 21b9fd0..0000000 --- a/python/docs/WebhookUrl.md +++ /dev/null @@ -1,28 +0,0 @@ -# WebhookUrl - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_url** | **str** | Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). | - -## Example - -```python -from one_msg_waba_sdk.models.webhook_url import WebhookUrl - -# TODO update the JSON string below -json = "{}" -# create an instance of WebhookUrl from a JSON string -webhook_url_instance = WebhookUrl.from_json(json) -# print the JSON string representation of the object -print WebhookUrl.to_json() - -# convert the object into a dict -webhook_url_dict = webhook_url_instance.to_dict() -# create an instance of WebhookUrl from a dict -webhook_url_form_dict = webhook_url.from_dict(webhook_url_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/WebhooksApi.md b/python/docs/WebhooksApi.md deleted file mode 100644 index beda574..0000000 --- a/python/docs/WebhooksApi.md +++ /dev/null @@ -1,168 +0,0 @@ -# one_msg_waba_sdk.WebhooksApi - -All URIs are relative to *https://api.1msg.io/YOUR_INSTANCE_NUMBER* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ack_hook_info**](WebhooksApi.md#ack_hook_info) | **GET** /hookInfo | Check ACKs -[**set_webhook**](WebhooksApi.md#set_webhook) | **POST** /webhook | Set webhook - - -# **ack_hook_info** -> GetAckInfo ack_hook_info(message_id) - -Check ACKs - - - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.get_ack_info import GetAckInfo -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.WebhooksApi(api_client) - message_id = '0XzkmGNn4prUAQlzsHApGNRXQ0U' # str | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - - try: - # Check ACKs - api_response = api_instance.ack_hook_info(message_id) - print("The response of WebhooksApi->ack_hook_info:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebhooksApi->ack_hook_info: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **message_id** | **str**| Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | - -### Return type - -[**GetAckInfo**](GetAckInfo.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | -**401** | Invalid token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_webhook** -> SetWebhookStatus set_webhook(webhook_url) - -Set webhook - -Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - -### Example - -* Api Key Authentication (token): -```python -import time -import os -import one_msg_waba_sdk -from one_msg_waba_sdk.models.set_webhook_status import SetWebhookStatus -from one_msg_waba_sdk.models.webhook_url import WebhookUrl -from one_msg_waba_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.1msg.io/YOUR_INSTANCE_NUMBER -# See configuration.py for a list of all supported configuration parameters. -configuration = one_msg_waba_sdk.Configuration( - host = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: token -configuration.api_key['token'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# Enter a context with an instance of the API client -with one_msg_waba_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_msg_waba_sdk.WebhooksApi(api_client) - webhook_url = one_msg_waba_sdk.WebhookUrl() # WebhookUrl | - - try: - # Set webhook - api_response = api_instance.set_webhook(webhook_url) - print("The response of WebhooksApi->set_webhook:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebhooksApi->set_webhook: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **webhook_url** | [**WebhookUrl**](WebhookUrl.md)| | - -### Return type - -[**SetWebhookStatus**](SetWebhookStatus.md) - -### Authorization - -[token](../README.md#token) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded, application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Server response example | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/git_push.sh b/python/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/python/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/python/one_msg_waba_sdk/__init__.py b/python/one_msg_waba_sdk/__init__.py deleted file mode 100644 index 9d7a472..0000000 --- a/python/one_msg_waba_sdk/__init__.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.3.0" - -# import apis into sdk package -from one_msg_waba_sdk.api.channel_api import ChannelApi -from one_msg_waba_sdk.api.media_api import MediaApi -from one_msg_waba_sdk.api.messaging_api import MessagingApi -from one_msg_waba_sdk.api.products_catalogs_api import ProductsCatalogsApi -from one_msg_waba_sdk.api.templates_api import TemplatesApi -from one_msg_waba_sdk.api.webhooks_api import WebhooksApi - -# import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.configuration import Configuration -from one_msg_waba_sdk.exceptions import OpenApiException -from one_msg_waba_sdk.exceptions import ApiTypeError -from one_msg_waba_sdk.exceptions import ApiValueError -from one_msg_waba_sdk.exceptions import ApiKeyError -from one_msg_waba_sdk.exceptions import ApiAttributeError -from one_msg_waba_sdk.exceptions import ApiException - -# import models into sdk package -from one_msg_waba_sdk.models.ack import Ack -from one_msg_waba_sdk.models.add_template_request import AddTemplateRequest -from one_msg_waba_sdk.models.channel_extended_statistics import ChannelExtendedStatistics -from one_msg_waba_sdk.models.channel_extended_statistics_inner import ChannelExtendedStatisticsInner -from one_msg_waba_sdk.models.channel_statistics import ChannelStatistics -from one_msg_waba_sdk.models.channel_status import ChannelStatus -from one_msg_waba_sdk.models.chat_id_prop import ChatIdProp -from one_msg_waba_sdk.models.commerce import Commerce -from one_msg_waba_sdk.models.commerce_params import CommerceParams -from one_msg_waba_sdk.models.contacts import Contacts -from one_msg_waba_sdk.models.contacts_contacts_inner import ContactsContactsInner -from one_msg_waba_sdk.models.contacts_request import ContactsRequest -from one_msg_waba_sdk.models.get_ack_info import GetAckInfo -from one_msg_waba_sdk.models.get_ack_info_hooks_inner import GetAckInfoHooksInner -from one_msg_waba_sdk.models.get_commerce import GetCommerce -from one_msg_waba_sdk.models.get_commerce_inner import GetCommerceInner -from one_msg_waba_sdk.models.get_ip import GetIP -from one_msg_waba_sdk.models.get_me import GetMe -from one_msg_waba_sdk.models.get_me401_response import GetMe401Response -from one_msg_waba_sdk.models.get_messages import GetMessages -from one_msg_waba_sdk.models.get_messages_messages_inner import GetMessagesMessagesInner -from one_msg_waba_sdk.models.get_templates import GetTemplates -from one_msg_waba_sdk.models.get_templates_templates_inner import GetTemplatesTemplatesInner -from one_msg_waba_sdk.models.me_components import MeComponents -from one_msg_waba_sdk.models.media_id import MediaId -from one_msg_waba_sdk.models.message import Message -from one_msg_waba_sdk.models.message_id_prop import MessageIdProp -from one_msg_waba_sdk.models.phone_prop import PhoneProp -from one_msg_waba_sdk.models.read_message_request import ReadMessageRequest -from one_msg_waba_sdk.models.remove_template_request import RemoveTemplateRequest -from one_msg_waba_sdk.models.send_contact_request import SendContactRequest -from one_msg_waba_sdk.models.send_file_request import SendFileRequest -from one_msg_waba_sdk.models.send_list_request import SendListRequest -from one_msg_waba_sdk.models.send_list_request_all_of_rows import SendListRequestAllOfRows -from one_msg_waba_sdk.models.send_list_request_all_of_sections import SendListRequestAllOfSections -from one_msg_waba_sdk.models.send_location_request import SendLocationRequest -from one_msg_waba_sdk.models.send_message_request import SendMessageRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.send_product_request import SendProductRequest -from one_msg_waba_sdk.models.send_product_request_all_of_action import SendProductRequestAllOfAction -from one_msg_waba_sdk.models.send_product_request_all_of_action_product_items import SendProductRequestAllOfActionProductItems -from one_msg_waba_sdk.models.send_product_request_all_of_action_sections import SendProductRequestAllOfActionSections -from one_msg_waba_sdk.models.send_template_request import SendTemplateRequest -from one_msg_waba_sdk.models.send_template_request_all_of_currency import SendTemplateRequestAllOfCurrency -from one_msg_waba_sdk.models.send_template_request_all_of_date_time import SendTemplateRequestAllOfDateTime -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_component import SendTemplateRequestAllOfDateTimeComponent -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch import SendTemplateRequestAllOfDateTimeUnixEpoch -from one_msg_waba_sdk.models.send_template_request_all_of_language import SendTemplateRequestAllOfLanguage -from one_msg_waba_sdk.models.send_template_request_all_of_params import SendTemplateRequestAllOfParams -from one_msg_waba_sdk.models.set_commerce import SetCommerce -from one_msg_waba_sdk.models.set_me import SetMe -from one_msg_waba_sdk.models.set_me_request import SetMeRequest -from one_msg_waba_sdk.models.set_settings200_response import SetSettings200Response -from one_msg_waba_sdk.models.set_settings200_response_all_of_update import SetSettings200ResponseAllOfUpdate -from one_msg_waba_sdk.models.set_webhook_status import SetWebhookStatus -from one_msg_waba_sdk.models.settings import Settings -from one_msg_waba_sdk.models.template_category_prop import TemplateCategoryProp -from one_msg_waba_sdk.models.template_components_prop import TemplateComponentsProp -from one_msg_waba_sdk.models.template_components_prop_inner import TemplateComponentsPropInner -from one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner import TemplateComponentsPropInnerButtonsInner -from one_msg_waba_sdk.models.template_language_prop import TemplateLanguageProp -from one_msg_waba_sdk.models.template_namespace_field import TemplateNamespaceField -from one_msg_waba_sdk.models.upload_media import UploadMedia -from one_msg_waba_sdk.models.webhook_url import WebhookUrl diff --git a/python/one_msg_waba_sdk/api/__init__.py b/python/one_msg_waba_sdk/api/__init__.py deleted file mode 100644 index 619f47d..0000000 --- a/python/one_msg_waba_sdk/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from one_msg_waba_sdk.api.channel_api import ChannelApi -from one_msg_waba_sdk.api.media_api import MediaApi -from one_msg_waba_sdk.api.messaging_api import MessagingApi -from one_msg_waba_sdk.api.products_catalogs_api import ProductsCatalogsApi -from one_msg_waba_sdk.api.templates_api import TemplatesApi -from one_msg_waba_sdk.api.webhooks_api import WebhooksApi diff --git a/python/one_msg_waba_sdk/api/channel_api.py b/python/one_msg_waba_sdk/api/channel_api.py deleted file mode 100644 index 9d41b6d..0000000 --- a/python/one_msg_waba_sdk/api/channel_api.py +++ /dev/null @@ -1,1288 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError - -from typing_extensions import Annotated -from pydantic import Field, StrictStr - -from typing import Optional - -from one_msg_waba_sdk.models.channel_extended_statistics import ChannelExtendedStatistics -from one_msg_waba_sdk.models.channel_statistics import ChannelStatistics -from one_msg_waba_sdk.models.channel_status import ChannelStatus -from one_msg_waba_sdk.models.get_commerce import GetCommerce -from one_msg_waba_sdk.models.get_ip import GetIP -from one_msg_waba_sdk.models.get_me import GetMe -from one_msg_waba_sdk.models.set_me import SetMe -from one_msg_waba_sdk.models.set_me_request import SetMeRequest -from one_msg_waba_sdk.models.set_settings200_response import SetSettings200Response -from one_msg_waba_sdk.models.settings import Settings - -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class ChannelApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_commerce(self, **kwargs) -> GetCommerce: # noqa: E501 - """Get Commerce Settings # noqa: E501 - - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_commerce(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetCommerce - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the get_commerce_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.get_commerce_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_commerce_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """Get Commerce Settings # noqa: E501 - - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_commerce_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetCommerce, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_commerce" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "GetCommerce", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/commerce', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_extended_statistics(self, **kwargs) -> ChannelExtendedStatistics: # noqa: E501 - """Get Extended Channel statistics # noqa: E501 - - Get channel usage extended statistics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_extended_statistics(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChannelExtendedStatistics - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the get_extended_statistics_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.get_extended_statistics_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_extended_statistics_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """Get Extended Channel statistics # noqa: E501 - - Get channel usage extended statistics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_extended_statistics_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChannelExtendedStatistics, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_extended_statistics" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "ChannelExtendedStatistics", - } - - return self.api_client.call_api( - '/extendedStatistics', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_me(self, **kwargs) -> GetMe: # noqa: E501 - """Get Profile Info # noqa: E501 - - Use this edge to retrieve your profile's About info # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_me(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetMe - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the get_me_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.get_me_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_me_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """Get Profile Info # noqa: E501 - - Use this edge to retrieve your profile's About info # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_me_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetMe, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_me" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "GetMe", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/me', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_settings(self, **kwargs) -> Settings: # noqa: E501 - """Get Settings # noqa: E501 - - **webhookUrl** - Http or https URL for receiving notifications. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_settings(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Settings - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the get_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.get_settings_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """Get Settings # noqa: E501 - - **webhookUrl** - Http or https URL for receiving notifications. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_settings_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Settings, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_settings" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "Settings", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/settings', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_statistics(self, var_date: Annotated[Optional[StrictStr], Field(description="Month and year in format mm.YYYY.")] = None, **kwargs) -> ChannelStatistics: # noqa: E501 - """Get Channel statistics # noqa: E501 - - Get channel usage statistics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_statistics(var_date, async_req=True) - >>> result = thread.get() - - :param var_date: Month and year in format mm.YYYY. - :type var_date: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChannelStatistics - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the get_statistics_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.get_statistics_with_http_info(var_date, **kwargs) # noqa: E501 - - @validate_arguments - def get_statistics_with_http_info(self, var_date: Annotated[Optional[StrictStr], Field(description="Month and year in format mm.YYYY.")] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Get Channel statistics # noqa: E501 - - Get channel usage statistics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_statistics_with_http_info(var_date, async_req=True) - >>> result = thread.get() - - :param var_date: Month and year in format mm.YYYY. - :type var_date: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChannelStatistics, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'var_date' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_statistics" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('var_date') is not None: # noqa: E501 - _query_params.append(('date', _params['var_date'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "ChannelStatistics", - } - - return self.api_client.call_api( - '/statistics', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_status(self, **kwargs) -> ChannelStatus: # noqa: E501 - """ Get Status # noqa: E501 - - Returns the status of your WhatsApp Business API client. Channel statuses: **connected**/**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_status(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChannelStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the get_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.get_status_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """ Get Status # noqa: E501 - - Returns the status of your WhatsApp Business API client. Channel statuses: **connected**/**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_status_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChannelStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_status" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "ChannelStatus", - } - - return self.api_client.call_api( - '/status', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def output_ip(self, **kwargs) -> GetIP: # noqa: E501 - """Get channel server IP # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.output_ip(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetIP - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the output_ip_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.output_ip_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def output_ip_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """Get channel server IP # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.output_ip_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetIP, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method output_ip" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "GetIP", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/outputIP', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def set_me(self, set_me_request: SetMeRequest, **kwargs) -> SetMe: # noqa: E501 - """Change user info # noqa: E501 - - Change user info # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_me(set_me_request, async_req=True) - >>> result = thread.get() - - :param set_me_request: (required) - :type set_me_request: SetMeRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SetMe - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the set_me_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.set_me_with_http_info(set_me_request, **kwargs) # noqa: E501 - - @validate_arguments - def set_me_with_http_info(self, set_me_request: SetMeRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Change user info # noqa: E501 - - Change user info # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_me_with_http_info(set_me_request, async_req=True) - >>> result = thread.get() - - :param set_me_request: (required) - :type set_me_request: SetMeRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SetMe, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'set_me_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_me" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['set_me_request'] is not None: - _body_params = _params['set_me_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SetMe", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/me', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def set_settings(self, settings: Settings, **kwargs) -> SetSettings200Response: # noqa: E501 - """Set settings # noqa: E501 - - **webhookUrl** - Http or https URL for receiving notifications. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_settings(settings, async_req=True) - >>> result = thread.get() - - :param settings: (required) - :type settings: Settings - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SetSettings200Response - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the set_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.set_settings_with_http_info(settings, **kwargs) # noqa: E501 - - @validate_arguments - def set_settings_with_http_info(self, settings: Settings, **kwargs) -> ApiResponse: # noqa: E501 - """Set settings # noqa: E501 - - **webhookUrl** - Http or https URL for receiving notifications. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_settings_with_http_info(settings, async_req=True) - >>> result = thread.get() - - :param settings: (required) - :type settings: Settings - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SetSettings200Response, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'settings' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_settings" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['settings'] is not None: - _body_params = _params['settings'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json', 'application/x-www-form-urlencoded'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SetSettings200Response", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/settings', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/python/one_msg_waba_sdk/api/media_api.py b/python/one_msg_waba_sdk/api/media_api.py deleted file mode 100644 index 1c808dc..0000000 --- a/python/one_msg_waba_sdk/api/media_api.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError - -from one_msg_waba_sdk.models.media_id import MediaId -from one_msg_waba_sdk.models.upload_media import UploadMedia - -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class MediaApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def upload_media(self, upload_media: UploadMedia, **kwargs) -> MediaId: # noqa: E501 - """Upload media & get mediaId # noqa: E501 - - Upload media and get mediaId. Uploaded media can be sent in template # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.upload_media(upload_media, async_req=True) - >>> result = thread.get() - - :param upload_media: (required) - :type upload_media: UploadMedia - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: MediaId - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the upload_media_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.upload_media_with_http_info(upload_media, **kwargs) # noqa: E501 - - @validate_arguments - def upload_media_with_http_info(self, upload_media: UploadMedia, **kwargs) -> ApiResponse: # noqa: E501 - """Upload media & get mediaId # noqa: E501 - - Upload media and get mediaId. Uploaded media can be sent in template # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.upload_media_with_http_info(upload_media, async_req=True) - >>> result = thread.get() - - :param upload_media: (required) - :type upload_media: UploadMedia - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(MediaId, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'upload_media' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method upload_media" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['upload_media'] is not None: - _body_params = _params['upload_media'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "MediaId", - } - - return self.api_client.call_api( - '/uploadMedia', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/python/one_msg_waba_sdk/api/messaging_api.py b/python/one_msg_waba_sdk/api/messaging_api.py deleted file mode 100644 index d97b791..0000000 --- a/python/one_msg_waba_sdk/api/messaging_api.py +++ /dev/null @@ -1,1135 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError - -from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictInt, StrictStr - -from typing import Optional - -from one_msg_waba_sdk.models.get_messages import GetMessages -from one_msg_waba_sdk.models.read_message_request import ReadMessageRequest -from one_msg_waba_sdk.models.send_contact_request import SendContactRequest -from one_msg_waba_sdk.models.send_file_request import SendFileRequest -from one_msg_waba_sdk.models.send_list_request import SendListRequest -from one_msg_waba_sdk.models.send_location_request import SendLocationRequest -from one_msg_waba_sdk.models.send_message_request import SendMessageRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.set_me import SetMe - -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class MessagingApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def messages_list(self, last: Annotated[Optional[StrictBool], Field(description="Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored.")] = None, last_message_number: Annotated[Optional[StrictInt], Field(description="The lastMessageNumber parameter from the last response. Example: 100")] = None, first_message_number: Annotated[Optional[StrictInt], Field(description="The firstMessageNumber parameter from the last response. Example: 1")] = None, limit: Annotated[Optional[StrictInt], Field(description="Sets length of the message list. Default 100. With value 0 returns all messages.")] = None, chat_id: Annotated[Optional[StrictStr], Field(description="Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us")] = None, min_time: Annotated[Optional[StrictInt], Field(description="Filter messages received after specified time. Example: 1665396610")] = None, max_time: Annotated[Optional[StrictInt], Field(description="Filter messages received before specified time. Example: 1665396610")] = None, msg_id: Annotated[Optional[StrictStr], Field(description="Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U")] = None, **kwargs) -> GetMessages: # noqa: E501 - """Get messages list # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.messages_list(last, last_message_number, first_message_number, limit, chat_id, min_time, max_time, msg_id, async_req=True) - >>> result = thread.get() - - :param last: Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. - :type last: bool - :param last_message_number: The lastMessageNumber parameter from the last response. Example: 100 - :type last_message_number: int - :param first_message_number: The firstMessageNumber parameter from the last response. Example: 1 - :type first_message_number: int - :param limit: Sets length of the message list. Default 100. With value 0 returns all messages. - :type limit: int - :param chat_id: Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us - :type chat_id: str - :param min_time: Filter messages received after specified time. Example: 1665396610 - :type min_time: int - :param max_time: Filter messages received before specified time. Example: 1665396610 - :type max_time: int - :param msg_id: Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - :type msg_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetMessages - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the messages_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.messages_list_with_http_info(last, last_message_number, first_message_number, limit, chat_id, min_time, max_time, msg_id, **kwargs) # noqa: E501 - - @validate_arguments - def messages_list_with_http_info(self, last: Annotated[Optional[StrictBool], Field(description="Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored.")] = None, last_message_number: Annotated[Optional[StrictInt], Field(description="The lastMessageNumber parameter from the last response. Example: 100")] = None, first_message_number: Annotated[Optional[StrictInt], Field(description="The firstMessageNumber parameter from the last response. Example: 1")] = None, limit: Annotated[Optional[StrictInt], Field(description="Sets length of the message list. Default 100. With value 0 returns all messages.")] = None, chat_id: Annotated[Optional[StrictStr], Field(description="Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us")] = None, min_time: Annotated[Optional[StrictInt], Field(description="Filter messages received after specified time. Example: 1665396610")] = None, max_time: Annotated[Optional[StrictInt], Field(description="Filter messages received before specified time. Example: 1665396610")] = None, msg_id: Annotated[Optional[StrictStr], Field(description="Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U")] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Get messages list # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.messages_list_with_http_info(last, last_message_number, first_message_number, limit, chat_id, min_time, max_time, msg_id, async_req=True) - >>> result = thread.get() - - :param last: Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored. - :type last: bool - :param last_message_number: The lastMessageNumber parameter from the last response. Example: 100 - :type last_message_number: int - :param first_message_number: The firstMessageNumber parameter from the last response. Example: 1 - :type first_message_number: int - :param limit: Sets length of the message list. Default 100. With value 0 returns all messages. - :type limit: int - :param chat_id: Filter messages by chatId Chat ID from the message list. Example: 556123122026@c.us - :type chat_id: str - :param min_time: Filter messages received after specified time. Example: 1665396610 - :type min_time: int - :param max_time: Filter messages received before specified time. Example: 1665396610 - :type max_time: int - :param msg_id: Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - :type msg_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetMessages, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'last', - 'last_message_number', - 'first_message_number', - 'limit', - 'chat_id', - 'min_time', - 'max_time', - 'msg_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method messages_list" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('last') is not None: # noqa: E501 - _query_params.append(('last', _params['last'])) - - if _params.get('last_message_number') is not None: # noqa: E501 - _query_params.append(('lastMessageNumber', _params['last_message_number'])) - - if _params.get('first_message_number') is not None: # noqa: E501 - _query_params.append(('firstMessageNumber', _params['first_message_number'])) - - if _params.get('limit') is not None: # noqa: E501 - _query_params.append(('limit', _params['limit'])) - - if _params.get('chat_id') is not None: # noqa: E501 - _query_params.append(('chatId', _params['chat_id'])) - - if _params.get('min_time') is not None: # noqa: E501 - _query_params.append(('min_time', _params['min_time'])) - - if _params.get('max_time') is not None: # noqa: E501 - _query_params.append(('max_time', _params['max_time'])) - - if _params.get('msg_id') is not None: # noqa: E501 - _query_params.append(('msgId', _params['msg_id'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "GetMessages", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/messages', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def read_message(self, read_message_request: Optional[ReadMessageRequest] = None, **kwargs) -> SetMe: # noqa: E501 - """Mark message as read # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.read_message(read_message_request, async_req=True) - >>> result = thread.get() - - :param read_message_request: - :type read_message_request: ReadMessageRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SetMe - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the read_message_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.read_message_with_http_info(read_message_request, **kwargs) # noqa: E501 - - @validate_arguments - def read_message_with_http_info(self, read_message_request: Optional[ReadMessageRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Mark message as read # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.read_message_with_http_info(read_message_request, async_req=True) - >>> result = thread.get() - - :param read_message_request: - :type read_message_request: ReadMessageRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SetMe, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'read_message_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_message" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['read_message_request'] is not None: - _body_params = _params['read_message_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SetMe", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/readMessage', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def send_contact(self, send_contact_request: SendContactRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send a Contact # noqa: E501 - - Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_contact(send_contact_request, async_req=True) - >>> result = thread.get() - - :param send_contact_request: (required) - :type send_contact_request: SendContactRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_contact_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_contact_with_http_info(send_contact_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_contact_with_http_info(self, send_contact_request: SendContactRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send a Contact # noqa: E501 - - Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_contact_with_http_info(send_contact_request, async_req=True) - >>> result = thread.get() - - :param send_contact_request: (required) - :type send_contact_request: SendContactRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_contact_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_contact" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_contact_request'] is not None: - _body_params = _params['send_contact_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendContact', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def send_file(self, send_file_request: SendFileRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send a File # noqa: E501 - - Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_file(send_file_request, async_req=True) - >>> result = thread.get() - - :param send_file_request: (required) - :type send_file_request: SendFileRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_file_with_http_info(send_file_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_file_with_http_info(self, send_file_request: SendFileRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send a File # noqa: E501 - - Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_file_with_http_info(send_file_request, async_req=True) - >>> result = thread.get() - - :param send_file_request: (required) - :type send_file_request: SendFileRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_file_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_file" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_file_request'] is not None: - _body_params = _params['send_file_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendFile', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def send_list(self, send_list_request: SendListRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send List Message # noqa: E501 - - Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_list(send_list_request, async_req=True) - >>> result = thread.get() - - :param send_list_request: (required) - :type send_list_request: SendListRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_list_with_http_info(send_list_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_list_with_http_info(self, send_list_request: SendListRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send List Message # noqa: E501 - - Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_list_with_http_info(send_list_request, async_req=True) - >>> result = thread.get() - - :param send_list_request: (required) - :type send_list_request: SendListRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_list_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_list" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_list_request'] is not None: - _body_params = _params['send_list_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendList', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def send_location(self, send_location_request: SendLocationRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send a Location # noqa: E501 - - Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_location(send_location_request, async_req=True) - >>> result = thread.get() - - :param send_location_request: (required) - :type send_location_request: SendLocationRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_location_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_location_with_http_info(send_location_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_location_with_http_info(self, send_location_request: SendLocationRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send a Location # noqa: E501 - - Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_location_with_http_info(send_location_request, async_req=True) - >>> result = thread.get() - - :param send_location_request: (required) - :type send_location_request: SendLocationRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_location_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_location" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_location_request'] is not None: - _body_params = _params['send_location_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendLocation', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def send_message(self, send_message_request: SendMessageRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send a Message # noqa: E501 - - Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_message(send_message_request, async_req=True) - >>> result = thread.get() - - :param send_message_request: (required) - :type send_message_request: SendMessageRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_message_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_message_with_http_info(send_message_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_message_with_http_info(self, send_message_request: SendMessageRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send a Message # noqa: E501 - - Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_message_with_http_info(send_message_request, async_req=True) - >>> result = thread.get() - - :param send_message_request: (required) - :type send_message_request: SendMessageRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_message_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_message" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_message_request'] is not None: - _body_params = _params['send_message_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendMessage', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/python/one_msg_waba_sdk/api/products_catalogs_api.py b/python/one_msg_waba_sdk/api/products_catalogs_api.py deleted file mode 100644 index 26be4d7..0000000 --- a/python/one_msg_waba_sdk/api/products_catalogs_api.py +++ /dev/null @@ -1,340 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError - -from one_msg_waba_sdk.models.commerce import Commerce -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.send_product_request import SendProductRequest -from one_msg_waba_sdk.models.set_commerce import SetCommerce - -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class ProductsCatalogsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def send_product(self, send_product_request: SendProductRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send a Product # noqa: E501 - - Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_product(send_product_request, async_req=True) - >>> result = thread.get() - - :param send_product_request: (required) - :type send_product_request: SendProductRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_product_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_product_with_http_info(send_product_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_product_with_http_info(self, send_product_request: SendProductRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send a Product # noqa: E501 - - Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_product_with_http_info(send_product_request, async_req=True) - >>> result = thread.get() - - :param send_product_request: (required) - :type send_product_request: SendProductRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_product_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_product" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_product_request'] is not None: - _body_params = _params['send_product_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendProduct', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def set_commerce(self, commerce: Commerce, **kwargs) -> SetCommerce: # noqa: E501 - """Set Commerce Settings # noqa: E501 - - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_commerce(commerce, async_req=True) - >>> result = thread.get() - - :param commerce: (required) - :type commerce: Commerce - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SetCommerce - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the set_commerce_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.set_commerce_with_http_info(commerce, **kwargs) # noqa: E501 - - @validate_arguments - def set_commerce_with_http_info(self, commerce: Commerce, **kwargs) -> ApiResponse: # noqa: E501 - """Set Commerce Settings # noqa: E501 - - **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_commerce_with_http_info(commerce, async_req=True) - >>> result = thread.get() - - :param commerce: (required) - :type commerce: Commerce - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SetCommerce, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'commerce' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_commerce" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['commerce'] is not None: - _body_params = _params['commerce'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json', 'application/x-www-form-urlencoded'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SetCommerce", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/commerce', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/python/one_msg_waba_sdk/api/templates_api.py b/python/one_msg_waba_sdk/api/templates_api.py deleted file mode 100644 index 87d405d..0000000 --- a/python/one_msg_waba_sdk/api/templates_api.py +++ /dev/null @@ -1,623 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError - -from typing import Any, Dict - -from one_msg_waba_sdk.models.add_template_request import AddTemplateRequest -from one_msg_waba_sdk.models.get_templates import GetTemplates -from one_msg_waba_sdk.models.remove_template_request import RemoveTemplateRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.send_template_request import SendTemplateRequest -from one_msg_waba_sdk.models.set_me import SetMe - -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class TemplatesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def add_template(self, add_template_request: AddTemplateRequest, **kwargs) -> object: # noqa: E501 - """Create template # noqa: E501 - - Create new template for sending. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_template(add_template_request, async_req=True) - >>> result = thread.get() - - :param add_template_request: (required) - :type add_template_request: AddTemplateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: object - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the add_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.add_template_with_http_info(add_template_request, **kwargs) # noqa: E501 - - @validate_arguments - def add_template_with_http_info(self, add_template_request: AddTemplateRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Create template # noqa: E501 - - Create new template for sending. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_template_with_http_info(add_template_request, async_req=True) - >>> result = thread.get() - - :param add_template_request: (required) - :type add_template_request: AddTemplateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'add_template_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_template" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['add_template_request'] is not None: - _body_params = _params['add_template_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "object", - } - - return self.api_client.call_api( - '/addTemplate', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def remove_template(self, remove_template_request: RemoveTemplateRequest, **kwargs) -> SetMe: # noqa: E501 - """Remove template # noqa: E501 - - Deleted template can not be restored. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.remove_template(remove_template_request, async_req=True) - >>> result = thread.get() - - :param remove_template_request: (required) - :type remove_template_request: RemoveTemplateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SetMe - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the remove_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.remove_template_with_http_info(remove_template_request, **kwargs) # noqa: E501 - - @validate_arguments - def remove_template_with_http_info(self, remove_template_request: RemoveTemplateRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Remove template # noqa: E501 - - Deleted template can not be restored. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.remove_template_with_http_info(remove_template_request, async_req=True) - >>> result = thread.get() - - :param remove_template_request: (required) - :type remove_template_request: RemoveTemplateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SetMe, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'remove_template_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_template" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['remove_template_request'] is not None: - _body_params = _params['remove_template_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SetMe", - } - - return self.api_client.call_api( - '/removeTemplate', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def send_template(self, send_template_request: SendTemplateRequest, **kwargs) -> SendMessageStatus: # noqa: E501 - """Send Template Message # noqa: E501 - - Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_template(send_template_request, async_req=True) - >>> result = thread.get() - - :param send_template_request: (required) - :type send_template_request: SendTemplateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SendMessageStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the send_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.send_template_with_http_info(send_template_request, **kwargs) # noqa: E501 - - @validate_arguments - def send_template_with_http_info(self, send_template_request: SendTemplateRequest, **kwargs) -> ApiResponse: # noqa: E501 - """Send Template Message # noqa: E501 - - Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_template_with_http_info(send_template_request, async_req=True) - >>> result = thread.get() - - :param send_template_request: (required) - :type send_template_request: SendTemplateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SendMessageStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'send_template_request' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_template" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['send_template_request'] is not None: - _body_params = _params['send_template_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SendMessageStatus", - } - - return self.api_client.call_api( - '/sendTemplate', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def templates_list(self, **kwargs) -> GetTemplates: # noqa: E501 - """Get templates list # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.templates_list(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetTemplates - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the templates_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.templates_list_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def templates_list_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """Get templates list # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.templates_list_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetTemplates, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method templates_list" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "GetTemplates", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/templates', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/python/one_msg_waba_sdk/api/webhooks_api.py b/python/one_msg_waba_sdk/api/webhooks_api.py deleted file mode 100644 index 3c4c5a3..0000000 --- a/python/one_msg_waba_sdk/api/webhooks_api.py +++ /dev/null @@ -1,335 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError - -from typing_extensions import Annotated -from pydantic import Field, StrictStr - -from one_msg_waba_sdk.models.get_ack_info import GetAckInfo -from one_msg_waba_sdk.models.set_webhook_status import SetWebhookStatus -from one_msg_waba_sdk.models.webhook_url import WebhookUrl - -from one_msg_waba_sdk.api_client import ApiClient -from one_msg_waba_sdk.api_response import ApiResponse -from one_msg_waba_sdk.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class WebhooksApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def ack_hook_info(self, message_id: Annotated[StrictStr, Field(..., description="Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U")], **kwargs) -> GetAckInfo: # noqa: E501 - """Check ACKs # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.ack_hook_info(message_id, async_req=True) - >>> result = thread.get() - - :param message_id: Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (required) - :type message_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetAckInfo - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the ack_hook_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.ack_hook_info_with_http_info(message_id, **kwargs) # noqa: E501 - - @validate_arguments - def ack_hook_info_with_http_info(self, message_id: Annotated[StrictStr, Field(..., description="Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U")], **kwargs) -> ApiResponse: # noqa: E501 - """Check ACKs # noqa: E501 - - # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.ack_hook_info_with_http_info(message_id, async_req=True) - >>> result = thread.get() - - :param message_id: Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (required) - :type message_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetAckInfo, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'message_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method ack_hook_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('message_id') is not None: # noqa: E501 - _query_params.append(('messageId', _params['message_id'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "GetAckInfo", - '401': "GetMe401Response", - } - - return self.api_client.call_api( - '/hookInfo', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def set_webhook(self, webhook_url: WebhookUrl, **kwargs) -> SetWebhookStatus: # noqa: E501 - """Set webhook # noqa: E501 - - Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_webhook(webhook_url, async_req=True) - >>> result = thread.get() - - :param webhook_url: (required) - :type webhook_url: WebhookUrl - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. - If one number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SetWebhookStatus - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - message = "Error! Please call the set_webhook_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 - raise ValueError(message) - return self.set_webhook_with_http_info(webhook_url, **kwargs) # noqa: E501 - - @validate_arguments - def set_webhook_with_http_info(self, webhook_url: WebhookUrl, **kwargs) -> ApiResponse: # noqa: E501 - """Set webhook # noqa: E501 - - Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_webhook_with_http_info(webhook_url, async_req=True) - >>> result = thread.get() - - :param webhook_url: (required) - :type webhook_url: WebhookUrl - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SetWebhookStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'webhook_url' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_webhook" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['webhook_url'] is not None: - _body_params = _params['webhook_url'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/x-www-form-urlencoded', 'application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['token'] # noqa: E501 - - _response_types_map = { - '200': "SetWebhookStatus", - } - - return self.api_client.call_api( - '/webhook', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/python/one_msg_waba_sdk/api_client.py b/python/one_msg_waba_sdk/api_client.py deleted file mode 100644 index 37487dd..0000000 --- a/python/one_msg_waba_sdk/api_client.py +++ /dev/null @@ -1,758 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -from urllib.parse import quote - -from one_msg_waba_sdk.configuration import Configuration -from one_msg_waba_sdk.api_response import ApiResponse -import one_msg_waba_sdk.models -from one_msg_waba_sdk import rest -from one_msg_waba_sdk.exceptions import ApiValueError, ApiException - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_types_map=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None, - _request_auth=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, query_params, auth_settings, - resource_path, method, body, - request_auth=_request_auth) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, - collection_formats) - url += "?" + url_query - - try: - # perform request and return response - response_data = self.request( - method, url, - query_params=query_params, - headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - self.last_response = response_data - - return_data = None # assuming derialization is not needed - # data needs deserialization or returns HTTP data (deserialized) only - if _preload_content or _return_http_data_only: - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if response_type == "bytearray": - response_data.data = response_data.data - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type == "bytearray": - return_data = response_data.data - elif response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return return_data - else: - return ApiResponse(status_code=response_data.status, - data=return_data, - headers=response_data.getheaders(), - raw_data=response_data.data) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return {key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items()} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(one_msg_waba_sdk.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_types_map=None, auth_settings=None, - async_req=None, _return_http_data_only=None, - collection_formats=None, _preload_content=True, - _request_timeout=None, _host=None, _request_auth=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_token: dict, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.get_request(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.head_request(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.options_request(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - elif method == "POST": - return self.rest_client.post_request(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.put_request(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.patch_request(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.delete_request(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v))) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, - request_auth=None): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params(headers, queries, - resource_path, method, body, - request_auth) - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params(headers, queries, - resource_path, method, body, - auth_setting) - - def _apply_auth_params(self, headers, queries, - resource_path, method, body, - auth_setting): - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/python/one_msg_waba_sdk/api_response.py b/python/one_msg_waba_sdk/api_response.py deleted file mode 100644 index a0b62b9..0000000 --- a/python/one_msg_waba_sdk/api_response.py +++ /dev/null @@ -1,25 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional -from pydantic import Field, StrictInt, StrictStr - -class ApiResponse: - """ - API response object - """ - - status_code: Optional[StrictInt] = Field(None, description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: Optional[Any] = Field(None, description="Deserialized data given the data type") - raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") - - def __init__(self, - status_code=None, - headers=None, - data=None, - raw_data=None) -> None: - self.status_code = status_code - self.headers = headers - self.data = data - self.raw_data = raw_data diff --git a/python/one_msg_waba_sdk/configuration.py b/python/one_msg_waba_sdk/configuration.py deleted file mode 100644 index c547f2f..0000000 --- a/python/one_msg_waba_sdk/configuration.py +++ /dev/null @@ -1,479 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = one_msg_waba_sdk.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.1msg.io/YOUR_INSTANCE_NUMBER" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("one_msg_waba_sdk") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if 'token' in self.api_key: - auth['token'] = { - 'type': 'api_key', - 'in': 'query', - 'key': 'token', - 'value': self.get_api_key_with_prefix( - 'token', - ), - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 2.39.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "{protocol}://api.1msg.io/{channelId}", - 'description': "New common server url", - 'variables': { - 'channelId': { - 'description': "Your channel number", - 'default_value': "YOUR_INSTANCE_NUMBER", - }, - 'protocol': { - 'description': "No description provided", - 'default_value': "https", - 'enum_values': [ - "http", - "https" - ] - } - } - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/python/one_msg_waba_sdk/exceptions.py b/python/one_msg_waba_sdk/exceptions.py deleted file mode 100644 index 5d256ad..0000000 --- a/python/one_msg_waba_sdk/exceptions.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/python/one_msg_waba_sdk/models/__init__.py b/python/one_msg_waba_sdk/models/__init__.py deleted file mode 100644 index 5437395..0000000 --- a/python/one_msg_waba_sdk/models/__init__.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from one_msg_waba_sdk.models.ack import Ack -from one_msg_waba_sdk.models.add_template_request import AddTemplateRequest -from one_msg_waba_sdk.models.channel_extended_statistics import ChannelExtendedStatistics -from one_msg_waba_sdk.models.channel_extended_statistics_inner import ChannelExtendedStatisticsInner -from one_msg_waba_sdk.models.channel_statistics import ChannelStatistics -from one_msg_waba_sdk.models.channel_status import ChannelStatus -from one_msg_waba_sdk.models.chat_id_prop import ChatIdProp -from one_msg_waba_sdk.models.commerce import Commerce -from one_msg_waba_sdk.models.commerce_params import CommerceParams -from one_msg_waba_sdk.models.contacts import Contacts -from one_msg_waba_sdk.models.contacts_contacts_inner import ContactsContactsInner -from one_msg_waba_sdk.models.contacts_request import ContactsRequest -from one_msg_waba_sdk.models.get_ack_info import GetAckInfo -from one_msg_waba_sdk.models.get_ack_info_hooks_inner import GetAckInfoHooksInner -from one_msg_waba_sdk.models.get_commerce import GetCommerce -from one_msg_waba_sdk.models.get_commerce_inner import GetCommerceInner -from one_msg_waba_sdk.models.get_ip import GetIP -from one_msg_waba_sdk.models.get_me import GetMe -from one_msg_waba_sdk.models.get_me401_response import GetMe401Response -from one_msg_waba_sdk.models.get_messages import GetMessages -from one_msg_waba_sdk.models.get_messages_messages_inner import GetMessagesMessagesInner -from one_msg_waba_sdk.models.get_templates import GetTemplates -from one_msg_waba_sdk.models.get_templates_templates_inner import GetTemplatesTemplatesInner -from one_msg_waba_sdk.models.me_components import MeComponents -from one_msg_waba_sdk.models.media_id import MediaId -from one_msg_waba_sdk.models.message import Message -from one_msg_waba_sdk.models.message_id_prop import MessageIdProp -from one_msg_waba_sdk.models.phone_prop import PhoneProp -from one_msg_waba_sdk.models.read_message_request import ReadMessageRequest -from one_msg_waba_sdk.models.remove_template_request import RemoveTemplateRequest -from one_msg_waba_sdk.models.send_contact_request import SendContactRequest -from one_msg_waba_sdk.models.send_file_request import SendFileRequest -from one_msg_waba_sdk.models.send_list_request import SendListRequest -from one_msg_waba_sdk.models.send_list_request_all_of_rows import SendListRequestAllOfRows -from one_msg_waba_sdk.models.send_list_request_all_of_sections import SendListRequestAllOfSections -from one_msg_waba_sdk.models.send_location_request import SendLocationRequest -from one_msg_waba_sdk.models.send_message_request import SendMessageRequest -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus -from one_msg_waba_sdk.models.send_product_request import SendProductRequest -from one_msg_waba_sdk.models.send_product_request_all_of_action import SendProductRequestAllOfAction -from one_msg_waba_sdk.models.send_product_request_all_of_action_product_items import SendProductRequestAllOfActionProductItems -from one_msg_waba_sdk.models.send_product_request_all_of_action_sections import SendProductRequestAllOfActionSections -from one_msg_waba_sdk.models.send_template_request import SendTemplateRequest -from one_msg_waba_sdk.models.send_template_request_all_of_currency import SendTemplateRequestAllOfCurrency -from one_msg_waba_sdk.models.send_template_request_all_of_date_time import SendTemplateRequestAllOfDateTime -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_component import SendTemplateRequestAllOfDateTimeComponent -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch import SendTemplateRequestAllOfDateTimeUnixEpoch -from one_msg_waba_sdk.models.send_template_request_all_of_language import SendTemplateRequestAllOfLanguage -from one_msg_waba_sdk.models.send_template_request_all_of_params import SendTemplateRequestAllOfParams -from one_msg_waba_sdk.models.set_commerce import SetCommerce -from one_msg_waba_sdk.models.set_me import SetMe -from one_msg_waba_sdk.models.set_me_request import SetMeRequest -from one_msg_waba_sdk.models.set_settings200_response import SetSettings200Response -from one_msg_waba_sdk.models.set_settings200_response_all_of_update import SetSettings200ResponseAllOfUpdate -from one_msg_waba_sdk.models.set_webhook_status import SetWebhookStatus -from one_msg_waba_sdk.models.settings import Settings -from one_msg_waba_sdk.models.template_category_prop import TemplateCategoryProp -from one_msg_waba_sdk.models.template_components_prop import TemplateComponentsProp -from one_msg_waba_sdk.models.template_components_prop_inner import TemplateComponentsPropInner -from one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner import TemplateComponentsPropInnerButtonsInner -from one_msg_waba_sdk.models.template_language_prop import TemplateLanguageProp -from one_msg_waba_sdk.models.template_namespace_field import TemplateNamespaceField -from one_msg_waba_sdk.models.upload_media import UploadMedia -from one_msg_waba_sdk.models.webhook_url import WebhookUrl diff --git a/python/one_msg_waba_sdk/models/ack.py b/python/one_msg_waba_sdk/models/ack.py deleted file mode 100644 index 6f23eae..0000000 --- a/python/one_msg_waba_sdk/models/ack.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, validator - -class Ack(BaseModel): - """ - Ack - """ - id: Optional[StrictStr] = Field(None, description="unique id of message") - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="chat ID") - status: Optional[StrictStr] = Field(None, description="type of the message status") - __properties = ["id", "chatId", "status"] - - @validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('delivered', 'viewed', 'sent'): - raise ValueError("must be one of enum values ('delivered', 'viewed', 'sent')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Ack: - """Create an instance of Ack from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Ack: - """Create an instance of Ack from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Ack.parse_obj(obj) - - _obj = Ack.parse_obj({ - "id": obj.get("id"), - "chat_id": obj.get("chatId"), - "status": obj.get("status") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/add_template_request.py b/python/one_msg_waba_sdk/models/add_template_request.py deleted file mode 100644 index 64c6c6f..0000000 --- a/python/one_msg_waba_sdk/models/add_template_request.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr -from one_msg_waba_sdk.models.template_category_prop import TemplateCategoryProp -from one_msg_waba_sdk.models.template_components_prop import TemplateComponentsProp -from one_msg_waba_sdk.models.template_language_prop import TemplateLanguageProp - - -class AddTemplateRequest(BaseModel): - """ - AddTemplateRequest - """ - name: Optional[StrictStr] = Field(None, description="Name of template") - category: Optional[TemplateCategoryProp] = None - components: Optional[TemplateComponentsProp] = None - language: Optional[TemplateLanguageProp] = None - __properties = ["name", "category", "components", "language"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> AddTemplateRequest: - """Create an instance of AddTemplateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of components - if self.components: - _dict['components'] = self.components.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> AddTemplateRequest: - """Create an instance of AddTemplateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return AddTemplateRequest.parse_obj(obj) - - _obj = AddTemplateRequest.parse_obj({ - "name": obj.get("name"), - "category": obj.get("category"), - "components": TemplateComponentsProp.from_dict(obj.get("components")) if obj.get("components") is not None else None, - "language": obj.get("language") - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/channel_extended_statistics.py b/python/one_msg_waba_sdk/models/channel_extended_statistics.py deleted file mode 100644 index 0e0696e..0000000 --- a/python/one_msg_waba_sdk/models/channel_extended_statistics.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from one_msg_waba_sdk.models.channel_extended_statistics_inner import ChannelExtendedStatisticsInner - - -class ChannelExtendedStatistics(ChannelExtendedStatisticsInner): - """ - ChannelExtendedStatistics - """ - __properties = [] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChannelExtendedStatistics: - """Create an instance of ChannelExtendedStatistics from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChannelExtendedStatistics: - """Create an instance of ChannelExtendedStatistics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChannelExtendedStatistics.parse_obj(obj) - - _obj = ChannelExtendedStatistics.parse_obj({ - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/channel_extended_statistics_inner.py b/python/one_msg_waba_sdk/models/channel_extended_statistics_inner.py deleted file mode 100644 index 05501a4..0000000 --- a/python/one_msg_waba_sdk/models/channel_extended_statistics_inner.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr - -class ChannelExtendedStatisticsInner(BaseModel): - """ - ChannelExtendedStatisticsInner - """ - business_initiated_paid_quantity: Optional[StrictInt] = None - business_initiated_price: Optional[Union[StrictFloat, StrictInt]] = None - business_initiated_quantity: Optional[StrictInt] = None - free_entry_point: Optional[StrictInt] = None - free_quantity: Optional[StrictInt] = None - free_tier: Optional[StrictInt] = None - paid_quantity: Optional[StrictInt] = None - period_date: Optional[StrictStr] = None - quantity: Optional[Union[StrictFloat, StrictInt]] = None - total_price: Optional[Union[StrictFloat, StrictInt]] = None - user_initiated_paid_quantity: Optional[StrictInt] = None - user_initiated_price: Optional[Union[StrictFloat, StrictInt]] = None - user_initiated_quantity: Optional[StrictInt] = None - __properties = ["business_initiated_paid_quantity", "business_initiated_price", "business_initiated_quantity", "free_entry_point", "free_quantity", "free_tier", "paid_quantity", "period_date", "quantity", "total_price", "user_initiated_paid_quantity", "user_initiated_price", "user_initiated_quantity"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChannelExtendedStatisticsInner: - """Create an instance of ChannelExtendedStatisticsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChannelExtendedStatisticsInner: - """Create an instance of ChannelExtendedStatisticsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChannelExtendedStatisticsInner.parse_obj(obj) - - _obj = ChannelExtendedStatisticsInner.parse_obj({ - "business_initiated_paid_quantity": obj.get("business_initiated_paid_quantity"), - "business_initiated_price": obj.get("business_initiated_price"), - "business_initiated_quantity": obj.get("business_initiated_quantity"), - "free_entry_point": obj.get("free_entry_point"), - "free_quantity": obj.get("free_quantity"), - "free_tier": obj.get("free_tier"), - "paid_quantity": obj.get("paid_quantity"), - "period_date": obj.get("period_date"), - "quantity": obj.get("quantity"), - "total_price": obj.get("total_price"), - "user_initiated_paid_quantity": obj.get("user_initiated_paid_quantity"), - "user_initiated_price": obj.get("user_initiated_price"), - "user_initiated_quantity": obj.get("user_initiated_quantity") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/channel_statistics.py b/python/one_msg_waba_sdk/models/channel_statistics.py deleted file mode 100644 index add8879..0000000 --- a/python/one_msg_waba_sdk/models/channel_statistics.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional, Union -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr - -class ChannelStatistics(BaseModel): - """ - ChannelStatistics - """ - var_date: Optional[StrictStr] = Field(None, alias="date") - templates_cost: Optional[Union[StrictFloat, StrictInt]] = None - __properties = ["date", "templates_cost"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChannelStatistics: - """Create an instance of ChannelStatistics from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChannelStatistics: - """Create an instance of ChannelStatistics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChannelStatistics.parse_obj(obj) - - _obj = ChannelStatistics.parse_obj({ - "var_date": obj.get("date"), - "templates_cost": obj.get("templates_cost") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/channel_status.py b/python/one_msg_waba_sdk/models/channel_status.py deleted file mode 100644 index 900f665..0000000 --- a/python/one_msg_waba_sdk/models/channel_status.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, validator - -class ChannelStatus(BaseModel): - """ - ChannelStatus - """ - status: Optional[StrictStr] = Field(None, description="channel Status") - __properties = ["status"] - - @validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('connected', 'connecting', 'disconnected', 'uninitialized', 'unregistered'): - raise ValueError("must be one of enum values ('connected', 'connecting', 'disconnected', 'uninitialized', 'unregistered')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChannelStatus: - """Create an instance of ChannelStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChannelStatus: - """Create an instance of ChannelStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChannelStatus.parse_obj(obj) - - _obj = ChannelStatus.parse_obj({ - "status": obj.get("status") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/chat_id_prop.py b/python/one_msg_waba_sdk/models/chat_id_prop.py deleted file mode 100644 index 211bec2..0000000 --- a/python/one_msg_waba_sdk/models/chat_id_prop.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class ChatIdProp(BaseModel): - """ - ChatIdProp - """ - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - __properties = ["chatId"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChatIdProp: - """Create an instance of ChatIdProp from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChatIdProp: - """Create an instance of ChatIdProp from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChatIdProp.parse_obj(obj) - - _obj = ChatIdProp.parse_obj({ - "chat_id": obj.get("chatId") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/commerce.py b/python/one_msg_waba_sdk/models/commerce.py deleted file mode 100644 index 4de8c1f..0000000 --- a/python/one_msg_waba_sdk/models/commerce.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel -from one_msg_waba_sdk.models.commerce_params import CommerceParams - - -class Commerce(BaseModel): - """ - Commerce - """ - params: Optional[CommerceParams] = None - __properties = ["params"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Commerce: - """Create an instance of Commerce from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of params - if self.params: - _dict['params'] = self.params.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Commerce: - """Create an instance of Commerce from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Commerce.parse_obj(obj) - - _obj = Commerce.parse_obj({ - "params": CommerceParams.from_dict(obj.get("params")) if obj.get("params") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/commerce_params.py b/python/one_msg_waba_sdk/models/commerce_params.py deleted file mode 100644 index 243be4a..0000000 --- a/python/one_msg_waba_sdk/models/commerce_params.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - - -from pydantic import BaseModel, Field, StrictBool - -class CommerceParams(BaseModel): - """ - CommerceParams - """ - is_cart_enabled: StrictBool = Field(...) - is_catalog_visible: StrictBool = Field(...) - __properties = ["is_cart_enabled", "is_catalog_visible"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CommerceParams: - """Create an instance of CommerceParams from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CommerceParams: - """Create an instance of CommerceParams from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CommerceParams.parse_obj(obj) - - _obj = CommerceParams.parse_obj({ - "is_cart_enabled": obj.get("is_cart_enabled"), - "is_catalog_visible": obj.get("is_catalog_visible") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/contacts.py b/python/one_msg_waba_sdk/models/contacts.py deleted file mode 100644 index 22e11f5..0000000 --- a/python/one_msg_waba_sdk/models/contacts.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, conlist -from one_msg_waba_sdk.models.contacts_contacts_inner import ContactsContactsInner - - -class Contacts(BaseModel): - """ - Contacts - """ - contacts: Optional[conlist(ContactsContactsInner)] = Field( - None, description="List of checked numbers") - __properties = ["contacts"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Contacts: - """Create an instance of Contacts from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in contacts (list) - _items = [] - if self.contacts: - for _item in self.contacts: - if _item: - _items.append(_item.to_dict()) - _dict['contacts'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Contacts: - """Create an instance of Contacts from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Contacts.parse_obj(obj) - - _obj = Contacts.parse_obj({ - "contacts": [ContactsContactsInner.from_dict(_item) for _item in obj.get("contacts")] if obj.get("contacts") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/contacts_contacts_inner.py b/python/one_msg_waba_sdk/models/contacts_contacts_inner.py deleted file mode 100644 index c1e2088..0000000 --- a/python/one_msg_waba_sdk/models/contacts_contacts_inner.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class ContactsContactsInner(BaseModel): - """ - ContactsContactsInner - """ - input: Optional[StrictStr] = Field(None, description="Sent value") - status: Optional[StrictStr] = Field(None, description="Contacts status: *failed* - got error on processing *processing* - still not detected *invalid* - unavailable for sending *valid* - available for sending") - wa_id: Optional[StrictStr] = Field(None, description="Formatted contact phone") - __properties = ["input", "status", "wa_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ContactsContactsInner: - """Create an instance of ContactsContactsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ContactsContactsInner: - """Create an instance of ContactsContactsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ContactsContactsInner.parse_obj(obj) - - _obj = ContactsContactsInner.parse_obj({ - "input": obj.get("input"), - "status": obj.get("status"), - "wa_id": obj.get("wa_id") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/contacts_request.py b/python/one_msg_waba_sdk/models/contacts_request.py deleted file mode 100644 index 98d72f6..0000000 --- a/python/one_msg_waba_sdk/models/contacts_request.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist - -class ContactsRequest(BaseModel): - """ - ContactsRequest - """ - blocking: Optional[StrictStr] = Field(None, description="Operating mode: *wait* - synchronous *no_wait* - asynchronous (default)") - force_check: Optional[StrictBool] = Field(None, description="Using cache: *true* - ignore cache *false* - use cache (default)") - contacts: conlist(StrictStr) = Field(..., description="Array of contact numbers for checking. Recommended format is +16315551001 Example: [\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"]") - __properties = ["blocking", "force_check", "contacts"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ContactsRequest: - """Create an instance of ContactsRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ContactsRequest: - """Create an instance of ContactsRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ContactsRequest.parse_obj(obj) - - _obj = ContactsRequest.parse_obj({ - "blocking": obj.get("blocking"), - "force_check": obj.get("force_check"), - "contacts": obj.get("contacts") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_ack_info.py b/python/one_msg_waba_sdk/models/get_ack_info.py deleted file mode 100644 index 1ec6563..0000000 --- a/python/one_msg_waba_sdk/models/get_ack_info.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, conlist -from one_msg_waba_sdk.models.get_ack_info_hooks_inner import GetAckInfoHooksInner - - -class GetAckInfo(BaseModel): - """ - GetAckInfo - """ - hooks: Optional[conlist(GetAckInfoHooksInner)] = None - __properties = ["hooks"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetAckInfo: - """Create an instance of GetAckInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in hooks (list) - _items = [] - if self.hooks: - for _item in self.hooks: - if _item: - _items.append(_item.to_dict()) - _dict['hooks'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetAckInfo: - """Create an instance of GetAckInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetAckInfo.parse_obj(obj) - - _obj = GetAckInfo.parse_obj({ - "hooks": [GetAckInfoHooksInner.from_dict(_item) for _item in obj.get("hooks")] if obj.get("hooks") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/get_ack_info_hooks_inner.py b/python/one_msg_waba_sdk/models/get_ack_info_hooks_inner.py deleted file mode 100644 index b4f71cb..0000000 --- a/python/one_msg_waba_sdk/models/get_ack_info_hooks_inner.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, Dict, Optional -from pydantic import BaseModel, StrictStr - -class GetAckInfoHooksInner(BaseModel): - """ - GetAckInfoHooksInner - """ - id: Optional[StrictStr] = None - type: Optional[StrictStr] = None - status: Optional[StrictStr] = None - pricing: Optional[Dict[str, Any]] = None - timestamp: Optional[StrictStr] = None - conversation: Optional[Dict[str, Any]] = None - recipient_id: Optional[StrictStr] = None - __properties = ["id", "type", "status", "pricing", "timestamp", "conversation", "recipient_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetAckInfoHooksInner: - """Create an instance of GetAckInfoHooksInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetAckInfoHooksInner: - """Create an instance of GetAckInfoHooksInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetAckInfoHooksInner.parse_obj(obj) - - _obj = GetAckInfoHooksInner.parse_obj({ - "id": obj.get("id"), - "type": obj.get("type"), - "status": obj.get("status"), - "pricing": obj.get("pricing"), - "timestamp": obj.get("timestamp"), - "conversation": obj.get("conversation"), - "recipient_id": obj.get("recipient_id") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_commerce.py b/python/one_msg_waba_sdk/models/get_commerce.py deleted file mode 100644 index 5eb84fc..0000000 --- a/python/one_msg_waba_sdk/models/get_commerce.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from one_msg_waba_sdk.models.get_commerce_inner import GetCommerceInner - - -class GetCommerce(GetCommerceInner): - """ - GetCommerce - """ - __properties = [] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetCommerce: - """Create an instance of GetCommerce from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetCommerce: - """Create an instance of GetCommerce from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetCommerce.parse_obj(obj) - - _obj = GetCommerce.parse_obj({ - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/get_commerce_inner.py b/python/one_msg_waba_sdk/models/get_commerce_inner.py deleted file mode 100644 index f82f66f..0000000 --- a/python/one_msg_waba_sdk/models/get_commerce_inner.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictBool, StrictStr - -class GetCommerceInner(BaseModel): - """ - GetCommerceInner - """ - id: Optional[StrictStr] = None - is_cart_enabled: Optional[StrictBool] = None - is_catalog_visible: Optional[StrictBool] = None - __properties = ["id", "is_cart_enabled", "is_catalog_visible"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetCommerceInner: - """Create an instance of GetCommerceInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetCommerceInner: - """Create an instance of GetCommerceInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetCommerceInner.parse_obj(obj) - - _obj = GetCommerceInner.parse_obj({ - "id": obj.get("id"), - "is_cart_enabled": obj.get("is_cart_enabled"), - "is_catalog_visible": obj.get("is_catalog_visible") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_ip.py b/python/one_msg_waba_sdk/models/get_ip.py deleted file mode 100644 index b1035e8..0000000 --- a/python/one_msg_waba_sdk/models/get_ip.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr - -class GetIP(BaseModel): - """ - GetIP - """ - result: Optional[StrictStr] = None - __properties = ["result"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetIP: - """Create an instance of GetIP from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetIP: - """Create an instance of GetIP from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetIP.parse_obj(obj) - - _obj = GetIP.parse_obj({ - "result": obj.get("result") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_me.py b/python/one_msg_waba_sdk/models/get_me.py deleted file mode 100644 index 159212f..0000000 --- a/python/one_msg_waba_sdk/models/get_me.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, validator - -class GetMe(BaseModel): - """ - GetMe - """ - about: Optional[StrictStr] = Field(None, description="Profile`s About section.") - address: Optional[StrictStr] = Field(None, description="Address of the business") - description: Optional[StrictStr] = Field(None, description="Description of the business. Max 256 characters") - email: Optional[StrictStr] = Field(None, description="Business email") - phone: Optional[StrictStr] = Field(None, description="Linked phone number") - vertical: Optional[StrictStr] = Field(None, description="Industry of the business") - photo: Optional[StrictStr] = None - __properties = ["about", "address", "description", "email", "phone", "vertical", "photo"] - - @validator('vertical') - def vertical_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('Automotive', 'Beauty, Spa and Salon', 'Clothing and Apparel', 'Education', 'Entertainment', 'Event Planning and Service', 'Finance and Banking', 'Food and Grocery', 'Public Service', 'Hotel and Lodging', 'Medical and Health', 'Non-profit', 'Professional Services', 'Shopping and Retail', 'Travel and Transportation', 'Restaurant', 'Other', ''): - raise ValueError("must be one of enum values ('Automotive', 'Beauty, Spa and Salon', 'Clothing and Apparel', 'Education', 'Entertainment', 'Event Planning and Service', 'Finance and Banking', 'Food and Grocery', 'Public Service', 'Hotel and Lodging', 'Medical and Health', 'Non-profit', 'Professional Services', 'Shopping and Retail', 'Travel and Transportation', 'Restaurant', 'Other', '')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetMe: - """Create an instance of GetMe from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetMe: - """Create an instance of GetMe from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetMe.parse_obj(obj) - - _obj = GetMe.parse_obj({ - "about": obj.get("about"), - "address": obj.get("address"), - "description": obj.get("description"), - "email": obj.get("email"), - "phone": obj.get("phone"), - "vertical": obj.get("vertical"), - "photo": obj.get("photo") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_me401_response.py b/python/one_msg_waba_sdk/models/get_me401_response.py deleted file mode 100644 index 3cbb83d..0000000 --- a/python/one_msg_waba_sdk/models/get_me401_response.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr - -class GetMe401Response(BaseModel): - """ - GetMe401Response - """ - error: Optional[StrictStr] = None - __properties = ["error"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetMe401Response: - """Create an instance of GetMe401Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetMe401Response: - """Create an instance of GetMe401Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetMe401Response.parse_obj(obj) - - _obj = GetMe401Response.parse_obj({ - "error": obj.get("error") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_messages.py b/python/one_msg_waba_sdk/models/get_messages.py deleted file mode 100644 index e1e5b43..0000000 --- a/python/one_msg_waba_sdk/models/get_messages.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, conlist -from one_msg_waba_sdk.models.get_messages_messages_inner import GetMessagesMessagesInner - - -class GetMessages(BaseModel): - """ - GetMessages - """ - messages: Optional[conlist(GetMessagesMessagesInner)] = None - __properties = ["messages"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetMessages: - """Create an instance of GetMessages from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in messages (list) - _items = [] - if self.messages: - for _item in self.messages: - if _item: - _items.append(_item.to_dict()) - _dict['messages'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetMessages: - """Create an instance of GetMessages from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetMessages.parse_obj(obj) - - _obj = GetMessages.parse_obj({ - "messages": [GetMessagesMessagesInner.from_dict(_item) for _item in obj.get("messages")] if obj.get("messages") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/get_messages_messages_inner.py b/python/one_msg_waba_sdk/models/get_messages_messages_inner.py deleted file mode 100644 index 11f9cca..0000000 --- a/python/one_msg_waba_sdk/models/get_messages_messages_inner.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, Dict, Optional -from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr - -class GetMessagesMessagesInner(BaseModel): - """ - GetMessagesMessagesInner - """ - message_number: Optional[StrictInt] = Field(None, alias="messageNumber") - id: Optional[StrictStr] = None - body: Optional[StrictStr] = None - from_me: Optional[StrictBool] = Field(None, alias="fromMe") - var_self: Optional[StrictInt] = Field(None, alias="self") - is_forwarded: Optional[StrictInt] = Field(None, alias="isForwarded") - author: Optional[StrictStr] = None - time: Optional[StrictInt] = None - chat_id: Optional[StrictStr] = Field(None, alias="chatId") - type: Optional[StrictStr] = None - sender_name: Optional[StrictStr] = Field(None, alias="senderName") - caption: Optional[StrictStr] = None - quoted_msg_id: Optional[StrictStr] = Field(None, alias="quotedMsgId") - metadata: Optional[Dict[str, Any]] = None - chat_name: Optional[StrictStr] = Field(None, alias="chatName") - __properties = ["messageNumber", "id", "body", "fromMe", "self", "isForwarded", "author", "time", "chatId", "type", "senderName", "caption", "quotedMsgId", "metadata", "chatName"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetMessagesMessagesInner: - """Create an instance of GetMessagesMessagesInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetMessagesMessagesInner: - """Create an instance of GetMessagesMessagesInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetMessagesMessagesInner.parse_obj(obj) - - _obj = GetMessagesMessagesInner.parse_obj({ - "message_number": obj.get("messageNumber"), - "id": obj.get("id"), - "body": obj.get("body"), - "from_me": obj.get("fromMe"), - "var_self": obj.get("self"), - "is_forwarded": obj.get("isForwarded"), - "author": obj.get("author"), - "time": obj.get("time"), - "chat_id": obj.get("chatId"), - "type": obj.get("type"), - "sender_name": obj.get("senderName"), - "caption": obj.get("caption"), - "quoted_msg_id": obj.get("quotedMsgId"), - "metadata": obj.get("metadata"), - "chat_name": obj.get("chatName") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/get_templates.py b/python/one_msg_waba_sdk/models/get_templates.py deleted file mode 100644 index 49a05ab..0000000 --- a/python/one_msg_waba_sdk/models/get_templates.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, StrictInt, conlist -from one_msg_waba_sdk.models.get_templates_templates_inner import GetTemplatesTemplatesInner - - -class GetTemplates(BaseModel): - """ - GetTemplates - """ - total: Optional[StrictInt] = None - templates: Optional[conlist(GetTemplatesTemplatesInner)] = None - __properties = ["total", "templates"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetTemplates: - """Create an instance of GetTemplates from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in templates (list) - _items = [] - if self.templates: - for _item in self.templates: - if _item: - _items.append(_item.to_dict()) - _dict['templates'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetTemplates: - """Create an instance of GetTemplates from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetTemplates.parse_obj(obj) - - _obj = GetTemplates.parse_obj({ - "total": obj.get("total"), - "templates": [GetTemplatesTemplatesInner.from_dict(_item) for _item in obj.get("templates")] if obj.get("templates") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/get_templates_templates_inner.py b/python/one_msg_waba_sdk/models/get_templates_templates_inner.py deleted file mode 100644 index 98fff20..0000000 --- a/python/one_msg_waba_sdk/models/get_templates_templates_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr -from one_msg_waba_sdk.models.template_category_prop import TemplateCategoryProp -from one_msg_waba_sdk.models.template_components_prop import TemplateComponentsProp -from one_msg_waba_sdk.models.template_language_prop import TemplateLanguageProp - - -class GetTemplatesTemplatesInner(BaseModel): - """ - GetTemplatesTemplatesInner - """ - category: Optional[TemplateCategoryProp] = None - components: Optional[TemplateComponentsProp] = None - language: Optional[TemplateLanguageProp] = None - name: Optional[StrictStr] = None - namespace: Optional[StrictStr] = Field(None, description="Can be found by method /templates") - rejected_reason: Optional[StrictStr] = None - status: Optional[StrictStr] = None - __properties = ["category", "components", "language", - "name", "namespace", "rejected_reason", "status"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> GetTemplatesTemplatesInner: - """Create an instance of GetTemplatesTemplatesInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of components - if self.components: - _dict['components'] = self.components.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> GetTemplatesTemplatesInner: - """Create an instance of GetTemplatesTemplatesInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return GetTemplatesTemplatesInner.parse_obj(obj) - - _obj = GetTemplatesTemplatesInner.parse_obj({ - "category": obj.get("category"), - "components": TemplateComponentsProp.from_dict(obj.get("components")) if obj.get("components") is not None else None, - "language": obj.get("language"), - "name": obj.get("name"), - "namespace": obj.get("namespace"), - "rejected_reason": obj.get("rejected_reason"), - "status": obj.get("status") - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/me_components.py b/python/one_msg_waba_sdk/models/me_components.py deleted file mode 100644 index feec62a..0000000 --- a/python/one_msg_waba_sdk/models/me_components.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, validator - -class MeComponents(BaseModel): - """ - MeComponents - """ - about: Optional[StrictStr] = Field(None, description="Profile`s About section.") - address: Optional[StrictStr] = Field(None, description="Address of the business") - description: Optional[StrictStr] = Field(None, description="Description of the business. Max 256 characters") - email: Optional[StrictStr] = Field(None, description="Business email") - phone: Optional[StrictStr] = Field(None, description="Linked phone number") - vertical: Optional[StrictStr] = Field(None, description="Industry of the business") - photo: Optional[StrictStr] = Field(None, description="HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field") - __properties = ["about", "address", "description", "email", "phone", "vertical", "photo"] - - @validator('vertical') - def vertical_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('Automotive', 'Beauty, Spa and Salon', 'Clothing and Apparel', 'Education', 'Entertainment', 'Event Planning and Service', 'Finance and Banking', 'Food and Grocery', 'Public Service', 'Hotel and Lodging', 'Medical and Health', 'Non-profit', 'Professional Services', 'Shopping and Retail', 'Travel and Transportation', 'Restaurant', 'Other', ''): - raise ValueError("must be one of enum values ('Automotive', 'Beauty, Spa and Salon', 'Clothing and Apparel', 'Education', 'Entertainment', 'Event Planning and Service', 'Finance and Banking', 'Food and Grocery', 'Public Service', 'Hotel and Lodging', 'Medical and Health', 'Non-profit', 'Professional Services', 'Shopping and Retail', 'Travel and Transportation', 'Restaurant', 'Other', '')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MeComponents: - """Create an instance of MeComponents from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MeComponents: - """Create an instance of MeComponents from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MeComponents.parse_obj(obj) - - _obj = MeComponents.parse_obj({ - "about": obj.get("about"), - "address": obj.get("address"), - "description": obj.get("description"), - "email": obj.get("email"), - "phone": obj.get("phone"), - "vertical": obj.get("vertical"), - "photo": obj.get("photo") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/media_id.py b/python/one_msg_waba_sdk/models/media_id.py deleted file mode 100644 index fe54718..0000000 --- a/python/one_msg_waba_sdk/models/media_id.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class MediaId(BaseModel): - """ - MediaId - """ - media_id: Optional[StrictStr] = Field(None, alias="mediaId") - __properties = ["mediaId"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MediaId: - """Create an instance of MediaId from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MediaId: - """Create an instance of MediaId from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MediaId.parse_obj(obj) - - _obj = MediaId.parse_obj({ - "media_id": obj.get("mediaId") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/message.py b/python/one_msg_waba_sdk/models/message.py deleted file mode 100644 index a379559..0000000 --- a/python/one_msg_waba_sdk/models/message.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, validator - -class Message(BaseModel): - """ - Message - """ - id: Optional[StrictStr] = Field(None, description="unique id") - body: Optional[StrictStr] = Field(None, description="text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\"") - from_me: Optional[StrictBool] = Field(None, alias="fromMe", description="true - outgoing, false - incoming") - var_self: Optional[StrictInt] = Field(None, alias="self", description="1 - generated by api, 0 - generated by app") - is_forwarded: Optional[StrictBool] = Field(None, alias="isForwarded", description="true - forwarded message, false - direct message") - author: Optional[StrictStr] = Field(None, description="Author ID of the message") - time: Optional[StrictInt] = Field(None, description="send time, unix timestamp") - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="chat ID") - type: Optional[StrictStr] = Field(None, description="type of the message") - sender_name: Optional[StrictStr] = Field(None, alias="senderName", description="Sender name") - caption: Optional[StrictStr] = Field(None, description="File caption or filename") - quoted_msg_id: Optional[StrictStr] = Field(None, alias="quotedMsgId", description="ID of quoted message") - __properties = ["id", "body", "fromMe", "self", "isForwarded", "author", "time", "chatId", "type", "senderName", "caption", "quotedMsgId"] - - @validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('chat', 'interactive', 'image', 'video', 'document', 'audio', 'sticker', 'voice'): - raise ValueError("must be one of enum values ('chat', 'interactive', 'image', 'video', 'document', 'audio', 'sticker', 'voice')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Message: - """Create an instance of Message from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Message: - """Create an instance of Message from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Message.parse_obj(obj) - - _obj = Message.parse_obj({ - "id": obj.get("id"), - "body": obj.get("body"), - "from_me": obj.get("fromMe"), - "var_self": obj.get("self"), - "is_forwarded": obj.get("isForwarded"), - "author": obj.get("author"), - "time": obj.get("time"), - "chat_id": obj.get("chatId"), - "type": obj.get("type"), - "sender_name": obj.get("senderName"), - "caption": obj.get("caption"), - "quoted_msg_id": obj.get("quotedMsgId") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/message_id_prop.py b/python/one_msg_waba_sdk/models/message_id_prop.py deleted file mode 100644 index 8bc0bbe..0000000 --- a/python/one_msg_waba_sdk/models/message_id_prop.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class MessageIdProp(BaseModel): - """ - MessageIdProp - """ - message_id: Optional[StrictStr] = Field(None, alias="messageId", description="Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U") - __properties = ["messageId"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MessageIdProp: - """Create an instance of MessageIdProp from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MessageIdProp: - """Create an instance of MessageIdProp from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MessageIdProp.parse_obj(obj) - - _obj = MessageIdProp.parse_obj({ - "message_id": obj.get("messageId") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/phone_prop.py b/python/one_msg_waba_sdk/models/phone_prop.py deleted file mode 100644 index 7686915..0000000 --- a/python/one_msg_waba_sdk/models/phone_prop.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictInt - -class PhoneProp(BaseModel): - """ - PhoneProp - """ - phone: Optional[StrictInt] = Field(None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - __properties = ["phone"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PhoneProp: - """Create an instance of PhoneProp from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PhoneProp: - """Create an instance of PhoneProp from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PhoneProp.parse_obj(obj) - - _obj = PhoneProp.parse_obj({ - "phone": obj.get("phone") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/read_message_request.py b/python/one_msg_waba_sdk/models/read_message_request.py deleted file mode 100644 index 924de60..0000000 --- a/python/one_msg_waba_sdk/models/read_message_request.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class ReadMessageRequest(BaseModel): - """ - ReadMessageRequest - """ - message_id: Optional[StrictStr] = Field(None, alias="messageId", description="Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U") - __properties = ["messageId"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ReadMessageRequest: - """Create an instance of ReadMessageRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ReadMessageRequest: - """Create an instance of ReadMessageRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ReadMessageRequest.parse_obj(obj) - - _obj = ReadMessageRequest.parse_obj({ - "message_id": obj.get("messageId") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/remove_template_request.py b/python/one_msg_waba_sdk/models/remove_template_request.py deleted file mode 100644 index eb573a1..0000000 --- a/python/one_msg_waba_sdk/models/remove_template_request.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class RemoveTemplateRequest(BaseModel): - """ - RemoveTemplateRequest - """ - name: Optional[StrictStr] = Field(None, description="Template name") - __properties = ["name"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> RemoveTemplateRequest: - """Create an instance of RemoveTemplateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> RemoveTemplateRequest: - """Create an instance of RemoveTemplateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return RemoveTemplateRequest.parse_obj(obj) - - _obj = RemoveTemplateRequest.parse_obj({ - "name": obj.get("name") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_contact_request.py b/python/one_msg_waba_sdk/models/send_contact_request.py deleted file mode 100644 index efe811f..0000000 --- a/python/one_msg_waba_sdk/models/send_contact_request.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, Dict, List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist - -class SendContactRequest(BaseModel): - """ - SendContactRequest - """ - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field(None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - contacts: Optional[conlist(Dict[str, Any])] = Field(None, description="Array containing contact objects. Contact object parameters: **name** - full contact name. Required. Object with properties: * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) * first_name - First name. Example: Adam * last_name - Last name. Example: Smith * middle_name - Middle name. Example: John * suffix - Name suffix. Example: Junior * prefix - Name prefix. Example: Lord **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 **addresses** - array containing address objects with parameters: * street - Street number and name. Example: 1 Hacker Way * city - City name. Example: Menlo Park * state - State abbreviation. Example: CA * zip - ZIP code. Example: 94025 * country - Full country name. Example: United States * country_code - Two-letter country abbreviation. Example: us * type - Standard Values: HOME, WORK. Example: HOME **emails** - array containing email objects with parameters: * email - Email address. Example: test@fb.com * type - Standard Values: HOME, WORK. Example: WORK **org** - object containing parameters: * company - Name of the contact's company. Example: WhatsApp * department - Name of the contact's department. Example: Design * title - Contact's business title. Example: Manager **phones** - array containing phone objects with parameters: * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME * wa_id - WhatsApp ID. Example: 19405551234 **urls** - array containing url objects with parameters: * url - URL. Example: https://www.facebook.com * type - Standard Values: HOME, WORK. Example: WORK Example: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}]") - __properties = ["chatId", "phone", "contacts"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendContactRequest: - """Create an instance of SendContactRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendContactRequest: - """Create an instance of SendContactRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendContactRequest.parse_obj(obj) - - _obj = SendContactRequest.parse_obj({ - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "contacts": obj.get("contacts") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_file_request.py b/python/one_msg_waba_sdk/models/send_file_request.py deleted file mode 100644 index dade878..0000000 --- a/python/one_msg_waba_sdk/models/send_file_request.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr - -class SendFileRequest(BaseModel): - """ - SendFileRequest - """ - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field(None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - body: StrictStr = Field(..., description="HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field") - filename: StrictStr = Field(..., description="File name, for *example 1.jpg* or *hello.xlsx*") - caption: Optional[StrictStr] = Field(None, description="Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026") - __properties = ["chatId", "phone", "body", "filename", "caption"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendFileRequest: - """Create an instance of SendFileRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendFileRequest: - """Create an instance of SendFileRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendFileRequest.parse_obj(obj) - - _obj = SendFileRequest.parse_obj({ - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "body": obj.get("body"), - "filename": obj.get("filename"), - "caption": obj.get("caption") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_list_request.py b/python/one_msg_waba_sdk/models/send_list_request.py deleted file mode 100644 index 1e34621..0000000 --- a/python/one_msg_waba_sdk/models/send_list_request.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist -from one_msg_waba_sdk.models.send_list_request_all_of_sections import SendListRequestAllOfSections - - -class SendListRequest(BaseModel): - """ - SendListRequest - """ - chat_id: Optional[StrictStr] = Field( - None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field( - None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - body: StrictStr = Field(..., description="Main message text") - header: Optional[StrictStr] = Field( - None, description="Header will be located above message text") - footer: Optional[StrictStr] = Field( - None, description="Footer will be placed under message text") - action: StrictStr = Field(..., description="Action for open list") - sections: conlist(SendListRequestAllOfSections) = Field(..., - description="Up to 10 sections from which the client can choose. Each section is object with fields: *title* - Title of section, up to 24 symbols. Required if there are more then 1 section *rows* - available options. Required Each option is object with fields: *id* - Unique id for option, up to 200 symbols. Required *title* - Title of option, up to 24 symbols. Required *description* - Description of option, up to 72 symbols Example: [{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}]") - __properties = ["chatId", "phone", "body", "header", "footer", "action", "sections"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendListRequest: - """Create an instance of SendListRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in sections (list) - _items = [] - if self.sections: - for _item in self.sections: - if _item: - _items.append(_item.to_dict()) - _dict['sections'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendListRequest: - """Create an instance of SendListRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendListRequest.parse_obj(obj) - - _obj = SendListRequest.parse_obj({ - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "body": obj.get("body"), - "header": obj.get("header"), - "footer": obj.get("footer"), - "action": obj.get("action"), - "sections": [SendListRequestAllOfSections.from_dict(_item) for _item in obj.get("sections")] if obj.get("sections") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_list_request_all_of_rows.py b/python/one_msg_waba_sdk/models/send_list_request_all_of_rows.py deleted file mode 100644 index a57561a..0000000 --- a/python/one_msg_waba_sdk/models/send_list_request_all_of_rows.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class SendListRequestAllOfRows(BaseModel): - """ - SendListRequestAllOfRows - """ - id: StrictStr = Field(..., description="Unique id for option, up to 200 symbols") - title: StrictStr = Field(..., description="Title of option, up to 24 symbols.") - description: Optional[StrictStr] = Field(None, description="Description of option, up to 72 symbols") - __properties = ["id", "title", "description"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendListRequestAllOfRows: - """Create an instance of SendListRequestAllOfRows from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendListRequestAllOfRows: - """Create an instance of SendListRequestAllOfRows from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendListRequestAllOfRows.parse_obj(obj) - - _obj = SendListRequestAllOfRows.parse_obj({ - "id": obj.get("id"), - "title": obj.get("title"), - "description": obj.get("description") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_list_request_all_of_sections.py b/python/one_msg_waba_sdk/models/send_list_request_all_of_sections.py deleted file mode 100644 index ac4f9c7..0000000 --- a/python/one_msg_waba_sdk/models/send_list_request_all_of_sections.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictStr, conlist -from one_msg_waba_sdk.models.send_list_request_all_of_rows import SendListRequestAllOfRows - - -class SendListRequestAllOfSections(BaseModel): - """ - SendListRequestAllOfSections - """ - title: Optional[StrictStr] = Field( - None, description="Title of section, up to 24 symbols. Required if there are more then 1 section") - rows: conlist(SendListRequestAllOfRows) = Field(...) - __properties = ["title", "rows"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendListRequestAllOfSections: - """Create an instance of SendListRequestAllOfSections from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in rows (list) - _items = [] - if self.rows: - for _item in self.rows: - if _item: - _items.append(_item.to_dict()) - _dict['rows'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendListRequestAllOfSections: - """Create an instance of SendListRequestAllOfSections from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendListRequestAllOfSections.parse_obj(obj) - - _obj = SendListRequestAllOfSections.parse_obj({ - "title": obj.get("title"), - "rows": [SendListRequestAllOfRows.from_dict(_item) for _item in obj.get("rows")] if obj.get("rows") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_location_request.py b/python/one_msg_waba_sdk/models/send_location_request.py deleted file mode 100644 index f9abcd1..0000000 --- a/python/one_msg_waba_sdk/models/send_location_request.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr - -class SendLocationRequest(BaseModel): - """ - SendLocationRequest - """ - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field(None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - lat: StrictStr = Field(..., description="Latitude of the location. Example: 45.018337") - lng: StrictStr = Field(..., description="Longitude of the location. Example: -73.968285") - address: Optional[StrictStr] = Field(None, description="Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024") - name: Optional[StrictStr] = Field(None, description="Name of the location. Example: Facebook HQ") - __properties = ["chatId", "phone", "lat", "lng", "address", "name"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendLocationRequest: - """Create an instance of SendLocationRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendLocationRequest: - """Create an instance of SendLocationRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendLocationRequest.parse_obj(obj) - - _obj = SendLocationRequest.parse_obj({ - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "lat": obj.get("lat"), - "lng": obj.get("lng"), - "address": obj.get("address"), - "name": obj.get("name") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_message_request.py b/python/one_msg_waba_sdk/models/send_message_request.py deleted file mode 100644 index 67bb60a..0000000 --- a/python/one_msg_waba_sdk/models/send_message_request.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr - -class SendMessageRequest(BaseModel): - """ - SendMessageRequest - """ - chat_id: Optional[StrictStr] = Field(None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field(None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - body: StrictStr = Field(..., description="Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026") - __properties = ["chatId", "phone", "body"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendMessageRequest: - """Create an instance of SendMessageRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendMessageRequest: - """Create an instance of SendMessageRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendMessageRequest.parse_obj(obj) - - _obj = SendMessageRequest.parse_obj({ - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "body": obj.get("body") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_message_status.py b/python/one_msg_waba_sdk/models/send_message_status.py deleted file mode 100644 index 37b782e..0000000 --- a/python/one_msg_waba_sdk/models/send_message_status.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictBool, StrictStr - -class SendMessageStatus(BaseModel): - """ - SendMessageStatus - """ - sent: Optional[StrictBool] = None - id: Optional[StrictStr] = Field(None, description="unique message id") - message: Optional[StrictStr] = Field(None, description="Posting status message") - description: Optional[StrictStr] = Field(None, description="Result description") - __properties = ["sent", "id", "message", "description"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendMessageStatus: - """Create an instance of SendMessageStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendMessageStatus: - """Create an instance of SendMessageStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendMessageStatus.parse_obj(obj) - - _obj = SendMessageStatus.parse_obj({ - "sent": obj.get("sent"), - "id": obj.get("id"), - "message": obj.get("message"), - "description": obj.get("description") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_product_request.py b/python/one_msg_waba_sdk/models/send_product_request.py deleted file mode 100644 index 08c8290..0000000 --- a/python/one_msg_waba_sdk/models/send_product_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr -from one_msg_waba_sdk.models.send_product_request_all_of_action import SendProductRequestAllOfAction - - -class SendProductRequest(BaseModel): - """ - SendProductRequest - """ - chat_id: Optional[StrictStr] = Field( - None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field( - None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - action: SendProductRequestAllOfAction = Field(...) - body: Optional[StrictStr] = Field(None, description="Text of message. Example: Some text.") - footer: Optional[StrictStr] = Field( - None, description="Located under the message text. Example: Footer.") - header: Optional[StrictStr] = Field( - None, description="Header of catalog. Example: Header. **Required when sending the catalog.**") - __properties = ["chatId", "phone", "action", "body", "footer", "header"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendProductRequest: - """Create an instance of SendProductRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of action - if self.action: - _dict['action'] = self.action.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendProductRequest: - """Create an instance of SendProductRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendProductRequest.parse_obj(obj) - - _obj = SendProductRequest.parse_obj({ - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "action": SendProductRequestAllOfAction.from_dict(obj.get("action")) if obj.get("action") is not None else None, - "body": obj.get("body"), - "footer": obj.get("footer"), - "header": obj.get("header") - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_product_request_all_of_action.py b/python/one_msg_waba_sdk/models/send_product_request_all_of_action.py deleted file mode 100644 index be3f93c..0000000 --- a/python/one_msg_waba_sdk/models/send_product_request_all_of_action.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictStr, conlist -from one_msg_waba_sdk.models.send_product_request_all_of_action_sections import SendProductRequestAllOfActionSections - - -class SendProductRequestAllOfAction(BaseModel): - """ - Object containing info about product or catalog. Can contain the following fields: **catalog_id** - id of catalog **product_retailer_id** - id of product. Only for sending single product. **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. Example: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]} # noqa: E501 - """ - catalog_id: Optional[StrictStr] = Field(None, description="id of the catalog") - product_retailer_id: Optional[StrictStr] = Field(None, description="id of the product") - sections: Optional[conlist(SendProductRequestAllOfActionSections)] = None - __properties = ["catalog_id", "product_retailer_id", "sections"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendProductRequestAllOfAction: - """Create an instance of SendProductRequestAllOfAction from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in sections (list) - _items = [] - if self.sections: - for _item in self.sections: - if _item: - _items.append(_item.to_dict()) - _dict['sections'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendProductRequestAllOfAction: - """Create an instance of SendProductRequestAllOfAction from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendProductRequestAllOfAction.parse_obj(obj) - - _obj = SendProductRequestAllOfAction.parse_obj({ - "catalog_id": obj.get("catalog_id"), - "product_retailer_id": obj.get("product_retailer_id"), - "sections": [SendProductRequestAllOfActionSections.from_dict(_item) for _item in obj.get("sections")] if obj.get("sections") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_product_request_all_of_action_product_items.py b/python/one_msg_waba_sdk/models/send_product_request_all_of_action_product_items.py deleted file mode 100644 index cdd1e51..0000000 --- a/python/one_msg_waba_sdk/models/send_product_request_all_of_action_product_items.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class SendProductRequestAllOfActionProductItems(BaseModel): - """ - SendProductRequestAllOfActionProductItems - """ - product_retailer_id: Optional[StrictStr] = Field(None, description="id of the product") - __properties = ["product_retailer_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendProductRequestAllOfActionProductItems: - """Create an instance of SendProductRequestAllOfActionProductItems from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendProductRequestAllOfActionProductItems: - """Create an instance of SendProductRequestAllOfActionProductItems from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendProductRequestAllOfActionProductItems.parse_obj(obj) - - _obj = SendProductRequestAllOfActionProductItems.parse_obj({ - "product_retailer_id": obj.get("product_retailer_id") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_product_request_all_of_action_sections.py b/python/one_msg_waba_sdk/models/send_product_request_all_of_action_sections.py deleted file mode 100644 index 2a31f26..0000000 --- a/python/one_msg_waba_sdk/models/send_product_request_all_of_action_sections.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictStr, conlist -from one_msg_waba_sdk.models.send_product_request_all_of_action_product_items import SendProductRequestAllOfActionProductItems - - -class SendProductRequestAllOfActionSections(BaseModel): - """ - SendProductRequestAllOfActionSections - """ - title: Optional[StrictStr] = Field( - None, description="Title of the section. Example: the-section-title") - product_items: Optional[conlist(SendProductRequestAllOfActionProductItems)] = None - __properties = ["title", "product_items"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendProductRequestAllOfActionSections: - """Create an instance of SendProductRequestAllOfActionSections from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in product_items (list) - _items = [] - if self.product_items: - for _item in self.product_items: - if _item: - _items.append(_item.to_dict()) - _dict['product_items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendProductRequestAllOfActionSections: - """Create an instance of SendProductRequestAllOfActionSections from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendProductRequestAllOfActionSections.parse_obj(obj) - - _obj = SendProductRequestAllOfActionSections.parse_obj({ - "title": obj.get("title"), - "product_items": [SendProductRequestAllOfActionProductItems.from_dict(_item) for _item in obj.get("product_items")] if obj.get("product_items") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_template_request.py b/python/one_msg_waba_sdk/models/send_template_request.py deleted file mode 100644 index c422712..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist -from one_msg_waba_sdk.models.send_template_request_all_of_language import SendTemplateRequestAllOfLanguage -from one_msg_waba_sdk.models.send_template_request_all_of_params import SendTemplateRequestAllOfParams - - -class SendTemplateRequest(BaseModel): - """ - SendTemplateRequest - """ - namespace: StrictStr = Field(..., description="Can be found by method /templates") - chat_id: Optional[StrictStr] = Field( - None, alias="chatId", description="**Required if phone is not set** Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.") - phone: Optional[StrictInt] = Field( - None, description="**Required if chatId is not set** A phone number starting with the country code. You do not need to add your number. USA example: 12020721369.") - template: StrictStr = Field(..., description="Name of template") - language: SendTemplateRequestAllOfLanguage = Field(...) - params: Optional[conlist(SendTemplateRequestAllOfParams)] = Field(None, description="Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: **type** - section of parameters - header, body, footer, button **parameters** - variables for section. Each variable is an object that can contain the following fields: **type** - can be text, currency, date_time, image, document or video **video**- id (mediaId) **document** * id (mediaId) * filename(optional) **image** - object with field link (image url) **currency** - object containing parameters currency_code and amount_1000. * *currency_code* - Currency code as defined in ISO 4217. * *amount_1000* - Amount multiplied by 1000. * *fallback_value* - Default text if localization fails. **date_time** - If the date_time object is used, further definition of the date and time is required. * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. * *fallback_value* - Default text if localization fails. **button** - if button has parameter * sub_type (url/quick_reply) * parameters (array to fill button variable) * index - button position. **The number of parameters passed must match the number of parameters in the template**") - __properties = ["namespace", "chatId", "phone", "template", "language", "params"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequest: - """Create an instance of SendTemplateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of language - if self.language: - _dict['language'] = self.language.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in params (list) - _items = [] - if self.params: - for _item in self.params: - if _item: - _items.append(_item.to_dict()) - _dict['params'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequest: - """Create an instance of SendTemplateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequest.parse_obj(obj) - - _obj = SendTemplateRequest.parse_obj({ - "namespace": obj.get("namespace"), - "chat_id": obj.get("chatId"), - "phone": obj.get("phone"), - "template": obj.get("template"), - "language": SendTemplateRequestAllOfLanguage.from_dict(obj.get("language")) if obj.get("language") is not None else None, - "params": [SendTemplateRequestAllOfParams.from_dict(_item) for _item in obj.get("params")] if obj.get("params") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_template_request_all_of_currency.py b/python/one_msg_waba_sdk/models/send_template_request_all_of_currency.py deleted file mode 100644 index 40cdc04..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request_all_of_currency.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictInt, StrictStr - -class SendTemplateRequestAllOfCurrency(BaseModel): - """ - SendTemplateRequestAllOfCurrency - """ - currency_code: Optional[StrictStr] = None - amount_1000: Optional[StrictInt] = None - __properties = ["currency_code", "amount_1000"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequestAllOfCurrency: - """Create an instance of SendTemplateRequestAllOfCurrency from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequestAllOfCurrency: - """Create an instance of SendTemplateRequestAllOfCurrency from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequestAllOfCurrency.parse_obj(obj) - - _obj = SendTemplateRequestAllOfCurrency.parse_obj({ - "currency_code": obj.get("currency_code"), - "amount_1000": obj.get("amount_1000") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time.py b/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time.py deleted file mode 100644 index 8395168..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_component import SendTemplateRequestAllOfDateTimeComponent -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch import SendTemplateRequestAllOfDateTimeUnixEpoch - - -class SendTemplateRequestAllOfDateTime(BaseModel): - """ - SendTemplateRequestAllOfDateTime - """ - component: Optional[SendTemplateRequestAllOfDateTimeComponent] = None - unix_epoch: Optional[SendTemplateRequestAllOfDateTimeUnixEpoch] = None - __properties = ["component", "unix_epoch"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequestAllOfDateTime: - """Create an instance of SendTemplateRequestAllOfDateTime from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of component - if self.component: - _dict['component'] = self.component.to_dict() - # override the default output from pydantic by calling `to_dict()` of unix_epoch - if self.unix_epoch: - _dict['unix_epoch'] = self.unix_epoch.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequestAllOfDateTime: - """Create an instance of SendTemplateRequestAllOfDateTime from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequestAllOfDateTime.parse_obj(obj) - - _obj = SendTemplateRequestAllOfDateTime.parse_obj({ - "component": SendTemplateRequestAllOfDateTimeComponent.from_dict(obj.get("component")) if obj.get("component") is not None else None, - "unix_epoch": SendTemplateRequestAllOfDateTimeUnixEpoch.from_dict(obj.get("unix_epoch")) if obj.get("unix_epoch") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_component.py b/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_component.py deleted file mode 100644 index 91f7884..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_component.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictInt, StrictStr, validator - -class SendTemplateRequestAllOfDateTimeComponent(BaseModel): - """ - SendTemplateRequestAllOfDateTimeComponent - """ - day_of_week: Optional[StrictStr] = None - year: Optional[StrictInt] = None - month: Optional[StrictInt] = None - day_of_month: Optional[StrictInt] = None - hour: Optional[StrictInt] = None - minute: Optional[StrictInt] = None - calendar: Optional[StrictStr] = None - __properties = ["day_of_week", "year", "month", "day_of_month", "hour", "minute", "calendar"] - - @validator('day_of_week') - def day_of_week_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY', '1', '2', '3', '4', '5', '6', '7'): - raise ValueError("must be one of enum values ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY', '1', '2', '3', '4', '5', '6', '7')") - return value - - @validator('calendar') - def calendar_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('GREGORIAN', 'SOLAR_HIJRI'): - raise ValueError("must be one of enum values ('GREGORIAN', 'SOLAR_HIJRI')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequestAllOfDateTimeComponent: - """Create an instance of SendTemplateRequestAllOfDateTimeComponent from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequestAllOfDateTimeComponent: - """Create an instance of SendTemplateRequestAllOfDateTimeComponent from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequestAllOfDateTimeComponent.parse_obj(obj) - - _obj = SendTemplateRequestAllOfDateTimeComponent.parse_obj({ - "day_of_week": obj.get("day_of_week"), - "year": obj.get("year"), - "month": obj.get("month"), - "day_of_month": obj.get("day_of_month"), - "hour": obj.get("hour"), - "minute": obj.get("minute"), - "calendar": obj.get("calendar") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_unix_epoch.py b/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_unix_epoch.py deleted file mode 100644 index a424f5b..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request_all_of_date_time_unix_epoch.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictInt - -class SendTemplateRequestAllOfDateTimeUnixEpoch(BaseModel): - """ - SendTemplateRequestAllOfDateTimeUnixEpoch - """ - timestamp: Optional[StrictInt] = None - __properties = ["timestamp"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequestAllOfDateTimeUnixEpoch: - """Create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequestAllOfDateTimeUnixEpoch: - """Create an instance of SendTemplateRequestAllOfDateTimeUnixEpoch from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequestAllOfDateTimeUnixEpoch.parse_obj(obj) - - _obj = SendTemplateRequestAllOfDateTimeUnixEpoch.parse_obj({ - "timestamp": obj.get("timestamp") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/send_template_request_all_of_language.py b/python/one_msg_waba_sdk/models/send_template_request_all_of_language.py deleted file mode 100644 index 5d48616..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request_all_of_language.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr, validator -from one_msg_waba_sdk.models.template_language_prop import TemplateLanguageProp - - -class SendTemplateRequestAllOfLanguage(BaseModel): - """ - Object, containing fields \"policy\" and \"code\". **policy** - now \"deterministic\" is only available option; **code** - one of supported language codes # noqa: E501 - """ - policy: Optional[StrictStr] = None - code: Optional[TemplateLanguageProp] = None - __properties = ["policy", "code"] - - @validator('policy') - def policy_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('deterministic'): - raise ValueError("must be one of enum values ('deterministic')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequestAllOfLanguage: - """Create an instance of SendTemplateRequestAllOfLanguage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequestAllOfLanguage: - """Create an instance of SendTemplateRequestAllOfLanguage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequestAllOfLanguage.parse_obj(obj) - - _obj = SendTemplateRequestAllOfLanguage.parse_obj({ - "policy": obj.get("policy"), - "code": obj.get("code") - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/send_template_request_all_of_params.py b/python/one_msg_waba_sdk/models/send_template_request_all_of_params.py deleted file mode 100644 index b147c85..0000000 --- a/python/one_msg_waba_sdk/models/send_template_request_all_of_params.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr -from one_msg_waba_sdk.models.send_template_request_all_of_currency import SendTemplateRequestAllOfCurrency -from one_msg_waba_sdk.models.send_template_request_all_of_date_time import SendTemplateRequestAllOfDateTime - - -class SendTemplateRequestAllOfParams(BaseModel): - """ - SendTemplateRequestAllOfParams - """ - default: Optional[StrictStr] = None - currency: Optional[SendTemplateRequestAllOfCurrency] = None - date_time: Optional[SendTemplateRequestAllOfDateTime] = None - __properties = ["default", "currency", "date_time"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SendTemplateRequestAllOfParams: - """Create an instance of SendTemplateRequestAllOfParams from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of currency - if self.currency: - _dict['currency'] = self.currency.to_dict() - # override the default output from pydantic by calling `to_dict()` of date_time - if self.date_time: - _dict['date_time'] = self.date_time.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SendTemplateRequestAllOfParams: - """Create an instance of SendTemplateRequestAllOfParams from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SendTemplateRequestAllOfParams.parse_obj(obj) - - _obj = SendTemplateRequestAllOfParams.parse_obj({ - "default": obj.get("default"), - "currency": SendTemplateRequestAllOfCurrency.from_dict(obj.get("currency")) if obj.get("currency") is not None else None, - "date_time": SendTemplateRequestAllOfDateTime.from_dict(obj.get("date_time")) if obj.get("date_time") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/set_commerce.py b/python/one_msg_waba_sdk/models/set_commerce.py deleted file mode 100644 index f084383..0000000 --- a/python/one_msg_waba_sdk/models/set_commerce.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictBool - -class SetCommerce(BaseModel): - """ - SetCommerce - """ - success: Optional[StrictBool] = None - __properties = ["success"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SetCommerce: - """Create an instance of SetCommerce from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SetCommerce: - """Create an instance of SetCommerce from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SetCommerce.parse_obj(obj) - - _obj = SetCommerce.parse_obj({ - "success": obj.get("success") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/set_me.py b/python/one_msg_waba_sdk/models/set_me.py deleted file mode 100644 index 110dfbd..0000000 --- a/python/one_msg_waba_sdk/models/set_me.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr - -class SetMe(BaseModel): - """ - SetMe - """ - result: Optional[StrictStr] = None - __properties = ["result"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SetMe: - """Create an instance of SetMe from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SetMe: - """Create an instance of SetMe from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SetMe.parse_obj(obj) - - _obj = SetMe.parse_obj({ - "result": obj.get("result") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/set_me_request.py b/python/one_msg_waba_sdk/models/set_me_request.py deleted file mode 100644 index 2f3af5c..0000000 --- a/python/one_msg_waba_sdk/models/set_me_request.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, validator - -class SetMeRequest(BaseModel): - """ - SetMeRequest - """ - about: Optional[StrictStr] = Field(None, description="Profile`s About section.") - address: Optional[StrictStr] = Field(None, description="Address of the business") - description: Optional[StrictStr] = Field(None, description="Description of the business. Max 256 characters") - email: Optional[StrictStr] = Field(None, description="Business email") - phone: Optional[StrictStr] = Field(None, description="Linked phone number") - vertical: Optional[StrictStr] = Field(None, description="Industry of the business") - photo: Optional[StrictStr] = Field(None, description="HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field") - __properties = ["about", "address", "description", "email", "phone", "vertical", "photo"] - - @validator('vertical') - def vertical_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('Automotive', 'Beauty, Spa and Salon', 'Clothing and Apparel', 'Education', 'Entertainment', 'Event Planning and Service', 'Finance and Banking', 'Food and Grocery', 'Public Service', 'Hotel and Lodging', 'Medical and Health', 'Non-profit', 'Professional Services', 'Shopping and Retail', 'Travel and Transportation', 'Restaurant', 'Other', ''): - raise ValueError("must be one of enum values ('Automotive', 'Beauty, Spa and Salon', 'Clothing and Apparel', 'Education', 'Entertainment', 'Event Planning and Service', 'Finance and Banking', 'Food and Grocery', 'Public Service', 'Hotel and Lodging', 'Medical and Health', 'Non-profit', 'Professional Services', 'Shopping and Retail', 'Travel and Transportation', 'Restaurant', 'Other', '')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SetMeRequest: - """Create an instance of SetMeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SetMeRequest: - """Create an instance of SetMeRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SetMeRequest.parse_obj(obj) - - _obj = SetMeRequest.parse_obj({ - "about": obj.get("about"), - "address": obj.get("address"), - "description": obj.get("description"), - "email": obj.get("email"), - "phone": obj.get("phone"), - "vertical": obj.get("vertical"), - "photo": obj.get("photo") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/set_settings200_response.py b/python/one_msg_waba_sdk/models/set_settings200_response.py deleted file mode 100644 index 8f2a691..0000000 --- a/python/one_msg_waba_sdk/models/set_settings200_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr -from one_msg_waba_sdk.models.set_settings200_response_all_of_update import SetSettings200ResponseAllOfUpdate - - -class SetSettings200Response(BaseModel): - """ - SetSettings200Response - """ - webhook_url: Optional[StrictStr] = Field(None, alias="webhookUrl") - update: SetSettings200ResponseAllOfUpdate = Field(...) - __properties = ["webhookUrl", "update"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SetSettings200Response: - """Create an instance of SetSettings200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of update - if self.update: - _dict['update'] = self.update.to_dict() - # set to None if webhook_url (nullable) is None - # and __fields_set__ contains the field - if self.webhook_url is None and "webhook_url" in self.__fields_set__: - _dict['webhookUrl'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SetSettings200Response: - """Create an instance of SetSettings200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SetSettings200Response.parse_obj(obj) - - _obj = SetSettings200Response.parse_obj({ - "webhook_url": obj.get("webhookUrl"), - "update": SetSettings200ResponseAllOfUpdate.from_dict(obj.get("update")) if obj.get("update") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/set_settings200_response_all_of_update.py b/python/one_msg_waba_sdk/models/set_settings200_response_all_of_update.py deleted file mode 100644 index fc0f8d9..0000000 --- a/python/one_msg_waba_sdk/models/set_settings200_response_all_of_update.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class SetSettings200ResponseAllOfUpdate(BaseModel): - """ - SetSettings200ResponseAllOfUpdate - """ - webhook_url: Optional[StrictStr] = Field(None, alias="webhookUrl") - __properties = ["webhookUrl"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SetSettings200ResponseAllOfUpdate: - """Create an instance of SetSettings200ResponseAllOfUpdate from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # set to None if webhook_url (nullable) is None - # and __fields_set__ contains the field - if self.webhook_url is None and "webhook_url" in self.__fields_set__: - _dict['webhookUrl'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SetSettings200ResponseAllOfUpdate: - """Create an instance of SetSettings200ResponseAllOfUpdate from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SetSettings200ResponseAllOfUpdate.parse_obj(obj) - - _obj = SetSettings200ResponseAllOfUpdate.parse_obj({ - "webhook_url": obj.get("webhookUrl") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/set_webhook_status.py b/python/one_msg_waba_sdk/models/set_webhook_status.py deleted file mode 100644 index d33e11c..0000000 --- a/python/one_msg_waba_sdk/models/set_webhook_status.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictBool, StrictStr - -class SetWebhookStatus(BaseModel): - """ - SetWebhookStatus - """ - set: Optional[StrictBool] = Field(None, description="Flag indicating that the current request has changed webhook") - message: Optional[StrictStr] = None - __properties = ["set", "message"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SetWebhookStatus: - """Create an instance of SetWebhookStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SetWebhookStatus: - """Create an instance of SetWebhookStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SetWebhookStatus.parse_obj(obj) - - _obj = SetWebhookStatus.parse_obj({ - "set": obj.get("set"), - "message": obj.get("message") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/settings.py b/python/one_msg_waba_sdk/models/settings.py deleted file mode 100644 index df0bf19..0000000 --- a/python/one_msg_waba_sdk/models/settings.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class Settings(BaseModel): - """ - Settings - """ - webhook_url: Optional[StrictStr] = Field(None, alias="webhookUrl") - __properties = ["webhookUrl"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Settings: - """Create an instance of Settings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # set to None if webhook_url (nullable) is None - # and __fields_set__ contains the field - if self.webhook_url is None and "webhook_url" in self.__fields_set__: - _dict['webhookUrl'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Settings: - """Create an instance of Settings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Settings.parse_obj(obj) - - _obj = Settings.parse_obj({ - "webhook_url": obj.get("webhookUrl") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/template_category_prop.py b/python/one_msg_waba_sdk/models/template_category_prop.py deleted file mode 100644 index a56fe9e..0000000 --- a/python/one_msg_waba_sdk/models/template_category_prop.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - - - - -class TemplateCategoryProp(str, Enum): - """ - Template category - """ - - """ - allowed enum values - """ - MARKETING = 'MARKETING' - TRANSACTIONAL = 'TRANSACTIONAL' - OTP = 'OTP' - - @classmethod - def from_json(cls, json_str: str) -> TemplateCategoryProp: - """Create an instance of TemplateCategoryProp from a JSON string""" - return TemplateCategoryProp(json.loads(json_str)) - - diff --git a/python/one_msg_waba_sdk/models/template_components_prop.py b/python/one_msg_waba_sdk/models/template_components_prop.py deleted file mode 100644 index 3eb328f..0000000 --- a/python/one_msg_waba_sdk/models/template_components_prop.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from one_msg_waba_sdk.models.template_components_prop_inner import TemplateComponentsPropInner - - -class TemplateComponentsProp(TemplateComponentsPropInner): - """ - Array of template components # noqa: E501 - """ - __properties = [] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TemplateComponentsProp: - """Create an instance of TemplateComponentsProp from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TemplateComponentsProp: - """Create an instance of TemplateComponentsProp from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TemplateComponentsProp.parse_obj(obj) - - _obj = TemplateComponentsProp.parse_obj({ - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/template_components_prop_inner.py b/python/one_msg_waba_sdk/models/template_components_prop_inner.py deleted file mode 100644 index dce6bfa..0000000 --- a/python/one_msg_waba_sdk/models/template_components_prop_inner.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, Dict, List, Optional -from pydantic import BaseModel, Field, StrictStr, conlist, validator -from one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner import TemplateComponentsPropInnerButtonsInner - - -class TemplateComponentsPropInner(BaseModel): - """ - TemplateComponentsPropInner - """ - type: Optional[StrictStr] = None - format: Optional[StrictStr] = Field(None, description="Only for HEADER type") - text: Optional[StrictStr] = None - example: Optional[Dict[str, Any]] = None - buttons: Optional[conlist(TemplateComponentsPropInnerButtonsInner)] = None - __properties = ["type", "format", "text", "example", "buttons"] - - @validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('BODY', 'HEADER', 'FOOTER', 'BUTTONS'): - raise ValueError("must be one of enum values ('BODY', 'HEADER', 'FOOTER', 'BUTTONS')") - return value - - @validator('format') - def format_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('TEXT', 'IMAGE', 'DOCUMENT', 'VIDEO'): - raise ValueError("must be one of enum values ('TEXT', 'IMAGE', 'DOCUMENT', 'VIDEO')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TemplateComponentsPropInner: - """Create an instance of TemplateComponentsPropInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in buttons (list) - _items = [] - if self.buttons: - for _item in self.buttons: - if _item: - _items.append(_item.to_dict()) - _dict['buttons'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TemplateComponentsPropInner: - """Create an instance of TemplateComponentsPropInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TemplateComponentsPropInner.parse_obj(obj) - - _obj = TemplateComponentsPropInner.parse_obj({ - "type": obj.get("type"), - "format": obj.get("format"), - "text": obj.get("text"), - "example": obj.get("example"), - "buttons": [TemplateComponentsPropInnerButtonsInner.from_dict(_item) for _item in obj.get("buttons")] if obj.get("buttons") is not None else None - }) - return _obj diff --git a/python/one_msg_waba_sdk/models/template_components_prop_inner_buttons_inner.py b/python/one_msg_waba_sdk/models/template_components_prop_inner_buttons_inner.py deleted file mode 100644 index 3728b19..0000000 --- a/python/one_msg_waba_sdk/models/template_components_prop_inner_buttons_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, List, Optional -from pydantic import BaseModel, StrictStr, conlist, validator - -class TemplateComponentsPropInnerButtonsInner(BaseModel): - """ - TemplateComponentsPropInnerButtonsInner - """ - type: Optional[StrictStr] = None - text: Optional[StrictStr] = None - url: Optional[StrictStr] = None - phone_number: Optional[StrictStr] = None - example: Optional[conlist(Any)] = None - __properties = ["type", "text", "url", "phone_number", "example"] - - @validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('PHONE_NUMBER', 'URL', 'QUICK_REPLY'): - raise ValueError("must be one of enum values ('PHONE_NUMBER', 'URL', 'QUICK_REPLY')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TemplateComponentsPropInnerButtonsInner: - """Create an instance of TemplateComponentsPropInnerButtonsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TemplateComponentsPropInnerButtonsInner: - """Create an instance of TemplateComponentsPropInnerButtonsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TemplateComponentsPropInnerButtonsInner.parse_obj(obj) - - _obj = TemplateComponentsPropInnerButtonsInner.parse_obj({ - "type": obj.get("type"), - "text": obj.get("text"), - "url": obj.get("url"), - "phone_number": obj.get("phone_number"), - "example": obj.get("example") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/template_language_prop.py b/python/one_msg_waba_sdk/models/template_language_prop.py deleted file mode 100644 index 6fe2848..0000000 --- a/python/one_msg_waba_sdk/models/template_language_prop.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - - - - -class TemplateLanguageProp(str, Enum): - """ - Template language - """ - - """ - allowed enum values - """ - AF = 'af' - SQ = 'sq' - AR = 'ar' - AZ = 'az' - BN = 'bn' - BG = 'bg' - CA = 'ca' - ZH_CN = 'zh_CN' - ZH_HK = 'zh_HK' - ZH_TW = 'zh_TW' - HR = 'hr' - CS = 'cs' - DA = 'da' - NL = 'nl' - EN = 'en' - EN_GB = 'en_GB' - EN_US = 'en_US' - ET = 'et' - FIL = 'fil' - FI = 'fi' - FR = 'fr' - DE = 'de' - EL = 'el' - GU = 'gu' - HE = 'he' - HI = 'hi' - HU = 'hu' - ID = 'id' - GA = 'ga' - IT = 'it' - JA = 'ja' - KN = 'kn' - KK = 'kk' - KO = 'ko' - LO = 'lo' - LV = 'lv' - LT = 'lt' - MK = 'mk' - MS = 'ms' - MR = 'mr' - NB = 'nb' - FA = 'fa' - PL = 'pl' - PT_BR = 'pt_BR' - PT_PT = 'pt_PT' - PA = 'pa' - RO = 'ro' - RU = 'ru' - SR = 'sr' - SK = 'sk' - SL = 'sl' - ES = 'es' - ES_AR = 'es_AR' - ES_ES = 'es_ES' - ES_MX = 'es_MX' - SW = 'sw' - SV = 'sv' - TA = 'ta' - TE = 'te' - TH = 'th' - TR = 'tr' - UK = 'uk' - UR = 'ur' - UZ = 'uz' - VI = 'vi' - - @classmethod - def from_json(cls, json_str: str) -> TemplateLanguageProp: - """Create an instance of TemplateLanguageProp from a JSON string""" - return TemplateLanguageProp(json.loads(json_str)) - - diff --git a/python/one_msg_waba_sdk/models/template_namespace_field.py b/python/one_msg_waba_sdk/models/template_namespace_field.py deleted file mode 100644 index d132a60..0000000 --- a/python/one_msg_waba_sdk/models/template_namespace_field.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr - -class TemplateNamespaceField(BaseModel): - """ - TemplateNamespaceField - """ - namespace: Optional[StrictStr] = None - __properties = ["namespace"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TemplateNamespaceField: - """Create an instance of TemplateNamespaceField from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TemplateNamespaceField: - """Create an instance of TemplateNamespaceField from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TemplateNamespaceField.parse_obj(obj) - - _obj = TemplateNamespaceField.parse_obj({ - "namespace": obj.get("namespace") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/upload_media.py b/python/one_msg_waba_sdk/models/upload_media.py deleted file mode 100644 index 2e96d7f..0000000 --- a/python/one_msg_waba_sdk/models/upload_media.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - - -from pydantic import BaseModel, Field, StrictStr - -class UploadMedia(BaseModel): - """ - UploadMedia - """ - body: StrictStr = Field(..., description="HTTP link *https://...* Or base64-encoded file with mime data, for example *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* File in form-data input field") - __properties = ["body"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UploadMedia: - """Create an instance of UploadMedia from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UploadMedia: - """Create an instance of UploadMedia from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UploadMedia.parse_obj(obj) - - _obj = UploadMedia.parse_obj({ - "body": obj.get("body") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/models/webhook_url.py b/python/one_msg_waba_sdk/models/webhook_url.py deleted file mode 100644 index 30aebed..0000000 --- a/python/one_msg_waba_sdk/models/webhook_url.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - - -from pydantic import BaseModel, Field, StrictStr - -class WebhookUrl(BaseModel): - """ - WebhookUrl - """ - webhook_url: StrictStr = Field(..., alias="webhookUrl", description="Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io).") - __properties = ["webhookUrl"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> WebhookUrl: - """Create an instance of WebhookUrl from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> WebhookUrl: - """Create an instance of WebhookUrl from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return WebhookUrl.parse_obj(obj) - - _obj = WebhookUrl.parse_obj({ - "webhook_url": obj.get("webhookUrl") - }) - return _obj - - diff --git a/python/one_msg_waba_sdk/py.typed b/python/one_msg_waba_sdk/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/python/one_msg_waba_sdk/rest.py b/python/one_msg_waba_sdk/rest.py deleted file mode 100644 index 96d9756..0000000 --- a/python/one_msg_waba_sdk/rest.py +++ /dev/null @@ -1,303 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import logging -import re -import ssl - -from urllib.parse import urlencode, quote_plus -import urllib3 - -from one_msg_waba_sdk.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration, pools_size=4, maxsize=None) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - # url already contains the URL query string - # so reset query_params to empty dict - query_params = {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields={}, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 400: - raise BadRequestException(http_resp=r) - - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def get_request(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def head_request(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def options_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def delete_request(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def post_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def put_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def patch_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) diff --git a/python/pyproject.toml b/python/pyproject.toml deleted file mode 100644 index 3e65b30..0000000 --- a/python/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "one_msg_waba_sdk" -version = "1.0.0" -description = "one_msg_waba_sdk" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" -keywords = ["OpenAPI", "OpenAPI-Generator", "one_msg_waba_sdk"] -include = ["one_msg_waba_sdk/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = "^1.10.5, <2" -aenum = ">=3.1.11" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/python/requirements.txt b/python/requirements.txt deleted file mode 100644 index 258c179..0000000 --- a/python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 1.10.5, < 2 -aenum >= 3.1.11 diff --git a/python/setup.cfg b/python/setup.cfg deleted file mode 100644 index 11433ee..0000000 --- a/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index f257449..0000000 --- a/python/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "one-msg-waba-sdk" -VERSION = "1.3.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 1.10.5, < 2", - "aenum" -] - -setup( - name=NAME, - version=VERSION, - description="one_msg_waba_sdk", - author="OpenAPI Generator community", - author_email="hello@1msg.io", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "one_msg_waba_sdk"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - """, # noqa: E501 - package_data={"one_msg_waba_sdk": ["py.typed"]}, -) diff --git a/python/test-requirements.txt b/python/test-requirements.txt deleted file mode 100644 index 3a0d0b9..0000000 --- a/python/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/python/test/__init__.py b/python/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/test/test_ack.py b/python/test/test_ack.py deleted file mode 100644 index de0eb25..0000000 --- a/python/test/test_ack.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.ack import Ack # noqa: E501 - - -class TestAck(unittest.TestCase): - """Ack unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Ack: - """Test Ack - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Ack` - """ - model = Ack() # noqa: E501 - if include_optional: - return Ack( - id = 'true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F', - chat_id = '12020721369@c.us', - status = 'viewed' - ) - else: - return Ack( - ) - """ - - def testAck(self): - """Test Ack""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_add_template_request.py b/python/test/test_add_template_request.py deleted file mode 100644 index 6f01f7b..0000000 --- a/python/test/test_add_template_request.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.add_template_request import AddTemplateRequest # noqa: E501 - - -class TestAddTemplateRequest(unittest.TestCase): - """AddTemplateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AddTemplateRequest: - """Test AddTemplateRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AddTemplateRequest` - """ - model = AddTemplateRequest() # noqa: E501 - if include_optional: - return AddTemplateRequest( - name = 'start', - category = 'MARKETING', - components = [ - one_msg_waba_sdk.models.template_components_prop_inner.TemplateComponentsProp_inner( - type = 'BODY', - format = 'TEXT', - text = 'header text {{1}}', - example = one_msg_waba_sdk.models.example.example(), - buttons = [ - one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner.TemplateComponentsProp_inner_buttons_inner( - type = 'QUICK_REPLY', - text = 'phone-button-text', - url = 'https://www.website.com/{{1}}', - phone_number = '+1(234) 235-5678', - example = [ - null - ], ) - ], ) - ], - language = 'en' - ) - else: - return AddTemplateRequest( - ) - """ - - def testAddTemplateRequest(self): - """Test AddTemplateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_channel_api.py b/python/test/test_channel_api.py deleted file mode 100644 index 699e26e..0000000 --- a/python/test/test_channel_api.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from one_msg_waba_sdk.api.channel_api import ChannelApi # noqa: E501 - - -class TestChannelApi(unittest.TestCase): - """ChannelApi unit test stubs""" - - def setUp(self) -> None: - self.api = ChannelApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_get_commerce(self) -> None: - """Test case for get_commerce - - Get Commerce Settings # noqa: E501 - """ - pass - - def test_get_extended_statistics(self) -> None: - """Test case for get_extended_statistics - - Get Extended Channel statistics # noqa: E501 - """ - pass - - def test_get_me(self) -> None: - """Test case for get_me - - Get Profile Info # noqa: E501 - """ - pass - - def test_get_settings(self) -> None: - """Test case for get_settings - - Get Settings # noqa: E501 - """ - pass - - def test_get_statistics(self) -> None: - """Test case for get_statistics - - Get Channel statistics # noqa: E501 - """ - pass - - def test_get_status(self) -> None: - """Test case for get_status - - Get Status # noqa: E501 - """ - pass - - def test_output_ip(self) -> None: - """Test case for output_ip - - Get channel server IP # noqa: E501 - """ - pass - - def test_set_me(self) -> None: - """Test case for set_me - - Change user info # noqa: E501 - """ - pass - - def test_set_settings(self) -> None: - """Test case for set_settings - - Set settings # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_channel_extended_statistics.py b/python/test/test_channel_extended_statistics.py deleted file mode 100644 index 98c6898..0000000 --- a/python/test/test_channel_extended_statistics.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.channel_extended_statistics import ChannelExtendedStatistics # noqa: E501 - - -class TestChannelExtendedStatistics(unittest.TestCase): - """ChannelExtendedStatistics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChannelExtendedStatistics: - """Test ChannelExtendedStatistics - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ChannelExtendedStatistics` - """ - model = ChannelExtendedStatistics() # noqa: E501 - if include_optional: - return ChannelExtendedStatistics( - ) - else: - return ChannelExtendedStatistics( - ) - """ - - def testChannelExtendedStatistics(self): - """Test ChannelExtendedStatistics""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_channel_extended_statistics_inner.py b/python/test/test_channel_extended_statistics_inner.py deleted file mode 100644 index 2be0af6..0000000 --- a/python/test/test_channel_extended_statistics_inner.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.channel_extended_statistics_inner import ChannelExtendedStatisticsInner # noqa: E501 - - -class TestChannelExtendedStatisticsInner(unittest.TestCase): - """ChannelExtendedStatisticsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChannelExtendedStatisticsInner: - """Test ChannelExtendedStatisticsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ChannelExtendedStatisticsInner` - """ - model = ChannelExtendedStatisticsInner() # noqa: E501 - if include_optional: - return ChannelExtendedStatisticsInner( - business_initiated_paid_quantity = 1, - business_initiated_price = 0.0691, - business_initiated_quantity = 2, - free_entry_point = 0, - free_quantity = 1, - free_tier = 1, - paid_quantity = 1, - period_date = '2022-11-01T00:00:00Z', - quantity = 2, - total_price = 0.0691, - user_initiated_paid_quantity = 1, - user_initiated_price = 0.0691, - user_initiated_quantity = 2 - ) - else: - return ChannelExtendedStatisticsInner( - ) - """ - - def testChannelExtendedStatisticsInner(self): - """Test ChannelExtendedStatisticsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_channel_statistics.py b/python/test/test_channel_statistics.py deleted file mode 100644 index b0634d4..0000000 --- a/python/test/test_channel_statistics.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.channel_statistics import ChannelStatistics # noqa: E501 - - -class TestChannelStatistics(unittest.TestCase): - """ChannelStatistics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChannelStatistics: - """Test ChannelStatistics - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ChannelStatistics` - """ - model = ChannelStatistics() # noqa: E501 - if include_optional: - return ChannelStatistics( - var_date = '03.2022', - templates_cost = 400.0313 - ) - else: - return ChannelStatistics( - ) - """ - - def testChannelStatistics(self): - """Test ChannelStatistics""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_channel_status.py b/python/test/test_channel_status.py deleted file mode 100644 index 1954caf..0000000 --- a/python/test/test_channel_status.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.channel_status import ChannelStatus # noqa: E501 - - -class TestChannelStatus(unittest.TestCase): - """ChannelStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChannelStatus: - """Test ChannelStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ChannelStatus` - """ - model = ChannelStatus() # noqa: E501 - if include_optional: - return ChannelStatus( - status = 'connected' - ) - else: - return ChannelStatus( - ) - """ - - def testChannelStatus(self): - """Test ChannelStatus""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_chat_id_prop.py b/python/test/test_chat_id_prop.py deleted file mode 100644 index 687b73d..0000000 --- a/python/test/test_chat_id_prop.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.chat_id_prop import ChatIdProp # noqa: E501 - - -class TestChatIdProp(unittest.TestCase): - """ChatIdProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChatIdProp: - """Test ChatIdProp - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ChatIdProp` - """ - model = ChatIdProp() # noqa: E501 - if include_optional: - return ChatIdProp( - chat_id = '12020721369@c.us' - ) - else: - return ChatIdProp( - ) - """ - - def testChatIdProp(self): - """Test ChatIdProp""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_commerce.py b/python/test/test_commerce.py deleted file mode 100644 index 65a0588..0000000 --- a/python/test/test_commerce.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.commerce import Commerce # noqa: E501 - - -class TestCommerce(unittest.TestCase): - """Commerce unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Commerce: - """Test Commerce - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Commerce` - """ - model = Commerce() # noqa: E501 - if include_optional: - return Commerce( - params = one_msg_waba_sdk.models.commerce_params.Commerce_params( - is_cart_enabled = True, - is_catalog_visible = True, ) - ) - else: - return Commerce( - ) - """ - - def testCommerce(self): - """Test Commerce""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_commerce_params.py b/python/test/test_commerce_params.py deleted file mode 100644 index 421b4da..0000000 --- a/python/test/test_commerce_params.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.commerce_params import CommerceParams # noqa: E501 - - -class TestCommerceParams(unittest.TestCase): - """CommerceParams unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CommerceParams: - """Test CommerceParams - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CommerceParams` - """ - model = CommerceParams() # noqa: E501 - if include_optional: - return CommerceParams( - is_cart_enabled = True, - is_catalog_visible = True - ) - else: - return CommerceParams( - is_cart_enabled = True, - is_catalog_visible = True, - ) - """ - - def testCommerceParams(self): - """Test CommerceParams""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_contacts.py b/python/test/test_contacts.py deleted file mode 100644 index 3fc0e85..0000000 --- a/python/test/test_contacts.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.contacts import Contacts # noqa: E501 - - -class TestContacts(unittest.TestCase): - """Contacts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Contacts: - """Test Contacts - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Contacts` - """ - model = Contacts() # noqa: E501 - if include_optional: - return Contacts( - contacts = [ - one_msg_waba_sdk.models.contacts_contacts_inner.Contacts_contacts_inner( - input = '16315551000', - status = 'valid', - wa_id = '16315551000', ) - ] - ) - else: - return Contacts( - ) - """ - - def testContacts(self): - """Test Contacts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_contacts_contacts_inner.py b/python/test/test_contacts_contacts_inner.py deleted file mode 100644 index 80dcdc1..0000000 --- a/python/test/test_contacts_contacts_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.contacts_contacts_inner import ContactsContactsInner # noqa: E501 - - -class TestContactsContactsInner(unittest.TestCase): - """ContactsContactsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ContactsContactsInner: - """Test ContactsContactsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ContactsContactsInner` - """ - model = ContactsContactsInner() # noqa: E501 - if include_optional: - return ContactsContactsInner( - input = '16315551000', - status = 'valid', - wa_id = '16315551000' - ) - else: - return ContactsContactsInner( - ) - """ - - def testContactsContactsInner(self): - """Test ContactsContactsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_contacts_request.py b/python/test/test_contacts_request.py deleted file mode 100644 index 2292858..0000000 --- a/python/test/test_contacts_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.contacts_request import ContactsRequest # noqa: E501 - - -class TestContactsRequest(unittest.TestCase): - """ContactsRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ContactsRequest: - """Test ContactsRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ContactsRequest` - """ - model = ContactsRequest() # noqa: E501 - if include_optional: - return ContactsRequest( - blocking = 'wait', - force_check = True, - contacts = ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - ) - else: - return ContactsRequest( - contacts = ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"], - ) - """ - - def testContactsRequest(self): - """Test ContactsRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_ack_info.py b/python/test/test_get_ack_info.py deleted file mode 100644 index 6e7d167..0000000 --- a/python/test/test_get_ack_info.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_ack_info import GetAckInfo # noqa: E501 - - -class TestGetAckInfo(unittest.TestCase): - """GetAckInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAckInfo: - """Test GetAckInfo - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAckInfo` - """ - model = GetAckInfo() # noqa: E501 - if include_optional: - return GetAckInfo( - hooks = [ - one_msg_waba_sdk.models.get_ack_info_hooks_inner.GetAckInfo_hooks_inner( - id = 'gBGGeSaGViBfAgnlzOSHEwK9O6F', - type = 'message', - status = 'sent', - pricing = {"billable":true,"category":"business_initiated","pricing_model":"CBP"}, - timestamp = '1654864094', - conversation = {"id":"c1f5a3a1b9ff6f2e1c43fd31543137e0","origin":{"type":"business_initiated"},"expiration_timestamp":1654943940}, - recipient_id = '556123122026', ) - ] - ) - else: - return GetAckInfo( - ) - """ - - def testGetAckInfo(self): - """Test GetAckInfo""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_ack_info_hooks_inner.py b/python/test/test_get_ack_info_hooks_inner.py deleted file mode 100644 index c76a18b..0000000 --- a/python/test/test_get_ack_info_hooks_inner.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_ack_info_hooks_inner import GetAckInfoHooksInner # noqa: E501 - - -class TestGetAckInfoHooksInner(unittest.TestCase): - """GetAckInfoHooksInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAckInfoHooksInner: - """Test GetAckInfoHooksInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAckInfoHooksInner` - """ - model = GetAckInfoHooksInner() # noqa: E501 - if include_optional: - return GetAckInfoHooksInner( - id = 'gBGGeSaGViBfAgnlzOSHEwK9O6F', - type = 'message', - status = 'sent', - pricing = {"billable":true,"category":"business_initiated","pricing_model":"CBP"}, - timestamp = '1654864094', - conversation = {"id":"c1f5a3a1b9ff6f2e1c43fd31543137e0","origin":{"type":"business_initiated"},"expiration_timestamp":1654943940}, - recipient_id = '556123122026' - ) - else: - return GetAckInfoHooksInner( - ) - """ - - def testGetAckInfoHooksInner(self): - """Test GetAckInfoHooksInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_commerce.py b/python/test/test_get_commerce.py deleted file mode 100644 index b9e2b6f..0000000 --- a/python/test/test_get_commerce.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_commerce import GetCommerce # noqa: E501 - - -class TestGetCommerce(unittest.TestCase): - """GetCommerce unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetCommerce: - """Test GetCommerce - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetCommerce` - """ - model = GetCommerce() # noqa: E501 - if include_optional: - return GetCommerce( - ) - else: - return GetCommerce( - ) - """ - - def testGetCommerce(self): - """Test GetCommerce""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_commerce_inner.py b/python/test/test_get_commerce_inner.py deleted file mode 100644 index 8b51124..0000000 --- a/python/test/test_get_commerce_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_commerce_inner import GetCommerceInner # noqa: E501 - - -class TestGetCommerceInner(unittest.TestCase): - """GetCommerceInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetCommerceInner: - """Test GetCommerceInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetCommerceInner` - """ - model = GetCommerceInner() # noqa: E501 - if include_optional: - return GetCommerceInner( - id = '789887292550821', - is_cart_enabled = True, - is_catalog_visible = True - ) - else: - return GetCommerceInner( - ) - """ - - def testGetCommerceInner(self): - """Test GetCommerceInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_ip.py b/python/test/test_get_ip.py deleted file mode 100644 index 496ba0e..0000000 --- a/python/test/test_get_ip.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_ip import GetIP # noqa: E501 - - -class TestGetIP(unittest.TestCase): - """GetIP unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetIP: - """Test GetIP - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetIP` - """ - model = GetIP() # noqa: E501 - if include_optional: - return GetIP( - result = '213.74.84.72' - ) - else: - return GetIP( - ) - """ - - def testGetIP(self): - """Test GetIP""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_me.py b/python/test/test_get_me.py deleted file mode 100644 index ebc2d6e..0000000 --- a/python/test/test_get_me.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_me import GetMe # noqa: E501 - - -class TestGetMe(unittest.TestCase): - """GetMe unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetMe: - """Test GetMe - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetMe` - """ - model = GetMe() # noqa: E501 - if include_optional: - return GetMe( - about = 'Some about info', - address = 'Neverland, Unexpected st.', - description = 'Some company description', - email = 'john@neverland.play', - phone = '12020721369', - vertical = 'Other', - photo = 'https://pps.whatsapp.net/sample.jpg' - ) - else: - return GetMe( - ) - """ - - def testGetMe(self): - """Test GetMe""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_me401_response.py b/python/test/test_get_me401_response.py deleted file mode 100644 index 7ddb2bb..0000000 --- a/python/test/test_get_me401_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_me401_response import GetMe401Response # noqa: E501 - - -class TestGetMe401Response(unittest.TestCase): - """GetMe401Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetMe401Response: - """Test GetMe401Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetMe401Response` - """ - model = GetMe401Response() # noqa: E501 - if include_optional: - return GetMe401Response( - error = 'Wrong token "xxx7i1crxjxpkxxx" for channel "123". Please provide token as a GET parameter.' - ) - else: - return GetMe401Response( - ) - """ - - def testGetMe401Response(self): - """Test GetMe401Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_messages.py b/python/test/test_get_messages.py deleted file mode 100644 index 1f6740e..0000000 --- a/python/test/test_get_messages.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_messages import GetMessages # noqa: E501 - - -class TestGetMessages(unittest.TestCase): - """GetMessages unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetMessages: - """Test GetMessages - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetMessages` - """ - model = GetMessages() # noqa: E501 - if include_optional: - return GetMessages( - messages = [ - one_msg_waba_sdk.models.get_messages_messages_inner.GetMessages_messages_inner( - message_number = 1, - id = '0XzkmGNn4prUAQlzsHApGNRXQ0U', - body = 'Test message', - from_me = True, - self = 1, - is_forwarded = 0, - author = '556123122026@c.us', - time = 1665396610, - chat_id = '556123122026@c.us', - type = 'chat', - sender_name = '780005553535@c.us', - caption = '', - quoted_msg_id = '', - metadata = {}, - chat_name = '556123122026', ) - ] - ) - else: - return GetMessages( - ) - """ - - def testGetMessages(self): - """Test GetMessages""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_messages_messages_inner.py b/python/test/test_get_messages_messages_inner.py deleted file mode 100644 index 408c554..0000000 --- a/python/test/test_get_messages_messages_inner.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_messages_messages_inner import GetMessagesMessagesInner # noqa: E501 - - -class TestGetMessagesMessagesInner(unittest.TestCase): - """GetMessagesMessagesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetMessagesMessagesInner: - """Test GetMessagesMessagesInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetMessagesMessagesInner` - """ - model = GetMessagesMessagesInner() # noqa: E501 - if include_optional: - return GetMessagesMessagesInner( - message_number = 1, - id = '0XzkmGNn4prUAQlzsHApGNRXQ0U', - body = 'Test message', - from_me = True, - var_self = 1, - is_forwarded = 0, - author = '556123122026@c.us', - time = 1665396610, - chat_id = '556123122026@c.us', - type = 'chat', - sender_name = '780005553535@c.us', - caption = '', - quoted_msg_id = '', - metadata = {}, - chat_name = '556123122026' - ) - else: - return GetMessagesMessagesInner( - ) - """ - - def testGetMessagesMessagesInner(self): - """Test GetMessagesMessagesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_templates.py b/python/test/test_get_templates.py deleted file mode 100644 index d188efa..0000000 --- a/python/test/test_get_templates.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_templates import GetTemplates # noqa: E501 - - -class TestGetTemplates(unittest.TestCase): - """GetTemplates unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTemplates: - """Test GetTemplates - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTemplates` - """ - model = GetTemplates() # noqa: E501 - if include_optional: - return GetTemplates( - total = 3, - templates = [ - one_msg_waba_sdk.models.get_templates_templates_inner.GetTemplates_templates_inner( - category = 'MARKETING', - components = [ - one_msg_waba_sdk.models.template_components_prop_inner.TemplateComponentsProp_inner( - type = 'BODY', - format = 'TEXT', - text = 'header text {{1}}', - example = one_msg_waba_sdk.models.example.example(), - buttons = [ - one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner.TemplateComponentsProp_inner_buttons_inner( - type = 'QUICK_REPLY', - text = 'phone-button-text', - url = 'https://www.website.com/{{1}}', - phone_number = '+1(234) 235-5678', - example = [ - null - ], ) - ], ) - ], - language = 'en', - name = 'start', - namespace = 'ca300906_cfbc_410b_99fb_dcee8e13d578', - rejected_reason = 'NONE', - status = 'approved', ) - ] - ) - else: - return GetTemplates( - ) - """ - - def testGetTemplates(self): - """Test GetTemplates""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_templates_templates_inner.py b/python/test/test_get_templates_templates_inner.py deleted file mode 100644 index dbc3a8e..0000000 --- a/python/test/test_get_templates_templates_inner.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.get_templates_templates_inner import GetTemplatesTemplatesInner # noqa: E501 - - -class TestGetTemplatesTemplatesInner(unittest.TestCase): - """GetTemplatesTemplatesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTemplatesTemplatesInner: - """Test GetTemplatesTemplatesInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTemplatesTemplatesInner` - """ - model = GetTemplatesTemplatesInner() # noqa: E501 - if include_optional: - return GetTemplatesTemplatesInner( - category = 'MARKETING', - components = [ - one_msg_waba_sdk.models.template_components_prop_inner.TemplateComponentsProp_inner( - type = 'BODY', - format = 'TEXT', - text = 'header text {{1}}', - example = one_msg_waba_sdk.models.example.example(), - buttons = [ - one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner.TemplateComponentsProp_inner_buttons_inner( - type = 'QUICK_REPLY', - text = 'phone-button-text', - url = 'https://www.website.com/{{1}}', - phone_number = '+1(234) 235-5678', - example = [ - null - ], ) - ], ) - ], - language = 'en', - name = 'start', - namespace = 'ca300906_cfbc_410b_99fb_dcee8e13d578', - rejected_reason = 'NONE', - status = 'approved' - ) - else: - return GetTemplatesTemplatesInner( - ) - """ - - def testGetTemplatesTemplatesInner(self): - """Test GetTemplatesTemplatesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_me_components.py b/python/test/test_me_components.py deleted file mode 100644 index 36e7b40..0000000 --- a/python/test/test_me_components.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.me_components import MeComponents # noqa: E501 - - -class TestMeComponents(unittest.TestCase): - """MeComponents unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MeComponents: - """Test MeComponents - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MeComponents` - """ - model = MeComponents() # noqa: E501 - if include_optional: - return MeComponents( - about = 'Some about info', - address = 'Neverland, Unexpected st.', - description = 'Some company description', - email = 'john@neverland.play', - phone = '12020721369', - vertical = 'Other', - photo = '' - ) - else: - return MeComponents( - ) - """ - - def testMeComponents(self): - """Test MeComponents""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_media_api.py b/python/test/test_media_api.py deleted file mode 100644 index 3fbc04e..0000000 --- a/python/test/test_media_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from one_msg_waba_sdk.api.media_api import MediaApi # noqa: E501 - - -class TestMediaApi(unittest.TestCase): - """MediaApi unit test stubs""" - - def setUp(self) -> None: - self.api = MediaApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_upload_media(self) -> None: - """Test case for upload_media - - Upload media & get mediaId # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_media_id.py b/python/test/test_media_id.py deleted file mode 100644 index a97ca5f..0000000 --- a/python/test/test_media_id.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.media_id import MediaId # noqa: E501 - - -class TestMediaId(unittest.TestCase): - """MediaId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MediaId: - """Test MediaId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MediaId` - """ - model = MediaId() # noqa: E501 - if include_optional: - return MediaId( - media_id = 'ed2c7be7-b779-4ba8-a17c-6722f37be2a7' - ) - else: - return MediaId( - ) - """ - - def testMediaId(self): - """Test MediaId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_message.py b/python/test/test_message.py deleted file mode 100644 index 2b6fb53..0000000 --- a/python/test/test_message.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.message import Message # noqa: E501 - - -class TestMessage(unittest.TestCase): - """Message unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Message: - """Test Message - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Message` - """ - model = Message() # noqa: E501 - if include_optional: - return Message( - id = 'ABGHYoIXMAmY13IKOick9az6QYmt4R', - body = 'Ok!', - from_me = True, - var_self = 0, - is_forwarded = False, - author = '12020721369@c.us', - time = 1665396610, - chat_id = '12020721369@c.us', - type = 'chat', - sender_name = 'John', - caption = 'photo.jpg', - quoted_msg_id = 'ABGHYoIXMAmYTwIKOick9az6QYmt4R' - ) - else: - return Message( - ) - """ - - def testMessage(self): - """Test Message""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_message_id_prop.py b/python/test/test_message_id_prop.py deleted file mode 100644 index 39cac13..0000000 --- a/python/test/test_message_id_prop.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.message_id_prop import MessageIdProp # noqa: E501 - - -class TestMessageIdProp(unittest.TestCase): - """MessageIdProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MessageIdProp: - """Test MessageIdProp - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MessageIdProp` - """ - model = MessageIdProp() # noqa: E501 - if include_optional: - return MessageIdProp( - message_id = '0XzkmGNn4prUAQlzsHApGNRXQ0U' - ) - else: - return MessageIdProp( - ) - """ - - def testMessageIdProp(self): - """Test MessageIdProp""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_messaging_api.py b/python/test/test_messaging_api.py deleted file mode 100644 index 963efc0..0000000 --- a/python/test/test_messaging_api.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from one_msg_waba_sdk.api.messaging_api import MessagingApi # noqa: E501 - - -class TestMessagingApi(unittest.TestCase): - """MessagingApi unit test stubs""" - - def setUp(self) -> None: - self.api = MessagingApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_messages_list(self) -> None: - """Test case for messages_list - - Get messages list # noqa: E501 - """ - pass - - def test_read_message(self) -> None: - """Test case for read_message - - Mark message as read # noqa: E501 - """ - pass - - def test_send_contact(self) -> None: - """Test case for send_contact - - Send a Contact # noqa: E501 - """ - pass - - def test_send_file(self) -> None: - """Test case for send_file - - Send a File # noqa: E501 - """ - pass - - def test_send_list(self) -> None: - """Test case for send_list - - Send List Message # noqa: E501 - """ - pass - - def test_send_location(self) -> None: - """Test case for send_location - - Send a Location # noqa: E501 - """ - pass - - def test_send_message(self) -> None: - """Test case for send_message - - Send a Message # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_phone_prop.py b/python/test/test_phone_prop.py deleted file mode 100644 index 582c0f6..0000000 --- a/python/test/test_phone_prop.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.phone_prop import PhoneProp # noqa: E501 - - -class TestPhoneProp(unittest.TestCase): - """PhoneProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PhoneProp: - """Test PhoneProp - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PhoneProp` - """ - model = PhoneProp() # noqa: E501 - if include_optional: - return PhoneProp( - phone = 12020721369 - ) - else: - return PhoneProp( - ) - """ - - def testPhoneProp(self): - """Test PhoneProp""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_products_catalogs_api.py b/python/test/test_products_catalogs_api.py deleted file mode 100644 index 09f8b9d..0000000 --- a/python/test/test_products_catalogs_api.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from one_msg_waba_sdk.api.products_catalogs_api import ProductsCatalogsApi # noqa: E501 - - -class TestProductsCatalogsApi(unittest.TestCase): - """ProductsCatalogsApi unit test stubs""" - - def setUp(self) -> None: - self.api = ProductsCatalogsApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_send_product(self) -> None: - """Test case for send_product - - Send a Product # noqa: E501 - """ - pass - - def test_set_commerce(self) -> None: - """Test case for set_commerce - - Set Commerce Settings # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_read_message_request.py b/python/test/test_read_message_request.py deleted file mode 100644 index 2f9bff4..0000000 --- a/python/test/test_read_message_request.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.read_message_request import ReadMessageRequest # noqa: E501 - - -class TestReadMessageRequest(unittest.TestCase): - """ReadMessageRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ReadMessageRequest: - """Test ReadMessageRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ReadMessageRequest` - """ - model = ReadMessageRequest() # noqa: E501 - if include_optional: - return ReadMessageRequest( - message_id = '0XzkmGNn4prUAQlzsHApGNRXQ0U' - ) - else: - return ReadMessageRequest( - ) - """ - - def testReadMessageRequest(self): - """Test ReadMessageRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_remove_template_request.py b/python/test/test_remove_template_request.py deleted file mode 100644 index 7896df8..0000000 --- a/python/test/test_remove_template_request.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.remove_template_request import RemoveTemplateRequest # noqa: E501 - - -class TestRemoveTemplateRequest(unittest.TestCase): - """RemoveTemplateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RemoveTemplateRequest: - """Test RemoveTemplateRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RemoveTemplateRequest` - """ - model = RemoveTemplateRequest() # noqa: E501 - if include_optional: - return RemoveTemplateRequest( - name = 'start' - ) - else: - return RemoveTemplateRequest( - ) - """ - - def testRemoveTemplateRequest(self): - """Test RemoveTemplateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_contact_request.py b/python/test/test_send_contact_request.py deleted file mode 100644 index f1a8230..0000000 --- a/python/test/test_send_contact_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_contact_request import SendContactRequest # noqa: E501 - - -class TestSendContactRequest(unittest.TestCase): - """SendContactRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendContactRequest: - """Test SendContactRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendContactRequest` - """ - model = SendContactRequest() # noqa: E501 - if include_optional: - return SendContactRequest( - chat_id = '12020721369@c.us', - phone = 12020721369, - contacts = [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - ) - else: - return SendContactRequest( - ) - """ - - def testSendContactRequest(self): - """Test SendContactRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_file_request.py b/python/test/test_send_file_request.py deleted file mode 100644 index 5a630e9..0000000 --- a/python/test/test_send_file_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_file_request import SendFileRequest # noqa: E501 - - -class TestSendFileRequest(unittest.TestCase): - """SendFileRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendFileRequest: - """Test SendFileRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendFileRequest` - """ - model = SendFileRequest() # noqa: E501 - if include_optional: - return SendFileRequest( - chat_id = '12020721369@c.us', - phone = 12020721369, - body = '', - filename = '', - caption = '' - ) - else: - return SendFileRequest( - body = '', - filename = '', - ) - """ - - def testSendFileRequest(self): - """Test SendFileRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_list_request.py b/python/test/test_send_list_request.py deleted file mode 100644 index 8de7164..0000000 --- a/python/test/test_send_list_request.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_list_request import SendListRequest # noqa: E501 - - -class TestSendListRequest(unittest.TestCase): - """SendListRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendListRequest: - """Test SendListRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendListRequest` - """ - model = SendListRequest() # noqa: E501 - if include_optional: - return SendListRequest( - chat_id = '12020721369@c.us', - phone = 12020721369, - body = 'Please choose option', - header = 'Some options', - footer = 'Thank you', - action = 'List', - sections = [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - ) - else: - return SendListRequest( - body = 'Please choose option', - action = 'List', - sections = [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}], - ) - """ - - def testSendListRequest(self): - """Test SendListRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_list_request_all_of_rows.py b/python/test/test_send_list_request_all_of_rows.py deleted file mode 100644 index bbb8d0b..0000000 --- a/python/test/test_send_list_request_all_of_rows.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_list_request_all_of_rows import SendListRequestAllOfRows # noqa: E501 - - -class TestSendListRequestAllOfRows(unittest.TestCase): - """SendListRequestAllOfRows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendListRequestAllOfRows: - """Test SendListRequestAllOfRows - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendListRequestAllOfRows` - """ - model = SendListRequestAllOfRows() # noqa: E501 - if include_optional: - return SendListRequestAllOfRows( - id = '1', - title = 'Some option', - description = 'Some description' - ) - else: - return SendListRequestAllOfRows( - id = '1', - title = 'Some option', - ) - """ - - def testSendListRequestAllOfRows(self): - """Test SendListRequestAllOfRows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_list_request_all_of_sections.py b/python/test/test_send_list_request_all_of_sections.py deleted file mode 100644 index bad5077..0000000 --- a/python/test/test_send_list_request_all_of_sections.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_list_request_all_of_sections import SendListRequestAllOfSections # noqa: E501 - - -class TestSendListRequestAllOfSections(unittest.TestCase): - """SendListRequestAllOfSections unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendListRequestAllOfSections: - """Test SendListRequestAllOfSections - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendListRequestAllOfSections` - """ - model = SendListRequestAllOfSections() # noqa: E501 - if include_optional: - return SendListRequestAllOfSections( - title = 'Some title', - rows = [ - one_msg_waba_sdk.models.send_list_request_all_of_rows.SendListRequest_allOf_rows( - id = '1', - title = 'Some option', - description = 'Some description', ) - ] - ) - else: - return SendListRequestAllOfSections( - rows = [ - one_msg_waba_sdk.models.send_list_request_all_of_rows.SendListRequest_allOf_rows( - id = '1', - title = 'Some option', - description = 'Some description', ) - ], - ) - """ - - def testSendListRequestAllOfSections(self): - """Test SendListRequestAllOfSections""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_location_request.py b/python/test/test_send_location_request.py deleted file mode 100644 index 00afbcd..0000000 --- a/python/test/test_send_location_request.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_location_request import SendLocationRequest # noqa: E501 - - -class TestSendLocationRequest(unittest.TestCase): - """SendLocationRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendLocationRequest: - """Test SendLocationRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendLocationRequest` - """ - model = SendLocationRequest() # noqa: E501 - if include_optional: - return SendLocationRequest( - chat_id = '12020721369@c.us', - phone = 12020721369, - lat = '45.018337', - lng = '-73.968285', - address = '9766 Valley View St., New York, NY 10024', - name = 'Facebook HQ' - ) - else: - return SendLocationRequest( - lat = '45.018337', - lng = '-73.968285', - ) - """ - - def testSendLocationRequest(self): - """Test SendLocationRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_message_request.py b/python/test/test_send_message_request.py deleted file mode 100644 index 7841344..0000000 --- a/python/test/test_send_message_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_message_request import SendMessageRequest # noqa: E501 - - -class TestSendMessageRequest(unittest.TestCase): - """SendMessageRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendMessageRequest: - """Test SendMessageRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendMessageRequest` - """ - model = SendMessageRequest() # noqa: E501 - if include_optional: - return SendMessageRequest( - chat_id = '12020721369@c.us', - phone = 12020721369, - body = '' - ) - else: - return SendMessageRequest( - body = '', - ) - """ - - def testSendMessageRequest(self): - """Test SendMessageRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_message_status.py b/python/test/test_send_message_status.py deleted file mode 100644 index ffeb138..0000000 --- a/python/test/test_send_message_status.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_message_status import SendMessageStatus # noqa: E501 - - -class TestSendMessageStatus(unittest.TestCase): - """SendMessageStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendMessageStatus: - """Test SendMessageStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendMessageStatus` - """ - model = SendMessageStatus() # noqa: E501 - if include_optional: - return SendMessageStatus( - sent = True, - id = 'gBGGeRhGZTEfAgkJCh2wAz4ZH-8', - message = 'Sent to 556123122026@c.us', - description = 'Message has been sent to the provider' - ) - else: - return SendMessageStatus( - ) - """ - - def testSendMessageStatus(self): - """Test SendMessageStatus""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_product_request.py b/python/test/test_send_product_request.py deleted file mode 100644 index 9f67a12..0000000 --- a/python/test/test_send_product_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_product_request import SendProductRequest # noqa: E501 - - -class TestSendProductRequest(unittest.TestCase): - """SendProductRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendProductRequest: - """Test SendProductRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendProductRequest` - """ - model = SendProductRequest() # noqa: E501 - if include_optional: - return SendProductRequest( - chat_id = '12020721369@c.us', - phone = 12020721369, - action = {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]}, - body = 'Some text', - footer = 'Footer', - header = 'Header' - ) - else: - return SendProductRequest( - action = {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]}, - ) - """ - - def testSendProductRequest(self): - """Test SendProductRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_product_request_all_of_action.py b/python/test/test_send_product_request_all_of_action.py deleted file mode 100644 index 0356bea..0000000 --- a/python/test/test_send_product_request_all_of_action.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_product_request_all_of_action import SendProductRequestAllOfAction # noqa: E501 - - -class TestSendProductRequestAllOfAction(unittest.TestCase): - """SendProductRequestAllOfAction unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendProductRequestAllOfAction: - """Test SendProductRequestAllOfAction - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendProductRequestAllOfAction` - """ - model = SendProductRequestAllOfAction() # noqa: E501 - if include_optional: - return SendProductRequestAllOfAction( - catalog_id = '407921857496983', - product_retailer_id = 'product-1', - sections = [ - one_msg_waba_sdk.models.send_product_request_all_of_action_sections.SendProductRequest_allOf_action_sections( - title = 'the-section-title', - product_items = [ - one_msg_waba_sdk.models.send_product_request_all_of_action_product_items.SendProductRequest_allOf_action_product_items( - product_retailer_id = 'product-1', ) - ], ) - ] - ) - else: - return SendProductRequestAllOfAction( - ) - """ - - def testSendProductRequestAllOfAction(self): - """Test SendProductRequestAllOfAction""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_product_request_all_of_action_product_items.py b/python/test/test_send_product_request_all_of_action_product_items.py deleted file mode 100644 index 81cfd3e..0000000 --- a/python/test/test_send_product_request_all_of_action_product_items.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_product_request_all_of_action_product_items import SendProductRequestAllOfActionProductItems # noqa: E501 - - -class TestSendProductRequestAllOfActionProductItems(unittest.TestCase): - """SendProductRequestAllOfActionProductItems unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendProductRequestAllOfActionProductItems: - """Test SendProductRequestAllOfActionProductItems - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendProductRequestAllOfActionProductItems` - """ - model = SendProductRequestAllOfActionProductItems() # noqa: E501 - if include_optional: - return SendProductRequestAllOfActionProductItems( - product_retailer_id = 'product-1' - ) - else: - return SendProductRequestAllOfActionProductItems( - ) - """ - - def testSendProductRequestAllOfActionProductItems(self): - """Test SendProductRequestAllOfActionProductItems""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_product_request_all_of_action_sections.py b/python/test/test_send_product_request_all_of_action_sections.py deleted file mode 100644 index f83341c..0000000 --- a/python/test/test_send_product_request_all_of_action_sections.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_product_request_all_of_action_sections import SendProductRequestAllOfActionSections # noqa: E501 - - -class TestSendProductRequestAllOfActionSections(unittest.TestCase): - """SendProductRequestAllOfActionSections unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendProductRequestAllOfActionSections: - """Test SendProductRequestAllOfActionSections - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendProductRequestAllOfActionSections` - """ - model = SendProductRequestAllOfActionSections() # noqa: E501 - if include_optional: - return SendProductRequestAllOfActionSections( - title = 'the-section-title', - product_items = [ - one_msg_waba_sdk.models.send_product_request_all_of_action_product_items.SendProductRequest_allOf_action_product_items( - product_retailer_id = 'product-1', ) - ] - ) - else: - return SendProductRequestAllOfActionSections( - ) - """ - - def testSendProductRequestAllOfActionSections(self): - """Test SendProductRequestAllOfActionSections""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request.py b/python/test/test_send_template_request.py deleted file mode 100644 index ad3f05c..0000000 --- a/python/test/test_send_template_request.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request import SendTemplateRequest # noqa: E501 - - -class TestSendTemplateRequest(unittest.TestCase): - """SendTemplateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequest: - """Test SendTemplateRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequest` - """ - model = SendTemplateRequest() # noqa: E501 - if include_optional: - return SendTemplateRequest( - namespace = 'ca300906_cfbc_410b_99fb_dcee1t39d578', - chat_id = '12020721369@c.us', - phone = 12020721369, - template = 'start', - language = one_msg_waba_sdk.models.send_template_request_all_of_language.SendTemplateRequest_allOf_language( - policy = 'deterministic', - code = 'en', ), - params = [ - one_msg_waba_sdk.models.send_template_request_all_of_params.SendTemplateRequest_allOf_params( - default = 'Some title', - currency = one_msg_waba_sdk.models.send_template_request_all_of_currency.SendTemplateRequest_allOf_currency( - currency_code = 'USD', - amount_1000 = 100990, ), - date_time = one_msg_waba_sdk.models.send_template_request_all_of_date_time.SendTemplateRequest_allOf_date_time( - component = one_msg_waba_sdk.models.send_template_request_all_of_date_time_component.SendTemplateRequest_allOf_date_time_component( - day_of_week = 'FRIDAY', - year = 2001, - month = 4, - day_of_month = 13, - hour = 17, - minute = 20, - calendar = 'GREGORIAN', ), - unix_epoch = one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch.SendTemplateRequest_allOf_date_time_unix_epoch( - timestamp = 987168000, ), ), ) - ] - ) - else: - return SendTemplateRequest( - namespace = 'ca300906_cfbc_410b_99fb_dcee1t39d578', - template = 'start', - language = one_msg_waba_sdk.models.send_template_request_all_of_language.SendTemplateRequest_allOf_language( - policy = 'deterministic', - code = 'en', ), - ) - """ - - def testSendTemplateRequest(self): - """Test SendTemplateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request_all_of_currency.py b/python/test/test_send_template_request_all_of_currency.py deleted file mode 100644 index 730a291..0000000 --- a/python/test/test_send_template_request_all_of_currency.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request_all_of_currency import SendTemplateRequestAllOfCurrency # noqa: E501 - - -class TestSendTemplateRequestAllOfCurrency(unittest.TestCase): - """SendTemplateRequestAllOfCurrency unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequestAllOfCurrency: - """Test SendTemplateRequestAllOfCurrency - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequestAllOfCurrency` - """ - model = SendTemplateRequestAllOfCurrency() # noqa: E501 - if include_optional: - return SendTemplateRequestAllOfCurrency( - currency_code = 'USD', - amount_1000 = 100990 - ) - else: - return SendTemplateRequestAllOfCurrency( - ) - """ - - def testSendTemplateRequestAllOfCurrency(self): - """Test SendTemplateRequestAllOfCurrency""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request_all_of_date_time.py b/python/test/test_send_template_request_all_of_date_time.py deleted file mode 100644 index 3f85785..0000000 --- a/python/test/test_send_template_request_all_of_date_time.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request_all_of_date_time import SendTemplateRequestAllOfDateTime # noqa: E501 - - -class TestSendTemplateRequestAllOfDateTime(unittest.TestCase): - """SendTemplateRequestAllOfDateTime unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequestAllOfDateTime: - """Test SendTemplateRequestAllOfDateTime - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequestAllOfDateTime` - """ - model = SendTemplateRequestAllOfDateTime() # noqa: E501 - if include_optional: - return SendTemplateRequestAllOfDateTime( - component = one_msg_waba_sdk.models.send_template_request_all_of_date_time_component.SendTemplateRequest_allOf_date_time_component( - day_of_week = 'FRIDAY', - year = 2001, - month = 4, - day_of_month = 13, - hour = 17, - minute = 20, - calendar = 'GREGORIAN', ), - unix_epoch = one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch.SendTemplateRequest_allOf_date_time_unix_epoch( - timestamp = 987168000, ) - ) - else: - return SendTemplateRequestAllOfDateTime( - ) - """ - - def testSendTemplateRequestAllOfDateTime(self): - """Test SendTemplateRequestAllOfDateTime""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request_all_of_date_time_component.py b/python/test/test_send_template_request_all_of_date_time_component.py deleted file mode 100644 index 5c6ec5b..0000000 --- a/python/test/test_send_template_request_all_of_date_time_component.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_component import SendTemplateRequestAllOfDateTimeComponent # noqa: E501 - - -class TestSendTemplateRequestAllOfDateTimeComponent(unittest.TestCase): - """SendTemplateRequestAllOfDateTimeComponent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequestAllOfDateTimeComponent: - """Test SendTemplateRequestAllOfDateTimeComponent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequestAllOfDateTimeComponent` - """ - model = SendTemplateRequestAllOfDateTimeComponent() # noqa: E501 - if include_optional: - return SendTemplateRequestAllOfDateTimeComponent( - day_of_week = 'FRIDAY', - year = 2001, - month = 4, - day_of_month = 13, - hour = 17, - minute = 20, - calendar = 'GREGORIAN' - ) - else: - return SendTemplateRequestAllOfDateTimeComponent( - ) - """ - - def testSendTemplateRequestAllOfDateTimeComponent(self): - """Test SendTemplateRequestAllOfDateTimeComponent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request_all_of_date_time_unix_epoch.py b/python/test/test_send_template_request_all_of_date_time_unix_epoch.py deleted file mode 100644 index 99618d0..0000000 --- a/python/test/test_send_template_request_all_of_date_time_unix_epoch.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch import SendTemplateRequestAllOfDateTimeUnixEpoch # noqa: E501 - - -class TestSendTemplateRequestAllOfDateTimeUnixEpoch(unittest.TestCase): - """SendTemplateRequestAllOfDateTimeUnixEpoch unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequestAllOfDateTimeUnixEpoch: - """Test SendTemplateRequestAllOfDateTimeUnixEpoch - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequestAllOfDateTimeUnixEpoch` - """ - model = SendTemplateRequestAllOfDateTimeUnixEpoch() # noqa: E501 - if include_optional: - return SendTemplateRequestAllOfDateTimeUnixEpoch( - timestamp = 987168000 - ) - else: - return SendTemplateRequestAllOfDateTimeUnixEpoch( - ) - """ - - def testSendTemplateRequestAllOfDateTimeUnixEpoch(self): - """Test SendTemplateRequestAllOfDateTimeUnixEpoch""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request_all_of_language.py b/python/test/test_send_template_request_all_of_language.py deleted file mode 100644 index 0d7d148..0000000 --- a/python/test/test_send_template_request_all_of_language.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request_all_of_language import SendTemplateRequestAllOfLanguage # noqa: E501 - - -class TestSendTemplateRequestAllOfLanguage(unittest.TestCase): - """SendTemplateRequestAllOfLanguage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequestAllOfLanguage: - """Test SendTemplateRequestAllOfLanguage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequestAllOfLanguage` - """ - model = SendTemplateRequestAllOfLanguage() # noqa: E501 - if include_optional: - return SendTemplateRequestAllOfLanguage( - policy = 'deterministic', - code = 'en' - ) - else: - return SendTemplateRequestAllOfLanguage( - ) - """ - - def testSendTemplateRequestAllOfLanguage(self): - """Test SendTemplateRequestAllOfLanguage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_send_template_request_all_of_params.py b/python/test/test_send_template_request_all_of_params.py deleted file mode 100644 index 78d5675..0000000 --- a/python/test/test_send_template_request_all_of_params.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.send_template_request_all_of_params import SendTemplateRequestAllOfParams # noqa: E501 - - -class TestSendTemplateRequestAllOfParams(unittest.TestCase): - """SendTemplateRequestAllOfParams unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SendTemplateRequestAllOfParams: - """Test SendTemplateRequestAllOfParams - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendTemplateRequestAllOfParams` - """ - model = SendTemplateRequestAllOfParams() # noqa: E501 - if include_optional: - return SendTemplateRequestAllOfParams( - default = 'Some title', - currency = one_msg_waba_sdk.models.send_template_request_all_of_currency.SendTemplateRequest_allOf_currency( - currency_code = 'USD', - amount_1000 = 100990, ), - date_time = one_msg_waba_sdk.models.send_template_request_all_of_date_time.SendTemplateRequest_allOf_date_time( - component = one_msg_waba_sdk.models.send_template_request_all_of_date_time_component.SendTemplateRequest_allOf_date_time_component( - day_of_week = 'FRIDAY', - year = 2001, - month = 4, - day_of_month = 13, - hour = 17, - minute = 20, - calendar = 'GREGORIAN', ), - unix_epoch = one_msg_waba_sdk.models.send_template_request_all_of_date_time_unix_epoch.SendTemplateRequest_allOf_date_time_unix_epoch( - timestamp = 987168000, ), ) - ) - else: - return SendTemplateRequestAllOfParams( - ) - """ - - def testSendTemplateRequestAllOfParams(self): - """Test SendTemplateRequestAllOfParams""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_set_commerce.py b/python/test/test_set_commerce.py deleted file mode 100644 index f3040d6..0000000 --- a/python/test/test_set_commerce.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.set_commerce import SetCommerce # noqa: E501 - - -class TestSetCommerce(unittest.TestCase): - """SetCommerce unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SetCommerce: - """Test SetCommerce - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SetCommerce` - """ - model = SetCommerce() # noqa: E501 - if include_optional: - return SetCommerce( - success = True - ) - else: - return SetCommerce( - ) - """ - - def testSetCommerce(self): - """Test SetCommerce""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_set_me.py b/python/test/test_set_me.py deleted file mode 100644 index 2f07640..0000000 --- a/python/test/test_set_me.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.set_me import SetMe # noqa: E501 - - -class TestSetMe(unittest.TestCase): - """SetMe unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SetMe: - """Test SetMe - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SetMe` - """ - model = SetMe() # noqa: E501 - if include_optional: - return SetMe( - result = 'success' - ) - else: - return SetMe( - ) - """ - - def testSetMe(self): - """Test SetMe""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_set_me_request.py b/python/test/test_set_me_request.py deleted file mode 100644 index 6418ddf..0000000 --- a/python/test/test_set_me_request.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.set_me_request import SetMeRequest # noqa: E501 - - -class TestSetMeRequest(unittest.TestCase): - """SetMeRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SetMeRequest: - """Test SetMeRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SetMeRequest` - """ - model = SetMeRequest() # noqa: E501 - if include_optional: - return SetMeRequest( - about = 'Some about info', - address = 'Neverland, Unexpected st.', - description = 'Some company description', - email = 'john@neverland.play', - phone = '12020721369', - vertical = 'Other', - photo = '' - ) - else: - return SetMeRequest( - ) - """ - - def testSetMeRequest(self): - """Test SetMeRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_set_settings200_response.py b/python/test/test_set_settings200_response.py deleted file mode 100644 index 246bf62..0000000 --- a/python/test/test_set_settings200_response.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.set_settings200_response import SetSettings200Response # noqa: E501 - - -class TestSetSettings200Response(unittest.TestCase): - """SetSettings200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SetSettings200Response: - """Test SetSettings200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SetSettings200Response` - """ - model = SetSettings200Response() # noqa: E501 - if include_optional: - return SetSettings200Response( - webhook_url = 'https://bin.1msg.io/1f9aj261', - update = None - ) - else: - return SetSettings200Response( - update = None, - ) - """ - - def testSetSettings200Response(self): - """Test SetSettings200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_set_settings200_response_all_of_update.py b/python/test/test_set_settings200_response_all_of_update.py deleted file mode 100644 index a02c1f0..0000000 --- a/python/test/test_set_settings200_response_all_of_update.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.set_settings200_response_all_of_update import SetSettings200ResponseAllOfUpdate # noqa: E501 - - -class TestSetSettings200ResponseAllOfUpdate(unittest.TestCase): - """SetSettings200ResponseAllOfUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SetSettings200ResponseAllOfUpdate: - """Test SetSettings200ResponseAllOfUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SetSettings200ResponseAllOfUpdate` - """ - model = SetSettings200ResponseAllOfUpdate() # noqa: E501 - if include_optional: - return SetSettings200ResponseAllOfUpdate( - webhook_url = 'https://bin.1msg.io/1f9aj261' - ) - else: - return SetSettings200ResponseAllOfUpdate( - ) - """ - - def testSetSettings200ResponseAllOfUpdate(self): - """Test SetSettings200ResponseAllOfUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_set_webhook_status.py b/python/test/test_set_webhook_status.py deleted file mode 100644 index 03265ff..0000000 --- a/python/test/test_set_webhook_status.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.set_webhook_status import SetWebhookStatus # noqa: E501 - - -class TestSetWebhookStatus(unittest.TestCase): - """SetWebhookStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SetWebhookStatus: - """Test SetWebhookStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SetWebhookStatus` - """ - model = SetWebhookStatus() # noqa: E501 - if include_optional: - return SetWebhookStatus( - set = True, - message = 'https://bin.1msg.io/1f9aj261' - ) - else: - return SetWebhookStatus( - ) - """ - - def testSetWebhookStatus(self): - """Test SetWebhookStatus""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_settings.py b/python/test/test_settings.py deleted file mode 100644 index baf4348..0000000 --- a/python/test/test_settings.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.settings import Settings # noqa: E501 - - -class TestSettings(unittest.TestCase): - """Settings unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Settings: - """Test Settings - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Settings` - """ - model = Settings() # noqa: E501 - if include_optional: - return Settings( - webhook_url = 'https://bin.1msg.io/1f9aj261' - ) - else: - return Settings( - ) - """ - - def testSettings(self): - """Test Settings""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_template_category_prop.py b/python/test/test_template_category_prop.py deleted file mode 100644 index 9c2d6e7..0000000 --- a/python/test/test_template_category_prop.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.template_category_prop import TemplateCategoryProp # noqa: E501 - - -class TestTemplateCategoryProp(unittest.TestCase): - """TemplateCategoryProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTemplateCategoryProp(self): - """Test TemplateCategoryProp""" - # inst = TemplateCategoryProp() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_template_components_prop.py b/python/test/test_template_components_prop.py deleted file mode 100644 index cf444cc..0000000 --- a/python/test/test_template_components_prop.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.template_components_prop import TemplateComponentsProp # noqa: E501 - - -class TestTemplateComponentsProp(unittest.TestCase): - """TemplateComponentsProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TemplateComponentsProp: - """Test TemplateComponentsProp - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TemplateComponentsProp` - """ - model = TemplateComponentsProp() # noqa: E501 - if include_optional: - return TemplateComponentsProp( - ) - else: - return TemplateComponentsProp( - ) - """ - - def testTemplateComponentsProp(self): - """Test TemplateComponentsProp""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_template_components_prop_inner.py b/python/test/test_template_components_prop_inner.py deleted file mode 100644 index 10e013d..0000000 --- a/python/test/test_template_components_prop_inner.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.template_components_prop_inner import TemplateComponentsPropInner # noqa: E501 - - -class TestTemplateComponentsPropInner(unittest.TestCase): - """TemplateComponentsPropInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TemplateComponentsPropInner: - """Test TemplateComponentsPropInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TemplateComponentsPropInner` - """ - model = TemplateComponentsPropInner() # noqa: E501 - if include_optional: - return TemplateComponentsPropInner( - type = 'BODY', - format = 'TEXT', - text = 'header text {{1}}', - example = one_msg_waba_sdk.models.example.example(), - buttons = [ - one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner.TemplateComponentsProp_inner_buttons_inner( - type = 'QUICK_REPLY', - text = 'phone-button-text', - url = 'https://www.website.com/{{1}}', - phone_number = '+1(234) 235-5678', - example = [ - null - ], ) - ] - ) - else: - return TemplateComponentsPropInner( - ) - """ - - def testTemplateComponentsPropInner(self): - """Test TemplateComponentsPropInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_template_components_prop_inner_buttons_inner.py b/python/test/test_template_components_prop_inner_buttons_inner.py deleted file mode 100644 index 67bc223..0000000 --- a/python/test/test_template_components_prop_inner_buttons_inner.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.template_components_prop_inner_buttons_inner import TemplateComponentsPropInnerButtonsInner # noqa: E501 - - -class TestTemplateComponentsPropInnerButtonsInner(unittest.TestCase): - """TemplateComponentsPropInnerButtonsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TemplateComponentsPropInnerButtonsInner: - """Test TemplateComponentsPropInnerButtonsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TemplateComponentsPropInnerButtonsInner` - """ - model = TemplateComponentsPropInnerButtonsInner() # noqa: E501 - if include_optional: - return TemplateComponentsPropInnerButtonsInner( - type = 'QUICK_REPLY', - text = 'phone-button-text', - url = 'https://www.website.com/{{1}}', - phone_number = '+1(234) 235-5678', - example = [ - null - ] - ) - else: - return TemplateComponentsPropInnerButtonsInner( - ) - """ - - def testTemplateComponentsPropInnerButtonsInner(self): - """Test TemplateComponentsPropInnerButtonsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_template_language_prop.py b/python/test/test_template_language_prop.py deleted file mode 100644 index 1bde11c..0000000 --- a/python/test/test_template_language_prop.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.template_language_prop import TemplateLanguageProp # noqa: E501 - - -class TestTemplateLanguageProp(unittest.TestCase): - """TemplateLanguageProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTemplateLanguageProp(self): - """Test TemplateLanguageProp""" - # inst = TemplateLanguageProp() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_template_namespace_field.py b/python/test/test_template_namespace_field.py deleted file mode 100644 index cacaa14..0000000 --- a/python/test/test_template_namespace_field.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.template_namespace_field import TemplateNamespaceField # noqa: E501 - - -class TestTemplateNamespaceField(unittest.TestCase): - """TemplateNamespaceField unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TemplateNamespaceField: - """Test TemplateNamespaceField - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TemplateNamespaceField` - """ - model = TemplateNamespaceField() # noqa: E501 - if include_optional: - return TemplateNamespaceField( - namespace = 'ca300906_cfbc_410b_99fb_dcee8e13d578' - ) - else: - return TemplateNamespaceField( - ) - """ - - def testTemplateNamespaceField(self): - """Test TemplateNamespaceField""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_templates_api.py b/python/test/test_templates_api.py deleted file mode 100644 index d82bd86..0000000 --- a/python/test/test_templates_api.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from one_msg_waba_sdk.api.templates_api import TemplatesApi # noqa: E501 - - -class TestTemplatesApi(unittest.TestCase): - """TemplatesApi unit test stubs""" - - def setUp(self) -> None: - self.api = TemplatesApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_add_template(self) -> None: - """Test case for add_template - - Create template # noqa: E501 - """ - pass - - def test_remove_template(self) -> None: - """Test case for remove_template - - Remove template # noqa: E501 - """ - pass - - def test_send_template(self) -> None: - """Test case for send_template - - Send Template Message # noqa: E501 - """ - pass - - def test_templates_list(self) -> None: - """Test case for templates_list - - Get templates list # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_upload_media.py b/python/test/test_upload_media.py deleted file mode 100644 index ce9a7fd..0000000 --- a/python/test/test_upload_media.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.upload_media import UploadMedia # noqa: E501 - - -class TestUploadMedia(unittest.TestCase): - """UploadMedia unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UploadMedia: - """Test UploadMedia - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UploadMedia` - """ - model = UploadMedia() # noqa: E501 - if include_optional: - return UploadMedia( - body = '' - ) - else: - return UploadMedia( - body = '', - ) - """ - - def testUploadMedia(self): - """Test UploadMedia""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_webhook_url.py b/python/test/test_webhook_url.py deleted file mode 100644 index d82d33e..0000000 --- a/python/test/test_webhook_url.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from one_msg_waba_sdk.models.webhook_url import WebhookUrl # noqa: E501 - - -class TestWebhookUrl(unittest.TestCase): - """WebhookUrl unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WebhookUrl: - """Test WebhookUrl - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WebhookUrl` - """ - model = WebhookUrl() # noqa: E501 - if include_optional: - return WebhookUrl( - webhook_url = '' - ) - else: - return WebhookUrl( - webhook_url = '', - ) - """ - - def testWebhookUrl(self): - """Test WebhookUrl""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_webhooks_api.py b/python/test/test_webhooks_api.py deleted file mode 100644 index 7168a8b..0000000 --- a/python/test/test_webhooks_api.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - one_msg_waba_sdk - - [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - - The version of the OpenAPI document: 2.39.0 - Contact: hello@1msg.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from one_msg_waba_sdk.api.webhooks_api import WebhooksApi # noqa: E501 - - -class TestWebhooksApi(unittest.TestCase): - """WebhooksApi unit test stubs""" - - def setUp(self) -> None: - self.api = WebhooksApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_ack_hook_info(self) -> None: - """Test case for ack_hook_info - - Check ACKs # noqa: E501 - """ - pass - - def test_set_webhook(self) -> None: - """Test case for set_webhook - - Set webhook # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/tox.ini b/python/tox.ini deleted file mode 100644 index e501953..0000000 --- a/python/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=one_msg_waba_sdk diff --git a/swagger.waba.json b/swagger.waba.json deleted file mode 100644 index b2e6c1d..0000000 --- a/swagger.waba.json +++ /dev/null @@ -1,2670 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "description": "[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks.\n\nEvery API request must contain an Authorize HTTP header with a token. \nThis is your channel token, which can be found in your channel project on your profile page.\nPlease do not give the token to anyone or post it publicly.\n\nThe authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}).\nParameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. \n\nAll 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail", - "version": "2.39.0", - "title": "one_msg_waba_sdk", - "contact": { - "email": "hello@1msg.io" - } - }, - "tags": [ - { - "name": "Channel", - "description": "Manage your WhatsApp Business API channel" - }, - { - "name": "Webhooks", - "description": "How to setup webhooks for the WhatsApp Business API" - }, - { - "name": "Messaging", - "description": "This part of the documentation describes how to send and receive messages using the WhatsApp Business API" - }, - { - "name": "Templates", - "description": "Template messaging via WhatsApp Business API" - }, - { - "name": "Products & Catalogs", - "description": "How to build and send messages with single and multiple products" - }, - { - "name": "Media", - "description": "Use the media node to upload, retrieve, or delete media" - } - ], - "paths": { - "/me": { - "get": { - "tags": [ - "Channel" - ], - "summary": "Get Profile Info", - "description": "Use this edge to retrieve your profile's About info", - "operationId": "getMe", - "responses": { - "200": { - "$ref": "#/components/responses/GetMe" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ] - }, - "post": { - "tags": [ - "Channel" - ], - "summary": "Change user info", - "description": "Change user info", - "operationId": "setMe", - "responses": { - "200": { - "$ref": "#/components/responses/SetMe" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SetMe" - } - } - }, - "/statistics": { - "get": { - "tags": [ - "Channel" - ], - "summary": "Get Channel statistics", - "description": "Get channel usage statistics", - "operationId": "getStatistics", - "responses": { - "200": { - "$ref": "#/components/responses/channelStatistics" - } - }, - "security": [ - { - "token": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/date" - } - ] - } - }, - "/extendedStatistics": { - "get": { - "tags": [ - "Channel" - ], - "summary": "Get Extended Channel statistics", - "description": "Get channel usage extended statistics", - "operationId": "getExtendedStatistics", - "responses": { - "200": { - "$ref": "#/components/responses/channelExtendedStatistics" - } - }, - "security": [ - { - "token": [] - } - ] - } - }, - "/status": { - "get": { - "tags": [ - "Channel" - ], - "summary": " Get Status", - "description": "Returns the status of your WhatsApp Business API client. Channel statuses:\n\n**connected**/**connecting** - everything is ok.\n\n**disconnected** - The Coreapp is not connected to the WhatsApp servers.\n\n**uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status.\n\n**unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support)", - "operationId": "getStatus", - "responses": { - "200": { - "$ref": "#/components/responses/channelStatus" - } - }, - "security": [ - { - "token": [] - } - ] - } - }, - "/settings": { - "get": { - "tags": [ - "Channel" - ], - "summary": "Get Settings", - "description": "**webhookUrl** - Http or https URL for receiving notifications.", - "operationId": "getSettings", - "responses": { - "200": { - "$ref": "#/components/responses/Settings" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ] - }, - "post": { - "tags": [ - "Channel" - ], - "summary": "Set settings", - "description": "**webhookUrl** - Http or https URL for receiving notifications.", - "operationId": "setSettings", - "responses": { - "200": { - "$ref": "#/components/responses/UpdateSettings" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/UpdateSettings" - } - } - }, - "/commerce": { - "get": { - "tags": [ - "Channel" - ], - "summary": "Get Commerce Settings", - "description": "**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it.\n**is_cart_enabled** - Set to true to enable cart or false to disable it.", - "operationId": "getCommerce", - "responses": { - "200": { - "$ref": "#/components/responses/GetCommerce" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ] - }, - "post": { - "tags": [ - "Products & Catalogs" - ], - "summary": "Set Commerce Settings", - "description": "**is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it.\n**is_cart_enabled** - Set to true to enable cart or false to disable it.", - "operationId": "setCommerce", - "responses": { - "200": { - "$ref": "#/components/responses/SetCommerce" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/UpdateCommerce" - } - } - }, - "/webhook": { - "post": { - "tags": [ - "Webhooks" - ], - "summary": "Set webhook", - "description": "Sets the URL for receiving webhook notifications of new messages and message delivery events (ack).\n\n**API responses in \"Callbacks\" tab**", - "operationId": "setWebhook", - "responses": { - "200": { - "$ref": "#/components/responses/SetWebhookStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SetWebhook" - }, - "callbacks": { - "messages": { - "$ref": "#/components/callbacks/Messages" - }, - "ack": { - "$ref": "#/components/callbacks/Ack" - } - } - } - }, - "/sendList": { - "post": { - "tags": [ - "Messaging" - ], - "summary": "Send List Message", - "description": "Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.", - "operationId": "sendList", - "responses": { - "200": { - "$ref": "#/components/responses/SendMessageStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendList" - } - } - }, - "/sendFile": { - "post": { - "tags": [ - "Messaging" - ], - "summary": "Send a File", - "description": "Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.", - "operationId": "sendFile", - "responses": { - "200": { - "$ref": "#/components/responses/SendMessageStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendFile" - } - } - }, - "/sendTemplate": { - "post": { - "tags": [ - "Templates" - ], - "summary": "Send Template Message", - "description": "Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone.\n\nExample:\n\n{\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"}", - "operationId": "sendTemplate", - "responses": { - "200": { - "$ref": "#/components/responses/SendTemplate" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendTemplate" - } - } - }, - "/sendMessage": { - "post": { - "tags": [ - "Messaging" - ], - "summary": "Send a Message", - "description": "Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed.\n\nOnly one of two parameters is needed to determine the destination - chatId or phone.", - "operationId": "sendMessage", - "responses": { - "200": { - "$ref": "#/components/responses/SendMessageStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendMessage" - } - } - }, - "/sendLocation": { - "post": { - "tags": [ - "Messaging" - ], - "summary": "Send a Location", - "description": "Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.", - "operationId": "sendLocation", - "responses": { - "200": { - "$ref": "#/components/responses/SendMessageStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendLocation" - } - } - }, - "/sendContact": { - "post": { - "tags": [ - "Messaging" - ], - "summary": "Send a Contact", - "description": "Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.", - "operationId": "sendContact", - "responses": { - "200": { - "$ref": "#/components/responses/SendMessageStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendContact" - } - } - }, - "/sendProduct": { - "post": { - "tags": [ - "Products & Catalogs" - ], - "summary": "Send a Product", - "description": "Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.\n\nFirst, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases.\n\n**You can not send products to Business WhatsApp clients.**", - "operationId": "sendProduct", - "responses": { - "200": { - "$ref": "#/components/responses/SendMessageStatus" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SendProduct" - } - } - }, - "/addTemplate": { - "post": { - "tags": [ - "Templates" - ], - "summary": "Create template", - "description": "Create new template for sending.", - "operationId": "addTemplate", - "responses": { - "200": { - "$ref": "#/components/responses/AddTemplate" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/AddTemplate" - } - } - }, - "/removeTemplate": { - "post": { - "tags": [ - "Templates" - ], - "summary": "Remove template", - "description": "Deleted template can not be restored.", - "operationId": "removeTemplate", - "responses": { - "200": { - "$ref": "#/components/responses/RemoveTemplate" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/RemoveTemplate" - } - } - }, - "/templates": { - "get": { - "tags": [ - "Templates" - ], - "summary": "Get templates list", - "description": "", - "operationId": "templatesList", - "responses": { - "200": { - "$ref": "#/components/responses/GetTemplates" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ] - } - }, - "/uploadMedia": { - "post": { - "tags": [ - "Media" - ], - "summary": "Upload media & get mediaId", - "description": "Upload media and get mediaId. Uploaded media can be sent in template", - "operationId": "uploadMedia", - "responses": { - "200": { - "$ref": "#/components/responses/UploadMedia" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/UploadMedia" - } - } - }, - "/messages": { - "get": { - "tags": [ - "Messaging" - ], - "summary": "Get messages list", - "description": "", - "operationId": "messagesList", - "responses": { - "200": { - "$ref": "#/components/responses/GetMessages" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/last" - }, - { - "$ref": "#/components/parameters/lastMessageNumber" - }, - { - "$ref": "#/components/parameters/firstMessageNumber" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/chatId" - }, - { - "$ref": "#/components/parameters/min_time" - }, - { - "$ref": "#/components/parameters/max_time" - }, - { - "$ref": "#/components/parameters/msgId" - } - ] - } - }, - "/hookInfo": { - "get": { - "tags": [ - "Webhooks" - ], - "summary": "Check ACKs", - "description": "", - "operationId": "ackHookInfo", - "responses": { - "200": { - "$ref": "#/components/responses/GetAckInfo" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/messageId" - } - ] - } - }, - "/outputIP": { - "get": { - "tags": [ - "Channel" - ], - "summary": "Get channel server IP", - "description": "", - "operationId": "outputIP", - "responses": { - "200": { - "$ref": "#/components/responses/GetIP" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ] - } - }, - "/readMessage": { - "post": { - "tags": [ - "Messaging" - ], - "summary": "Mark message as read", - "description": "", - "operationId": "readMessage", - "responses": { - "200": { - "$ref": "#/components/responses/ReadMessage" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - } - }, - "security": [ - { - "token": [] - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/ReadMessage" - } - } - } - }, - "servers": [ - { - "url": "{protocol}://api.1msg.io/{channelId}", - "description": "New common server url", - "variables": { - "channelId": { - "default": "YOUR_INSTANCE_NUMBER", - "description": "Your channel number" - }, - "protocol": { - "enum": [ - "http", - "https" - ], - "default": "https" - } - } - } - ], - "components": { - "securitySchemes": { - "token": { - "type": "apiKey", - "name": "token", - "in": "query" - } - }, - "parameters": { - "messageId": { - "name": "messageId", - "in": "query", - "description": "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U", - "required": true, - "example": "0XzkmGNn4prUAQlzsHApGNRXQ0U", - "schema": { - "type": "string" - }, - "allowEmptyValue": false - }, - "msgId": { - "name": "msgId", - "in": "query", - "description": "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U", - "required": false, - "example": "0XzkmGNn4prUAQlzsHApGNRXQ0U", - "schema": { - "type": "string" - } - }, - "phone": { - "name": "phone", - "in": "query", - "description": "Phone number. Example: 556123122026", - "required": true, - "example": 556123122026, - "schema": { - "type": "string" - } - }, - "date": { - "name": "date", - "in": "query", - "description": "Month and year in format mm.YYYY.", - "example": "03.2022", - "schema": { - "type": "string" - } - }, - "lastMessageNumber": { - "name": "lastMessageNumber", - "in": "query", - "description": "The lastMessageNumber parameter from the last response. Example: 100", - "example": 100, - "schema": { - "type": "integer" - } - }, - "last": { - "name": "last", - "in": "query", - "description": "Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored.", - "example": true, - "schema": { - "type": "boolean" - } - }, - "firstMessageNumber": { - "name": "firstMessageNumber", - "in": "query", - "description": "The firstMessageNumber parameter from the last response. Example: 1", - "example": 1, - "schema": { - "type": "integer" - } - }, - "limit": { - "name": "limit", - "in": "query", - "description": "Sets length of the message list. Default 100. With value 0 returns all messages.", - "example": 200, - "schema": { - "type": "integer" - } - }, - "chatId": { - "name": "chatId", - "in": "query", - "description": "Filter messages by chatId\n\nChat ID from the message list. Example: 556123122026@c.us", - "example": "556123122026@c.us", - "schema": { - "type": "string" - } - }, - "min_time": { - "name": "min_time", - "in": "query", - "description": "Filter messages received after specified time. Example: 1665396610", - "example": 1665396610, - "schema": { - "type": "integer" - } - }, - "max_time": { - "name": "max_time", - "in": "query", - "description": "Filter messages received before specified time. Example: 1665396610", - "example": 1665396610, - "schema": { - "type": "integer" - } - } - }, - "schemas": { - "AddTemplate": { - "type": "object", - "properties": { - } - }, - "TemplateCategoryProp": { - "type": "string", - "enum": [ - "MARKETING", - "TRANSACTIONAL", - "OTP" - ], - "example": "MARKETING", - "description": "Template category" - }, - "TemplateComponentsProp": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "BODY", - "HEADER", - "FOOTER", - "BUTTONS" - ], - "example": "BODY" - }, - "format": { - "type": "string", - "description": "Only for HEADER type", - "enum": [ - "TEXT", - "IMAGE", - "DOCUMENT", - "VIDEO" - ], - "example": "TEXT" - }, - "text": { - "type": "string", - "example": "header text {{1}}" - }, - "example": { - "type": "object" - }, - "buttons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "PHONE_NUMBER", - "URL", - "QUICK_REPLY" - ], - "example": "QUICK_REPLY" - }, - "text": { - "type": "string", - "example": "phone-button-text" - }, - "url": { - "type": "string", - "example": "https://www.website.com/{{1}}" - }, - "phone_number": { - "type": "string", - "example": "+1(234) 235-5678" - }, - "example": { - "type": "array", - "items": {} - } - } - } - } - } - }, - "description": "Array of template components" - }, - "TemplateLanguageProp": { - "type": "string", - "enum": [ - "af", - "sq", - "ar", - "az", - "bn", - "bg", - "ca", - "zh_CN", - "zh_HK", - "zh_TW", - "hr", - "cs", - "da", - "nl", - "en", - "en_GB", - "en_US", - "et", - "fil", - "fi", - "fr", - "de", - "el", - "gu", - "he", - "hi", - "hu", - "id", - "ga", - "it", - "ja", - "kn", - "kk", - "ko", - "lo", - "lv", - "lt", - "mk", - "ms", - "mr", - "nb", - "fa", - "pl", - "pt_BR", - "pt_PT", - "pa", - "ro", - "ru", - "sr", - "sk", - "sl", - "es", - "es_AR", - "es_ES", - "es_MX", - "sw", - "sv", - "ta", - "te", - "th", - "tr", - "uk", - "ur", - "uz", - "vi" - ], - "example": "en", - "description": "Template language" - }, - "TemplateNamespaceProp": { - "type": "string", - "description": "Can be found by method /templates", - "example": "ca300906_cfbc_410b_99fb_dcee8e13d578" - }, - "TemplateNamespaceField": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "example": "ca300906_cfbc_410b_99fb_dcee8e13d578" - } - } - }, - "Ack": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "unique id of message", - "example": "true_12020721369@c.us_DF38E6A25B42CC8CCE13EC40F" - }, - "chatId": { - "type": "string", - "description": "chat ID", - "example": "12020721369@c.us" - }, - "status": { - "type": "string", - "description": "type of the message status", - "enum": [ - "delivered", - "viewed", - "sent" - ], - "example": "viewed" - } - } - }, - "AddTemplateRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of template", - "example": "start" - }, - "category": { - "$ref": "#/components/schemas/TemplateCategoryProp" - }, - "components": { - "$ref": "#/components/schemas/TemplateComponentsProp" - }, - "language": { - "$ref": "#/components/schemas/TemplateLanguageProp" - } - } - }, - "ChatIdProp": { - "type": "object", - "properties": { - "chatId": { - "description": "**Required if phone is not set**\n\nChat ID from the message list. Examples: 12020721369@c.us\n. Used instead of the phone parameter.", - "type": "string", - "example": "12020721369@c.us" - } - } - }, - "PhoneProp": { - "type": "object", - "properties": { - "phone": { - "description": "**Required if chatId is not set**\n\nA phone number starting with the country code. You do not\nneed to add your number. \n\nUSA example: 12020721369.", - "type": "string", - "example": "12020721369" - } - } - }, - "MessageIdProp": { - "type": "object", - "properties": { - "messageId": { - "description": "Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U", - "type": "string", - "example": "0XzkmGNn4prUAQlzsHApGNRXQ0U" - } - } - }, - "Message": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "unique id", - "example": "ABGHYoIXMAmY13IKOick9az6QYmt4R" - }, - "body": { - "type": "string", - "description": "text message for type \"chat\", or link to download the file for \"ptt\", \"image\", \"audio\", \"video\" and \"document\", or latitude and longitude for \"location\", or message \"[Call]\" for \"call_log\"", - "example": "Ok!" - }, - "fromMe": { - "type": "boolean", - "description": "true - outgoing, false - incoming", - "example": true - }, - "self": { - "type": "integer", - "description": "1 - generated by api, 0 - generated by app", - "example": 0 - }, - "isForwarded": { - "type": "boolean", - "description": "true - forwarded message, false - direct message", - "example": false - }, - "author": { - "type": "string", - "description": "Author ID of the message", - "example": "12020721369@c.us" - }, - "time": { - "type": "integer", - "description": "send time, unix timestamp", - "example": 1665396610 - }, - "chatId": { - "type": "string", - "description": "chat ID", - "example": "12020721369@c.us" - }, - "type": { - "type": "string", - "description": "type of the message", - "enum": [ - "chat", - "interactive", - "image", - "video", - "document", - "audio", - "sticker", - "voice" - ], - "example": "chat" - }, - "senderName": { - "type": "string", - "description": "Sender name", - "example": "John" - }, - "caption": { - "type": "string", - "description": "File caption or filename", - "example": "photo.jpg" - }, - "quotedMsgId": { - "type": "string", - "description": "ID of quoted message", - "example": "ABGHYoIXMAmYTwIKOick9az6QYmt4R" - } - } - }, - "SetMe": { - "type": "object", - "properties": { - "result": { - "type": "string", - "nullable": false, - "example": "success" - } - } - }, - "SetMeRequest": { - "allOf": [ - { - "$ref": "#/components/schemas/MeComponents" - } - ] - }, - "MeComponents": { - "type": "object", - "properties": { - "about": { - "type": "string", - "description": "Profile`s About section.", - "example": "Some about info" - }, - "address": { - "type": "string", - "description": "Address of the business", - "example": "Neverland, Unexpected st." - }, - "description": { - "type": "string", - "description": "Description of the business. Max 256 characters", - "example": "Some company description" - }, - "email": { - "type": "string", - "description": "Business email", - "example": "john@neverland.play" - }, - "phone": { - "type": "string", - "description": "Linked phone number", - "example": "12020721369" - }, - "vertical": { - "type": "string", - "enum": [ - "Automotive", - "Beauty, Spa and Salon", - "Clothing and Apparel", - "Education", - "Entertainment", - "Event Planning and Service", - "Finance and Banking", - "Food and Grocery", - "Public Service", - "Hotel and Lodging", - "Medical and Health", - "Non-profit", - "Professional Services", - "Shopping and Retail", - "Travel and Transportation", - "Restaurant", - "Other", - "" - ], - "example": "Other", - "description": "Industry of the business" - }, - "photo": { - "description": "HTTP link\n*https://...*\n\nOr base64-encoded file with mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* \n\nFile in form-data input field", - "type": "string" - } - } - }, - "GetMe": { - "allOf": [ - { - "$ref": "#/components/schemas/MeComponents" - }, - { - "type": "object", - "properties": { - "photo": { - "type": "string", - "nullable": false, - "example": "https://pps.whatsapp.net/sample.jpg" - } - } - } - ] - }, - "GetIP": { - "type": "object", - "properties": { - "result": { - "type": "string", - "nullable": false, - "example": "213.74.84.72" - } - } - }, - "GetTemplates": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "nullable": false, - "example": 3 - }, - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/TemplateCategoryProp" - }, - "components": { - "$ref": "#/components/schemas/TemplateComponentsProp" - }, - "language": { - "$ref": "#/components/schemas/TemplateLanguageProp" - }, - "name": { - "type": "string", - "example": "start" - }, - "namespace": { - "$ref": "#/components/schemas/TemplateNamespaceProp" - }, - "rejected_reason": { - "type": "string", - "example": "NONE" - }, - "status": { - "type": "string", - "example": "approved" - } - } - } - } - } - }, - "channelStatistics": { - "type": "object", - "properties": { - "date": { - "type": "string", - "example": "03.2022" - }, - "templates_cost": { - "type": "number", - "example": 400.0313 - } - } - }, - "channelExtendedStatistics": { - "type": "array", - "items": { - "type": "object", - "properties": { - "business_initiated_paid_quantity": { - "type": "integer", - "example": 1 - }, - "business_initiated_price": { - "type": "number", - "example": 0.0691 - }, - "business_initiated_quantity": { - "type": "integer", - "example": 2 - }, - "free_entry_point": { - "type": "integer", - "example": 0 - }, - "free_quantity": { - "type": "integer", - "example": 1 - }, - "free_tier": { - "type": "integer", - "example": 1 - }, - "paid_quantity": { - "type": "integer", - "example": 1 - }, - "period_date": { - "type": "string", - "example": "2022-11-01T00:00:00Z" - }, - "quantity": { - "type": "number", - "example": 2 - }, - "total_price": { - "type": "number", - "example": 0.0691 - }, - "user_initiated_paid_quantity": { - "type": "integer", - "example": 1 - }, - "user_initiated_price": { - "type": "number", - "example": 0.0691 - }, - "user_initiated_quantity": { - "type": "integer", - "example": 2 - } - } - } - }, - "channelStatus": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "channel Status", - "enum": [ - "connected", - "connecting", - "disconnected", - "uninitialized", - "unregistered" - ], - "example": "connected" - } - } - }, - "RemoveTemplateRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Template name", - "example": "start" - } - } - }, - "SendFileRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "body": { - "description": "HTTP link\n*https://...*\n\nOr base64-encoded file with mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* \n\nFile in form-data input field", - "type": "string" - }, - "filename": { - "description": "File name, for *example 1.jpg* or *hello.xlsx*", - "type": "string" - }, - "caption": { - "description": "Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026", - "type": "string" - } - }, - "required": [ - "body", - "filename" - ] - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "SendListRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "Main message text", - "example": "Please choose option" - }, - "header": { - "type": "string", - "description": "Header will be located above message text", - "example": "Some options" - }, - "footer": { - "type": "string", - "description": "Footer will be placed under message text", - "example": "Thank you" - }, - "action": { - "type": "string", - "description": "Action for open list", - "example": "List" - }, - "sections": { - "type": "array", - "description": "Up to 10 sections from which the client can choose.\n\nEach section is object with fields:\n\n*title* - Title of section, up to 24 symbols. Required if there are more then 1 section\n\n*rows* - available options. Required\n\n\n\nEach option is object with fields:\n\n*id* - Unique id for option, up to 200 symbols. Required\n\n*title* - Title of option, up to 24 symbols. Required\n\n*description* - Description of option, up to 72 symbols\n\n\n\nExample:\n\n[{\"title\":\"Section 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Option 1\",\"description\":\"Description 1\"}]},{\"title\":\"Section 2\",\"rows\":[{\"id\":\"2\",\"title\":\"Option 2\",\"description\":\"Description 2\"}]}]", - "example": [ - { - "title": "Section 1", - "rows": [ - { - "id": "1", - "title": "Option 1", - "description": "Description 1" - } - ] - }, - { - "title": "Section 2", - "rows": [ - { - "id": "2", - "title": "Option 2", - "description": "Description 2" - } - ] - } - ], - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "example": "Some title", - "description": "Title of section, up to 24 symbols. Required if there are more then 1 section" - }, - "rows": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique id for option, up to 200 symbols", - "example": "1" - }, - "title": { - "type": "string", - "description": "Title of option, up to 24 symbols.", - "example": "Some option" - }, - "description": { - "type": "string", - "description": "Description of option, up to 72 symbols", - "example": "Some description" - } - }, - "required": [ - "id", - "title" - ] - } - } - }, - "required": [ - "rows" - ] - } - } - }, - "required": [ - "body", - "action", - "sections" - ] - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "SendMessageRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "body": { - "description": "Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026", - "type": "string" - } - }, - "required": [ - "body" - ] - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "SendLocationRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "lat": { - "description": "Latitude of the location. Example: 45.018337", - "type": "string", - "example": "45.018337" - }, - "lng": { - "description": "Longitude of the location. Example: -73.968285", - "type": "string", - "example": "-73.968285" - }, - "address": { - "description": "Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024", - "type": "string", - "example": "9766 Valley View St., New York, NY 10024" - }, - "name": { - "description": "Name of the location. Example: Facebook HQ", - "type": "string", - "example": "Facebook HQ" - } - }, - "required": [ - "lat", - "name", - "lng" - ] - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "SendContactRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "contacts": { - "description": "Array containing contact objects.\n\nContact object parameters:\n\n**name** - full contact name. Required. Object with properties:\n\n* formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix)\n\n* first_name - First name. Example: Adam\n\n* last_name - Last name. Example: Smith\n\n* middle_name - Middle name. Example: John\n\n* suffix - Name suffix. Example: Junior\n\n* prefix - Name prefix. Example: Lord\n\n**birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18\n\n**addresses** - array containing address objects with parameters:\n\n* street - Street number and name. Example: 1 Hacker Way\n\n* city - City name. Example: Menlo Park\n\n* state - State abbreviation. Example: CA\n\n* zip - ZIP code. Example: 94025\n\n* country - Full country name. Example: United States\n\n* country_code - Two-letter country abbreviation. Example: us\n\n* type - Standard Values: HOME, WORK. Example: HOME\n\n**emails** - array containing email objects with parameters:\n\n* email - Email address. Example: test@fb.com\n\n* type - Standard Values: HOME, WORK. Example: WORK\n\n**org** - object containing parameters:\n\n* company - Name of the contact's company. Example: WhatsApp\n\n* department - Name of the contact's department. Example: Design\n\n* title - Contact's business title. Example: Manager\n\n**phones** - array containing phone objects with parameters:\n\n* phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234\n\n* type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME\n\n* wa_id - WhatsApp ID. Example: 19405551234\n\n**urls** - array containing url objects with parameters:\n\n* url - URL. Example: https://www.facebook.com\n\n* type - Standard Values: HOME, WORK. Example: WORK\n\nExample: [{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}]", - "type": "array", - "items": { - "type": "object" - }, - "example": "[{\"addresses\":[{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"1 Hacker Way\",\"type\":\"HOME\",\"zip\":\"94025\"},{\"city\":\"Menlo Park\",\"country\":\"United States\",\"country_code\":\"us\",\"state\":\"CA\",\"street\":\"200 Jefferson Dr\",\"type\":\"WORK\",\"zip\":\"94025\"}],\"birthday\":\"2012-08-18\",\"emails\":[{\"email\":\"test@fb.com\",\"type\":\"WORK\"},{\"email\":\"test@whatsapp.com\",\"type\":\"WORK\"}],\"name\":{\"first_name\":\"John\",\"formatted_name\":\"John Smith\",\"last_name\":\"Smith\"},\"org\":{\"company\":\"WhatsApp\",\"department\":\"Design\",\"title\":\"Manager\"},\"phones\":[{\"phone\":\"+1 (940) 555-1234\",\"type\":\"HOME\"},{\"phone\":\"+1 (650) 555-1234\",\"type\":\"WORK\",\"wa_id\":\"16505551234\"}],\"urls\":[{\"url\":\"https://www.facebook.com\",\"type\":\"WORK\"}]}]" - } - }, - "required": [ - "body" - ] - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "SendMessageStatus": { - "type": "object", - "properties": { - "sent": { - "type": "boolean", - "example": true - }, - "id": { - "type": "string", - "description": "unique message id", - "example": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8" - }, - "message": { - "type": "string", - "description": "Posting status message", - "example": "Sent to 556123122026@c.us" - }, - "description": { - "type": "string", - "description": "Result description", - "example": "Message has been sent to the provider" - } - } - }, - "SendTemplateRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "Can be found by method /templates", - "example": "ca300906_cfbc_410b_99fb_dcee1t39d578" - }, - "template": { - "type": "string", - "description": "Name of template", - "example": "start" - }, - "language": { - "type": "object", - "properties": { - "policy": { - "type": "string", - "enum": [ - "deterministic" - ], - "example": "deterministic" - }, - "code": { - "$ref": "#/components/schemas/TemplateLanguageProp" - } - }, - "description": "Object, containing fields \"policy\" and \"code\".\n\n**policy** - now \"deterministic\" is only available option;\n\n**code** - one of supported language codes" - }, - "params": { - "type": "array", - "items": { - "type": "object", - "properties": { - "default": { - "type": "string", - "example": "Some title" - }, - "currency": { - "type": "object", - "properties": { - "currency_code": { - "type": "string", - "example": "USD" - }, - "amount_1000": { - "type": "integer", - "example": "100990" - } - } - }, - "date_time": { - "type": "object", - "properties": { - "component": { - "type": "object", - "properties": { - "day_of_week": { - "type": "string", - "enum": [ - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "SUNDAY", - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], - "example": "FRIDAY" - }, - "year": { - "type": "integer", - "example": 2001 - }, - "month": { - "type": "integer", - "example": 4 - }, - "day_of_month": { - "type": "integer", - "example": 13 - }, - "hour": { - "type": "integer", - "example": "17" - }, - "minute": { - "type": "integer", - "example": 20 - }, - "calendar": { - "type": "string", - "enum": [ - "GREGORIAN", - "SOLAR_HIJRI" - ], - "example": "GREGORIAN" - } - } - }, - "unix_epoch": { - "type": "object", - "properties": { - "timestamp": { - "type": "integer", - "example": 987168000 - } - } - } - } - } - } - }, - "description": "Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field:\n\n**type** - section of parameters - header, body, footer, button\n\n**parameters** - variables for section.\n\nEach variable is an object that can contain the following fields:\n\n**type** - can be text, currency, date_time, image, document or video\n\n**video**- id (mediaId)\n\n**document** \n\n* id (mediaId)\n\n* filename(optional)\n\n**image** - object with field link (image url)\n\n**currency** - object containing parameters currency_code and amount_1000.\n\n* *currency_code* - Currency code as defined in ISO 4217.\n\n* *amount_1000* - Amount multiplied by 1000.\n\n* *fallback_value* - Default text if localization fails.\n\n**date_time** - If the date_time object is used, further definition of the date and time is required.\n\n* *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in.\n\n* *unix_epoch* - The time to be displayed is dependent on the time zone the client is in.\n\n* *fallback_value* - Default text if localization fails.\n\n**button** - if button has parameter \n\n* sub_type (url/quick_reply)\n\n* parameters (array to fill button variable)\n\n* index - button position.\n\n**The number of parameters passed must match the number of parameters in the template**" - } - }, - "required": [ - "namespace", - "template", - "language" - ] - }, - { - "$ref": "#/components/schemas/TemplateNamespaceField" - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "SendProductRequest": { - "allOf": [ - { - "type": "object", - "properties": { - "action": { - "description": "Object containing info about product or catalog. Can contain the following fields:\n\n**catalog_id** - id of catalog\n\n**product_retailer_id** - id of product. Only for sending single product.\n\n**sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below.\n\nExample: {\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]}", - "type": "object", - "properties": { - "catalog_id": { - "type": "string", - "description": "id of the catalog", - "example": "407921857496983" - }, - "product_retailer_id": { - "type": "string", - "description": "id of the product", - "example": "product-1" - }, - "sections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Title of the section. Example: the-section-title", - "example": "the-section-title" - }, - "product_items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "product_retailer_id": { - "type": "string", - "description": "id of the product", - "example": "product-1" - } - } - } - } - } - } - } - }, - "example": "{\"catalog_id\":\"{{catalog_id}}\",\"sections\":[{\"title\":\"the-section-title\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"},{\"product_retailer_id\":\"{{SKU-2}}\"}]},{\"title\":\"the-section-title2\",\"product_items\":[{\"product_retailer_id\":\"{{SKU-1}}\"}]}]}" - }, - "body": { - "type": "string", - "description": "Text of message. Example: Some text.", - "example": "Some text" - }, - "footer": { - "type": "string", - "description": "Located under the message text. Example: Footer.", - "example": "Footer" - }, - "header": { - "type": "string", - "description": "Header of catalog. Example: Header.\n\n**Required when sending the catalog.**", - "example": "Header" - } - }, - "required": [ - "action" - ] - }, - { - "$ref": "#/components/schemas/ChatIdProp" - }, - { - "$ref": "#/components/schemas/PhoneProp" - } - ] - }, - "Settings": { - "type": "object", - "properties": { - "webhookUrl": { - "type": "string", - "nullable": true, - "example": "https://bin.1msg.io/1f9aj261" - } - } - }, - "Commerce": { - "type": "object", - "properties": { - "params": { - "type": "object", - "required": [ - "is_cart_enabled", - "is_catalog_visible" - ], - "properties": { - "is_cart_enabled": { - "type": "boolean", - "example": true - }, - "is_catalog_visible": { - "type": "boolean", - "example": true - } - } - } - } - }, - "GetCommerce": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "789887292550821" - }, - "is_cart_enabled": { - "type": "boolean", - "example": true - }, - "is_catalog_visible": { - "type": "boolean", - "example": true - } - } - } - }, - "SetCommerce": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - } - } - }, - "SetWebhookStatus": { - "type": "object", - "properties": { - "set": { - "type": "boolean", - "description": "Flag indicating that the current request has changed webhook", - "example": true - }, - "message": { - "type": "string", - "example": "https://bin.1msg.io/1f9aj261" - } - } - }, - "WebhookUrl": { - "type": "object", - "properties": { - "webhookUrl": { - "description": "Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io).", - "type": "string" - } - }, - "required": [ - "webhookUrl" - ] - }, - "Contacts": { - "type": "object", - "properties": { - "contacts": { - "description": "List of checked numbers", - "type": "array", - "items": { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "Sent value", - "example": "16315551000" - }, - "status": { - "type": "string", - "description": "Contacts status: \n\n*failed* - got error on processing\n\n*processing* - still not detected\n\n*invalid* - unavailable for sending\n\n*valid* - available for sending", - "example": "valid" - }, - "wa_id": { - "type": "string", - "description": "Formatted contact phone", - "example": "16315551000" - } - } - } - } - } - }, - "ContactsRequest": { - "type": "object", - "required": [ - "contacts" - ], - "properties": { - "blocking": { - "type": "string", - "description": "Operating mode:\n\n*wait* - synchronous\n\n*no_wait* - asynchronous (default)", - "example": "wait" - }, - "force_check": { - "type": "boolean", - "description": "Using cache:\n\n*true* - ignore cache\n\n*false* - use cache (default)", - "example": true - }, - "contacts": { - "type": "array", - "description": "Array of contact numbers for checking. Recommended format is +16315551001\n\nExample:\n\n[\"16315551000\",\"+1 631 555 1001\",\"6315551002\",\"+1 (631) 555-1004\",\"1-631-555-1005\"]", - "items": { - "type": "string" - }, - "example": [ - "16315551000", - "+1 631 555 1001", - "6315551002", - "+1 (631) 555-1004", - "1-631-555-1005" - ] - } - } - }, - "ReadMessageRequest": { - "allOf": [ - { - "$ref": "#/components/schemas/MessageIdProp" - } - ] - }, - "UploadMedia": { - "allOf": [ - { - "type": "object", - "properties": { - "body": { - "description": "HTTP link\n*https://...*\n\nOr base64-encoded file with mime data, for example\n*data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* \n\nFile in form-data input field", - "type": "string" - } - }, - "required": [ - "body" - ] - } - ] - }, - "MediaId": { - "type": "object", - "properties": { - "mediaId": { - "type": "string", - "example": "ed2c7be7-b779-4ba8-a17c-6722f37be2a7" - } - } - }, - "GetMessages": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "messageNumber": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "0XzkmGNn4prUAQlzsHApGNRXQ0U" - }, - "body": { - "type": "string", - "example": "Test message" - }, - "fromMe": { - "type": "boolean", - "example": true - }, - "self": { - "type": "integer", - "example": 1 - }, - "isForwarded": { - "type": "integer", - "example": 0 - }, - "author": { - "type": "string", - "example": "556123122026@c.us" - }, - "time": { - "type": "integer", - "example": 1665396610 - }, - "chatId": { - "type": "string", - "example": "556123122026@c.us" - }, - "type": { - "type": "string", - "example": "chat" - }, - "senderName": { - "type": "string", - "example": "780005553535@c.us" - }, - "caption": { - "type": "string", - "example": null - }, - "quotedMsgId": { - "type": "string", - "example": null - }, - "metadata": { - "type": "object", - "example": {} - }, - "chatName": { - "type": "string", - "example": "556123122026" - } - } - } - } - } - }, - "GetAckInfo": { - "type": "object", - "properties": { - "hooks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "gBGGeSaGViBfAgnlzOSHEwK9O6F" - }, - "type": { - "type": "string", - "example": "message" - }, - "status": { - "type": "string", - "example": "sent" - }, - "pricing": { - "type": "object", - "example": { - "billable": true, - "category": "business_initiated", - "pricing_model": "CBP" - } - }, - "timestamp": { - "type": "string", - "example": "1654864094" - }, - "conversation": { - "type": "object", - "example": { - "id": "c1f5a3a1b9ff6f2e1c43fd31543137e0", - "origin": { - "type": "business_initiated" - }, - "expiration_timestamp": 1654943940 - } - }, - "recipient_id": { - "type": "string", - "example": "556123122026" - } - } - } - } - } - } - }, - "responses": { - "AddTemplate": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTemplate" - } - } - } - }, - "channelStatistics": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/channelStatistics" - } - } - } - }, - "channelExtendedStatistics": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/channelExtendedStatistics" - } - } - } - }, - "channelStatus": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/channelStatus" - } - } - } - }, - "GetMe": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMe" - } - } - } - }, - "GetTemplates": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTemplates" - } - } - } - }, - "RemoveTemplate": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetMe" - } - } - } - }, - "SendMessageStatus": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendMessageStatus" - } - } - } - }, - "SendTemplate": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendMessageStatus" - } - } - } - }, - "SetMe": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetMe" - } - } - } - }, - "Settings": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings" - } - } - } - }, - "GetCommerce": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetCommerce" - } - } - } - }, - "SetCommerce": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetCommerce" - } - } - } - }, - "SetWebhookStatus": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetWebhookStatus" - } - } - } - }, - "Unauthorized": { - "description": "Invalid token", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Wrong token \"xxx7i1crxjxpkxxx\" for channel \"123\". Please provide token as a GET parameter." - } - } - } - } - } - }, - "UpdateSettings": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Settings" - }, - { - "type": "object", - "required": [ - "update" - ], - "properties": { - "update": { - "allOf": [ - { - "$ref": "#/components/schemas/Settings" - }, - { - "description": "An object that lists the fields changed in the request" - } - ] - } - } - } - ] - } - } - } - }, - "UploadMedia": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MediaId" - } - } - } - }, - "GetMessages": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMessages" - } - } - } - }, - "GetAckInfo": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAckInfo" - } - } - } - }, - "GetIP": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIP" - } - } - } - }, - "ReadMessage": { - "description": "Server response example", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetMe" - } - } - } - } - }, - "requestBodies": { - "Ack": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ack": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Ack" - } - } - } - } - } - } - }, - "AddTemplate": { - "required": true, - "content": { - - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTemplateRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/AddTemplateRequest" - } - } - } - }, - "Messages": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - } - } - } - } - } - } - }, - "UpdateSettings": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Settings" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Settings" - } - } - } - }, - "UpdateCommerce": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Commerce" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Commerce" - } - } - } - }, - "RemoveTemplate": { - "required": true, - "content": { - - "application/json": { - "schema": { - "$ref": "#/components/schemas/RemoveTemplateRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/RemoveTemplateRequest" - } - } - } - }, - "SendMessage": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendMessageRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendMessageRequest" - } - } - } - }, - "SendLocation": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendLocationRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendLocationRequest" - } - } - } - }, - "SendContact": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendContactRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendContactRequest" - } - } - } - }, - "SendTemplate": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendTemplateRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendTemplateRequest" - } - } - } - }, - "SendFile": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendFileRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendFileRequest" - } - } - } - }, - "SendList": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendListRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendListRequest" - } - } - } - }, - "SendProduct": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendProductRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SendProductRequest" - } - } - } - }, - "SetMe": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetMeRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SetMeRequest" - } - } - } - }, - "SetWebhook": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookUrl" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/WebhookUrl" - } - } - } - }, - "UploadMedia": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UploadMedia" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/UploadMedia" - } - } - } - }, - "ReadMessage": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReadMessageRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/ReadMessageRequest" - } - } - } - } - }, - "callbacks": { - "Messages": { - "{$request.body#/webhookUrl}": { - "post": { - "tags": [ - "Webhooks" - ], - "summary": "New message notification", - "description": "Sent on every new incoming or outgoing message to the URL specified in the settings in the field **webhookUrl**", - "operationId": "webhookMessages", - "requestBody": { - "$ref": "#/components/requestBodies/Messages" - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "Ack": { - "{$request.body#/webhookUrl}": { - "post": { - "tags": [ - "Webhooks" - ], - "summary": "Message delivery status notification", - "description": "Sent on outgoing message status updates (delivered, read) to the address set in **webhookUrl** in settings \n\nIt works only if the settings **webhookUrl** and **ackNotificationsOn**", - "operationId": "webhookAck", - "requestBody": { - "$ref": "#/components/requestBodies/Ack" - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - } - } - } -} diff --git a/typescript-fetch/.openapi-generator-ignore b/typescript-fetch/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/typescript-fetch/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/typescript-fetch/.openapi-generator/FILES b/typescript-fetch/.openapi-generator/FILES deleted file mode 100644 index 135aeed..0000000 --- a/typescript-fetch/.openapi-generator/FILES +++ /dev/null @@ -1,76 +0,0 @@ -.gitignore -.npmignore -README.md -package.json -src/apis/ChannelApi.ts -src/apis/MediaApi.ts -src/apis/MessagingApi.ts -src/apis/ProductsCatalogsApi.ts -src/apis/TemplatesApi.ts -src/apis/WebhooksApi.ts -src/apis/index.ts -src/index.ts -src/models/Ack.ts -src/models/AddTemplateRequest.ts -src/models/ChannelExtendedStatisticsInner.ts -src/models/ChannelStatistics.ts -src/models/ChannelStatus.ts -src/models/ChatIdProp.ts -src/models/Commerce.ts -src/models/CommerceParams.ts -src/models/Contacts.ts -src/models/ContactsContactsInner.ts -src/models/ContactsRequest.ts -src/models/GetAckInfo.ts -src/models/GetAckInfoHooksInner.ts -src/models/GetCommerceInner.ts -src/models/GetIP.ts -src/models/GetMe.ts -src/models/GetMe401Response.ts -src/models/GetMessages.ts -src/models/GetMessagesMessagesInner.ts -src/models/GetTemplates.ts -src/models/GetTemplatesTemplatesInner.ts -src/models/MeComponents.ts -src/models/MediaId.ts -src/models/Message.ts -src/models/MessageIdProp.ts -src/models/PhoneProp.ts -src/models/ReadMessageRequest.ts -src/models/RemoveTemplateRequest.ts -src/models/SendContactRequest.ts -src/models/SendFileRequest.ts -src/models/SendListRequest.ts -src/models/SendListRequestAllOfRows.ts -src/models/SendListRequestAllOfSections.ts -src/models/SendLocationRequest.ts -src/models/SendMessageRequest.ts -src/models/SendMessageStatus.ts -src/models/SendProductRequest.ts -src/models/SendProductRequestAllOfAction.ts -src/models/SendProductRequestAllOfActionProductItems.ts -src/models/SendProductRequestAllOfActionSections.ts -src/models/SendTemplateRequest.ts -src/models/SendTemplateRequestAllOfCurrency.ts -src/models/SendTemplateRequestAllOfDateTime.ts -src/models/SendTemplateRequestAllOfDateTimeComponent.ts -src/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts -src/models/SendTemplateRequestAllOfLanguage.ts -src/models/SendTemplateRequestAllOfParams.ts -src/models/SetCommerce.ts -src/models/SetMe.ts -src/models/SetMeRequest.ts -src/models/SetSettings200Response.ts -src/models/SetSettings200ResponseAllOfUpdate.ts -src/models/SetWebhookStatus.ts -src/models/Settings.ts -src/models/TemplateCategoryProp.ts -src/models/TemplateComponentsPropInner.ts -src/models/TemplateComponentsPropInnerButtonsInner.ts -src/models/TemplateLanguageProp.ts -src/models/TemplateNamespaceField.ts -src/models/UploadMedia.ts -src/models/WebhookUrl.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/typescript-fetch/.openapi-generator/VERSION b/typescript-fetch/.openapi-generator/VERSION deleted file mode 100644 index 73a86b1..0000000 --- a/typescript-fetch/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.1 \ No newline at end of file diff --git a/typescript-fetch/README.md b/typescript-fetch/README.md deleted file mode 100644 index 42d510a..0000000 --- a/typescript-fetch/README.md +++ /dev/null @@ -1,71 +0,0 @@ -## one_msg_waba_sdk_ts@2.39.4 - -OneMsgWabaSdk - TypeScript client for one_msg_waba_sdk_ts -[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. - -Every API request must contain an Authorize HTTP header with a token. -This is your channel token, which can be found in your channel project on your profile page. -Please do not give the token to anyone or post it publicly. - -The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). -Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. - -All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail -This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -Environment -* Node.js -* Webpack -* Browserify - -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) - -### Building - -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build -``` - -## Installation - -#### npm -install it via: - -```shell -npm install one_msg_waba_sdk_ts --save -``` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following code: - -```typescript -import * as OneMsgWabaSdk from 'one_msg_waba_sdk_ts' - -OneMsgWabaSdk.DefaultConfig.config = { - basePath: 'https://api.1msg.io/YOUR_INSTANCE_NUMBER/', // override base path - apiKey: 'YOUR_TOKEN_KEY_FOR_INSTANCE' // parameter for apiKey security -} - -let channelApi = new OneMsgWabaSdk.ChannelApi() -channelApi.getMe().then(function (data) { - console.log('API called successfully. Returned data: ', data); -}, function (error) { - console.error(error); -}); - -``` - -## Documentation -For better understanding of parameters you can refer to our [Documentation](https://docs.1msg.io/) - diff --git a/typescript-fetch/apis/ChannelApi.ts b/typescript-fetch/apis/ChannelApi.ts deleted file mode 100644 index 1b13687..0000000 --- a/typescript-fetch/apis/ChannelApi.ts +++ /dev/null @@ -1,378 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ChannelExtendedStatisticsInner, - ChannelStatistics, - ChannelStatus, - GetCommerceInner, - GetIP, - GetMe, - GetMe401Response, - SetMe, - SetMeRequest, - SetSettings200Response, - Settings, -} from '../models/index'; -import { - ChannelExtendedStatisticsInnerFromJSON, - ChannelExtendedStatisticsInnerToJSON, - ChannelStatisticsFromJSON, - ChannelStatisticsToJSON, - ChannelStatusFromJSON, - ChannelStatusToJSON, - GetCommerceInnerFromJSON, - GetCommerceInnerToJSON, - GetIPFromJSON, - GetIPToJSON, - GetMeFromJSON, - GetMeToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - SetMeFromJSON, - SetMeToJSON, - SetMeRequestFromJSON, - SetMeRequestToJSON, - SetSettings200ResponseFromJSON, - SetSettings200ResponseToJSON, - SettingsFromJSON, - SettingsToJSON, -} from '../models/index'; - -export interface GetStatisticsRequest { - date?: string; -} - -export interface SetMeOperationRequest { - setMeRequest: SetMeRequest; -} - -export interface SetSettingsRequest { - settings: Settings; -} - -/** - * - */ -export class ChannelApi extends runtime.BaseAPI { - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Get Commerce Settings - */ - async getCommerceRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/commerce`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetCommerceInnerFromJSON)); - } - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Get Commerce Settings - */ - async getCommerce(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getCommerceRaw(initOverrides); - return await response.value(); - } - - /** - * Get channel usage extended statistics - * Get Extended Channel statistics - */ - async getExtendedStatisticsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/extendedStatistics`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChannelExtendedStatisticsInnerFromJSON)); - } - - /** - * Get channel usage extended statistics - * Get Extended Channel statistics - */ - async getExtendedStatistics(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getExtendedStatisticsRaw(initOverrides); - return await response.value(); - } - - /** - * Use this edge to retrieve your profile\'s About info - * Get Profile Info - */ - async getMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/me`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetMeFromJSON(jsonValue)); - } - - /** - * Use this edge to retrieve your profile\'s About info - * Get Profile Info - */ - async getMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMeRaw(initOverrides); - return await response.value(); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Get Settings - */ - async getSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/settings`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SettingsFromJSON(jsonValue)); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Get Settings - */ - async getSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSettingsRaw(initOverrides); - return await response.value(); - } - - /** - * Get channel usage statistics - * Get Channel statistics - */ - async getStatisticsRaw(requestParameters: GetStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.date !== undefined) { - queryParameters['date'] = requestParameters.date; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/statistics`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ChannelStatisticsFromJSON(jsonValue)); - } - - /** - * Get channel usage statistics - * Get Channel statistics - */ - async getStatistics(requestParameters: GetStatisticsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatisticsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * Get Status - */ - async getStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/status`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ChannelStatusFromJSON(jsonValue)); - } - - /** - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * Get Status - */ - async getStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatusRaw(initOverrides); - return await response.value(); - } - - /** - * - * Get channel server IP - */ - async outputIPRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/outputIP`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetIPFromJSON(jsonValue)); - } - - /** - * - * Get channel server IP - */ - async outputIP(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.outputIPRaw(initOverrides); - return await response.value(); - } - - /** - * Change user info - * Change user info - */ - async setMeRaw(requestParameters: SetMeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.setMeRequest === null || requestParameters.setMeRequest === undefined) { - throw new runtime.RequiredError('setMeRequest','Required parameter requestParameters.setMeRequest was null or undefined when calling setMe.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/me`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SetMeRequestToJSON(requestParameters.setMeRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetMeFromJSON(jsonValue)); - } - - /** - * Change user info - * Change user info - */ - async setMe(requestParameters: SetMeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setMeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Set settings - */ - async setSettingsRaw(requestParameters: SetSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.settings === null || requestParameters.settings === undefined) { - throw new runtime.RequiredError('settings','Required parameter requestParameters.settings was null or undefined when calling setSettings.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/settings`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SettingsToJSON(requestParameters.settings), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetSettings200ResponseFromJSON(jsonValue)); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Set settings - */ - async setSettings(requestParameters: SetSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setSettingsRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/apis/MediaApi.ts b/typescript-fetch/apis/MediaApi.ts deleted file mode 100644 index 96a2161..0000000 --- a/typescript-fetch/apis/MediaApi.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - MediaId, - UploadMedia, -} from '../models/index'; -import { - MediaIdFromJSON, - MediaIdToJSON, - UploadMediaFromJSON, - UploadMediaToJSON, -} from '../models/index'; - -export interface UploadMediaRequest { - uploadMedia: UploadMedia; -} - -/** - * - */ -export class MediaApi extends runtime.BaseAPI { - - /** - * Upload media and get mediaId. Uploaded media can be sent in template - * Upload media & get mediaId - */ - async uploadMediaRaw(requestParameters: UploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.uploadMedia === null || requestParameters.uploadMedia === undefined) { - throw new runtime.RequiredError('uploadMedia','Required parameter requestParameters.uploadMedia was null or undefined when calling uploadMedia.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/uploadMedia`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: UploadMediaToJSON(requestParameters.uploadMedia), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => MediaIdFromJSON(jsonValue)); - } - - /** - * Upload media and get mediaId. Uploaded media can be sent in template - * Upload media & get mediaId - */ - async uploadMedia(requestParameters: UploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.uploadMediaRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/apis/MessagingApi.ts b/typescript-fetch/apis/MessagingApi.ts deleted file mode 100644 index 2fd7770..0000000 --- a/typescript-fetch/apis/MessagingApi.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - GetMe401Response, - GetMessages, - ReadMessageRequest, - SendContactRequest, - SendFileRequest, - SendListRequest, - SendLocationRequest, - SendMessageRequest, - SendMessageStatus, - SetMe, -} from '../models/index'; -import { - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - GetMessagesFromJSON, - GetMessagesToJSON, - ReadMessageRequestFromJSON, - ReadMessageRequestToJSON, - SendContactRequestFromJSON, - SendContactRequestToJSON, - SendFileRequestFromJSON, - SendFileRequestToJSON, - SendListRequestFromJSON, - SendListRequestToJSON, - SendLocationRequestFromJSON, - SendLocationRequestToJSON, - SendMessageRequestFromJSON, - SendMessageRequestToJSON, - SendMessageStatusFromJSON, - SendMessageStatusToJSON, - SetMeFromJSON, - SetMeToJSON, -} from '../models/index'; - -export interface MessagesListRequest { - last?: boolean; - lastMessageNumber?: number; - firstMessageNumber?: number; - limit?: number; - chatId?: string; - minTime?: number; - maxTime?: number; - msgId?: string; -} - -export interface ReadMessageOperationRequest { - readMessageRequest?: ReadMessageRequest; -} - -export interface SendContactOperationRequest { - sendContactRequest: SendContactRequest; -} - -export interface SendFileOperationRequest { - sendFileRequest: SendFileRequest; -} - -export interface SendListOperationRequest { - sendListRequest: SendListRequest; -} - -export interface SendLocationOperationRequest { - sendLocationRequest: SendLocationRequest; -} - -export interface SendMessageOperationRequest { - sendMessageRequest: SendMessageRequest; -} - -/** - * - */ -export class MessagingApi extends runtime.BaseAPI { - - /** - * - * Get messages list - */ - async messagesListRaw(requestParameters: MessagesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.last !== undefined) { - queryParameters['last'] = requestParameters.last; - } - - if (requestParameters.lastMessageNumber !== undefined) { - queryParameters['lastMessageNumber'] = requestParameters.lastMessageNumber; - } - - if (requestParameters.firstMessageNumber !== undefined) { - queryParameters['firstMessageNumber'] = requestParameters.firstMessageNumber; - } - - if (requestParameters.limit !== undefined) { - queryParameters['limit'] = requestParameters.limit; - } - - if (requestParameters.chatId !== undefined) { - queryParameters['chatId'] = requestParameters.chatId; - } - - if (requestParameters.minTime !== undefined) { - queryParameters['min_time'] = requestParameters.minTime; - } - - if (requestParameters.maxTime !== undefined) { - queryParameters['max_time'] = requestParameters.maxTime; - } - - if (requestParameters.msgId !== undefined) { - queryParameters['msgId'] = requestParameters.msgId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/messages`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetMessagesFromJSON(jsonValue)); - } - - /** - * - * Get messages list - */ - async messagesList(requestParameters: MessagesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.messagesListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * Mark message as read - */ - async readMessageRaw(requestParameters: ReadMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/readMessage`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ReadMessageRequestToJSON(requestParameters.readMessageRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetMeFromJSON(jsonValue)); - } - - /** - * - * Mark message as read - */ - async readMessage(requestParameters: ReadMessageOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.readMessageRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Contact - */ - async sendContactRaw(requestParameters: SendContactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendContactRequest === null || requestParameters.sendContactRequest === undefined) { - throw new runtime.RequiredError('sendContactRequest','Required parameter requestParameters.sendContactRequest was null or undefined when calling sendContact.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendContact`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendContactRequestToJSON(requestParameters.sendContactRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Contact - */ - async sendContact(requestParameters: SendContactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendContactRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a File - */ - async sendFileRaw(requestParameters: SendFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendFileRequest === null || requestParameters.sendFileRequest === undefined) { - throw new runtime.RequiredError('sendFileRequest','Required parameter requestParameters.sendFileRequest was null or undefined when calling sendFile.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendFile`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendFileRequestToJSON(requestParameters.sendFileRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a File - */ - async sendFile(requestParameters: SendFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendFileRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send List Message - */ - async sendListRaw(requestParameters: SendListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendListRequest === null || requestParameters.sendListRequest === undefined) { - throw new runtime.RequiredError('sendListRequest','Required parameter requestParameters.sendListRequest was null or undefined when calling sendList.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendList`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendListRequestToJSON(requestParameters.sendListRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send List Message - */ - async sendList(requestParameters: SendListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Location - */ - async sendLocationRaw(requestParameters: SendLocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendLocationRequest === null || requestParameters.sendLocationRequest === undefined) { - throw new runtime.RequiredError('sendLocationRequest','Required parameter requestParameters.sendLocationRequest was null or undefined when calling sendLocation.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendLocation`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendLocationRequestToJSON(requestParameters.sendLocationRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Location - */ - async sendLocation(requestParameters: SendLocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendLocationRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Message - */ - async sendMessageRaw(requestParameters: SendMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendMessageRequest === null || requestParameters.sendMessageRequest === undefined) { - throw new runtime.RequiredError('sendMessageRequest','Required parameter requestParameters.sendMessageRequest was null or undefined when calling sendMessage.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendMessage`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendMessageRequestToJSON(requestParameters.sendMessageRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Message - */ - async sendMessage(requestParameters: SendMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendMessageRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/apis/ProductsCatalogsApi.ts b/typescript-fetch/apis/ProductsCatalogsApi.ts deleted file mode 100644 index afec427..0000000 --- a/typescript-fetch/apis/ProductsCatalogsApi.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Commerce, - GetMe401Response, - SendMessageStatus, - SendProductRequest, - SetCommerce, -} from '../models/index'; -import { - CommerceFromJSON, - CommerceToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - SendMessageStatusFromJSON, - SendMessageStatusToJSON, - SendProductRequestFromJSON, - SendProductRequestToJSON, - SetCommerceFromJSON, - SetCommerceToJSON, -} from '../models/index'; - -export interface SendProductOperationRequest { - sendProductRequest: SendProductRequest; -} - -export interface SetCommerceRequest { - commerce: Commerce; -} - -/** - * - */ -export class ProductsCatalogsApi extends runtime.BaseAPI { - - /** - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * Send a Product - */ - async sendProductRaw(requestParameters: SendProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendProductRequest === null || requestParameters.sendProductRequest === undefined) { - throw new runtime.RequiredError('sendProductRequest','Required parameter requestParameters.sendProductRequest was null or undefined when calling sendProduct.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendProduct`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendProductRequestToJSON(requestParameters.sendProductRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * Send a Product - */ - async sendProduct(requestParameters: SendProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendProductRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Set Commerce Settings - */ - async setCommerceRaw(requestParameters: SetCommerceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.commerce === null || requestParameters.commerce === undefined) { - throw new runtime.RequiredError('commerce','Required parameter requestParameters.commerce was null or undefined when calling setCommerce.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/commerce`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CommerceToJSON(requestParameters.commerce), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetCommerceFromJSON(jsonValue)); - } - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Set Commerce Settings - */ - async setCommerce(requestParameters: SetCommerceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setCommerceRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/apis/TemplatesApi.ts b/typescript-fetch/apis/TemplatesApi.ts deleted file mode 100644 index 7f84b7d..0000000 --- a/typescript-fetch/apis/TemplatesApi.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - AddTemplateRequest, - GetMe401Response, - GetTemplates, - RemoveTemplateRequest, - SendMessageStatus, - SendTemplateRequest, - SetMe, -} from '../models/index'; -import { - AddTemplateRequestFromJSON, - AddTemplateRequestToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - GetTemplatesFromJSON, - GetTemplatesToJSON, - RemoveTemplateRequestFromJSON, - RemoveTemplateRequestToJSON, - SendMessageStatusFromJSON, - SendMessageStatusToJSON, - SendTemplateRequestFromJSON, - SendTemplateRequestToJSON, - SetMeFromJSON, - SetMeToJSON, -} from '../models/index'; - -export interface AddTemplateOperationRequest { - addTemplateRequest: AddTemplateRequest; -} - -export interface RemoveTemplateOperationRequest { - removeTemplateRequest: RemoveTemplateRequest; -} - -export interface SendTemplateOperationRequest { - sendTemplateRequest: SendTemplateRequest; -} - -/** - * - */ -export class TemplatesApi extends runtime.BaseAPI { - - /** - * Create new template for sending. - * Create template - */ - async addTemplateRaw(requestParameters: AddTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.addTemplateRequest === null || requestParameters.addTemplateRequest === undefined) { - throw new runtime.RequiredError('addTemplateRequest','Required parameter requestParameters.addTemplateRequest was null or undefined when calling addTemplate.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/addTemplate`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AddTemplateRequestToJSON(requestParameters.addTemplateRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Create new template for sending. - * Create template - */ - async addTemplate(requestParameters: AddTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addTemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Deleted template can not be restored. - * Remove template - */ - async removeTemplateRaw(requestParameters: RemoveTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.removeTemplateRequest === null || requestParameters.removeTemplateRequest === undefined) { - throw new runtime.RequiredError('removeTemplateRequest','Required parameter requestParameters.removeTemplateRequest was null or undefined when calling removeTemplate.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/removeTemplate`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RemoveTemplateRequestToJSON(requestParameters.removeTemplateRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetMeFromJSON(jsonValue)); - } - - /** - * Deleted template can not be restored. - * Remove template - */ - async removeTemplate(requestParameters: RemoveTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.removeTemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * Send Template Message - */ - async sendTemplateRaw(requestParameters: SendTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendTemplateRequest === null || requestParameters.sendTemplateRequest === undefined) { - throw new runtime.RequiredError('sendTemplateRequest','Required parameter requestParameters.sendTemplateRequest was null or undefined when calling sendTemplate.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendTemplate`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendTemplateRequestToJSON(requestParameters.sendTemplateRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * Send Template Message - */ - async sendTemplate(requestParameters: SendTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendTemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * Get templates list - */ - async templatesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/templates`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetTemplatesFromJSON(jsonValue)); - } - - /** - * - * Get templates list - */ - async templatesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.templatesListRaw(initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/apis/WebhooksApi.ts b/typescript-fetch/apis/WebhooksApi.ts deleted file mode 100644 index e2b222a..0000000 --- a/typescript-fetch/apis/WebhooksApi.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - GetAckInfo, - GetMe401Response, - SetWebhookStatus, - WebhookUrl, -} from '../models/index'; -import { - GetAckInfoFromJSON, - GetAckInfoToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - SetWebhookStatusFromJSON, - SetWebhookStatusToJSON, - WebhookUrlFromJSON, - WebhookUrlToJSON, -} from '../models/index'; - -export interface AckHookInfoRequest { - messageId: string; -} - -export interface SetWebhookRequest { - webhookUrl: WebhookUrl; -} - -/** - * - */ -export class WebhooksApi extends runtime.BaseAPI { - - /** - * - * Check ACKs - */ - async ackHookInfoRaw(requestParameters: AckHookInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.messageId === null || requestParameters.messageId === undefined) { - throw new runtime.RequiredError('messageId','Required parameter requestParameters.messageId was null or undefined when calling ackHookInfo.'); - } - - const queryParameters: any = {}; - - if (requestParameters.messageId !== undefined) { - queryParameters['messageId'] = requestParameters.messageId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/hookInfo`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetAckInfoFromJSON(jsonValue)); - } - - /** - * - * Check ACKs - */ - async ackHookInfo(requestParameters: AckHookInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.ackHookInfoRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * Set webhook - */ - async setWebhookRaw(requestParameters: SetWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.webhookUrl === null || requestParameters.webhookUrl === undefined) { - throw new runtime.RequiredError('webhookUrl','Required parameter requestParameters.webhookUrl was null or undefined when calling setWebhook.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-www-form-urlencoded'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/webhook`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: WebhookUrlToJSON(requestParameters.webhookUrl), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetWebhookStatusFromJSON(jsonValue)); - } - - /** - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * Set webhook - */ - async setWebhook(requestParameters: SetWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setWebhookRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/apis/index.ts b/typescript-fetch/apis/index.ts deleted file mode 100644 index 43034e7..0000000 --- a/typescript-fetch/apis/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './ChannelApi'; -export * from './MediaApi'; -export * from './MessagingApi'; -export * from './ProductsCatalogsApi'; -export * from './TemplatesApi'; -export * from './WebhooksApi'; diff --git a/typescript-fetch/models/Ack.ts b/typescript-fetch/models/Ack.ts deleted file mode 100644 index 307fe28..0000000 --- a/typescript-fetch/models/Ack.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface Ack - */ -export interface Ack { - /** - * unique id of message - * @type {string} - * @memberof Ack - */ - id?: string; - /** - * chat ID - * @type {string} - * @memberof Ack - */ - chatId?: string; - /** - * type of the message status - * @type {string} - * @memberof Ack - */ - status?: AckStatusEnum; -} - - -/** - * @export - */ -export const AckStatusEnum = { - Delivered: 'delivered', - Viewed: 'viewed', - Sent: 'sent' -} as const; -export type AckStatusEnum = typeof AckStatusEnum[keyof typeof AckStatusEnum]; - - -/** - * Check if a given object implements the Ack interface. - */ -export function instanceOfAck(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function AckFromJSON(json: any): Ack { - return AckFromJSONTyped(json, false); -} - -export function AckFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ack { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function AckToJSON(value?: Ack | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'chatId': value.chatId, - 'status': value.status, - }; -} - diff --git a/typescript-fetch/models/AddTemplateRequest.ts b/typescript-fetch/models/AddTemplateRequest.ts deleted file mode 100644 index d3dbbf9..0000000 --- a/typescript-fetch/models/AddTemplateRequest.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateCategoryProp } from './TemplateCategoryProp'; -import { - TemplateCategoryPropFromJSON, - TemplateCategoryPropFromJSONTyped, - TemplateCategoryPropToJSON, -} from './TemplateCategoryProp'; -import type { TemplateComponentsPropInner } from './TemplateComponentsPropInner'; -import { - TemplateComponentsPropInnerFromJSON, - TemplateComponentsPropInnerFromJSONTyped, - TemplateComponentsPropInnerToJSON, -} from './TemplateComponentsPropInner'; -import type { TemplateLanguageProp } from './TemplateLanguageProp'; -import { - TemplateLanguagePropFromJSON, - TemplateLanguagePropFromJSONTyped, - TemplateLanguagePropToJSON, -} from './TemplateLanguageProp'; - -/** - * - * @export - * @interface AddTemplateRequest - */ -export interface AddTemplateRequest { - /** - * Name of template - * @type {string} - * @memberof AddTemplateRequest - */ - name?: string; - /** - * - * @type {TemplateCategoryProp} - * @memberof AddTemplateRequest - */ - category?: TemplateCategoryProp; - /** - * Array of template components - * @type {Array} - * @memberof AddTemplateRequest - */ - components?: Array; - /** - * - * @type {TemplateLanguageProp} - * @memberof AddTemplateRequest - */ - language?: TemplateLanguageProp; -} - -/** - * Check if a given object implements the AddTemplateRequest interface. - */ -export function instanceOfAddTemplateRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function AddTemplateRequestFromJSON(json: any): AddTemplateRequest { - return AddTemplateRequestFromJSONTyped(json, false); -} - -export function AddTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddTemplateRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': !exists(json, 'name') ? undefined : json['name'], - 'category': !exists(json, 'category') ? undefined : TemplateCategoryPropFromJSON(json['category']), - 'components': !exists(json, 'components') ? undefined : ((json['components'] as Array).map(TemplateComponentsPropInnerFromJSON)), - 'language': !exists(json, 'language') ? undefined : TemplateLanguagePropFromJSON(json['language']), - }; -} - -export function AddTemplateRequestToJSON(value?: AddTemplateRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'category': TemplateCategoryPropToJSON(value.category), - 'components': value.components === undefined ? undefined : ((value.components as Array).map(TemplateComponentsPropInnerToJSON)), - 'language': TemplateLanguagePropToJSON(value.language), - }; -} - diff --git a/typescript-fetch/models/ChannelExtendedStatistics.ts b/typescript-fetch/models/ChannelExtendedStatistics.ts deleted file mode 100644 index 0b47250..0000000 --- a/typescript-fetch/models/ChannelExtendedStatistics.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ChannelExtendedStatisticsInner } from './ChannelExtendedStatisticsInner'; -import { - ChannelExtendedStatisticsInnerFromJSON, - ChannelExtendedStatisticsInnerFromJSONTyped, - ChannelExtendedStatisticsInnerToJSON, -} from './ChannelExtendedStatisticsInner'; - -/** - * - * @export - * @interface ChannelExtendedStatistics - */ -export interface ChannelExtendedStatistics extends Array { -} - -/** - * Check if a given object implements the ChannelExtendedStatistics interface. - */ -export function instanceOfChannelExtendedStatistics(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelExtendedStatisticsFromJSON(json: any): ChannelExtendedStatistics { - return ChannelExtendedStatisticsFromJSONTyped(json, false); -} - -export function ChannelExtendedStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelExtendedStatistics { - return json; -} - -export function ChannelExtendedStatisticsToJSON(value?: ChannelExtendedStatistics | null): any { - return value; -} - diff --git a/typescript-fetch/models/ChannelExtendedStatisticsInner.ts b/typescript-fetch/models/ChannelExtendedStatisticsInner.ts deleted file mode 100644 index 9e6c551..0000000 --- a/typescript-fetch/models/ChannelExtendedStatisticsInner.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ChannelExtendedStatisticsInner - */ -export interface ChannelExtendedStatisticsInner { - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - businessInitiatedPaidQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - businessInitiatedPrice?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - businessInitiatedQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - freeEntryPoint?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - freeQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - freeTier?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - paidQuantity?: number; - /** - * - * @type {string} - * @memberof ChannelExtendedStatisticsInner - */ - periodDate?: string; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - quantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - totalPrice?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - userInitiatedPaidQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - userInitiatedPrice?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - userInitiatedQuantity?: number; -} - -/** - * Check if a given object implements the ChannelExtendedStatisticsInner interface. - */ -export function instanceOfChannelExtendedStatisticsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelExtendedStatisticsInnerFromJSON(json: any): ChannelExtendedStatisticsInner { - return ChannelExtendedStatisticsInnerFromJSONTyped(json, false); -} - -export function ChannelExtendedStatisticsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelExtendedStatisticsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'businessInitiatedPaidQuantity': !exists(json, 'business_initiated_paid_quantity') ? undefined : json['business_initiated_paid_quantity'], - 'businessInitiatedPrice': !exists(json, 'business_initiated_price') ? undefined : json['business_initiated_price'], - 'businessInitiatedQuantity': !exists(json, 'business_initiated_quantity') ? undefined : json['business_initiated_quantity'], - 'freeEntryPoint': !exists(json, 'free_entry_point') ? undefined : json['free_entry_point'], - 'freeQuantity': !exists(json, 'free_quantity') ? undefined : json['free_quantity'], - 'freeTier': !exists(json, 'free_tier') ? undefined : json['free_tier'], - 'paidQuantity': !exists(json, 'paid_quantity') ? undefined : json['paid_quantity'], - 'periodDate': !exists(json, 'period_date') ? undefined : json['period_date'], - 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], - 'totalPrice': !exists(json, 'total_price') ? undefined : json['total_price'], - 'userInitiatedPaidQuantity': !exists(json, 'user_initiated_paid_quantity') ? undefined : json['user_initiated_paid_quantity'], - 'userInitiatedPrice': !exists(json, 'user_initiated_price') ? undefined : json['user_initiated_price'], - 'userInitiatedQuantity': !exists(json, 'user_initiated_quantity') ? undefined : json['user_initiated_quantity'], - }; -} - -export function ChannelExtendedStatisticsInnerToJSON(value?: ChannelExtendedStatisticsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'business_initiated_paid_quantity': value.businessInitiatedPaidQuantity, - 'business_initiated_price': value.businessInitiatedPrice, - 'business_initiated_quantity': value.businessInitiatedQuantity, - 'free_entry_point': value.freeEntryPoint, - 'free_quantity': value.freeQuantity, - 'free_tier': value.freeTier, - 'paid_quantity': value.paidQuantity, - 'period_date': value.periodDate, - 'quantity': value.quantity, - 'total_price': value.totalPrice, - 'user_initiated_paid_quantity': value.userInitiatedPaidQuantity, - 'user_initiated_price': value.userInitiatedPrice, - 'user_initiated_quantity': value.userInitiatedQuantity, - }; -} - diff --git a/typescript-fetch/models/ChannelStatistics.ts b/typescript-fetch/models/ChannelStatistics.ts deleted file mode 100644 index c817b1b..0000000 --- a/typescript-fetch/models/ChannelStatistics.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ChannelStatistics - */ -export interface ChannelStatistics { - /** - * - * @type {string} - * @memberof ChannelStatistics - */ - date?: string; - /** - * - * @type {number} - * @memberof ChannelStatistics - */ - templatesCost?: number; -} - -/** - * Check if a given object implements the ChannelStatistics interface. - */ -export function instanceOfChannelStatistics(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelStatisticsFromJSON(json: any): ChannelStatistics { - return ChannelStatisticsFromJSONTyped(json, false); -} - -export function ChannelStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelStatistics { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'date': !exists(json, 'date') ? undefined : json['date'], - 'templatesCost': !exists(json, 'templates_cost') ? undefined : json['templates_cost'], - }; -} - -export function ChannelStatisticsToJSON(value?: ChannelStatistics | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'date': value.date, - 'templates_cost': value.templatesCost, - }; -} - diff --git a/typescript-fetch/models/ChannelStatus.ts b/typescript-fetch/models/ChannelStatus.ts deleted file mode 100644 index 3d62e28..0000000 --- a/typescript-fetch/models/ChannelStatus.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ChannelStatus - */ -export interface ChannelStatus { - /** - * channel Status - * @type {string} - * @memberof ChannelStatus - */ - status?: ChannelStatusStatusEnum; -} - - -/** - * @export - */ -export const ChannelStatusStatusEnum = { - Connected: 'connected', - Connecting: 'connecting', - Disconnected: 'disconnected', - Uninitialized: 'uninitialized', - Unregistered: 'unregistered' -} as const; -export type ChannelStatusStatusEnum = typeof ChannelStatusStatusEnum[keyof typeof ChannelStatusStatusEnum]; - - -/** - * Check if a given object implements the ChannelStatus interface. - */ -export function instanceOfChannelStatus(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelStatusFromJSON(json: any): ChannelStatus { - return ChannelStatusFromJSONTyped(json, false); -} - -export function ChannelStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelStatus { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function ChannelStatusToJSON(value?: ChannelStatus | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'status': value.status, - }; -} - diff --git a/typescript-fetch/models/Commerce.ts b/typescript-fetch/models/Commerce.ts deleted file mode 100644 index eaad4c6..0000000 --- a/typescript-fetch/models/Commerce.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CommerceParams } from './CommerceParams'; -import { - CommerceParamsFromJSON, - CommerceParamsFromJSONTyped, - CommerceParamsToJSON, -} from './CommerceParams'; - -/** - * - * @export - * @interface Commerce - */ -export interface Commerce { - /** - * - * @type {CommerceParams} - * @memberof Commerce - */ - params?: CommerceParams; -} - -/** - * Check if a given object implements the Commerce interface. - */ -export function instanceOfCommerce(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function CommerceFromJSON(json: any): Commerce { - return CommerceFromJSONTyped(json, false); -} - -export function CommerceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Commerce { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'params': !exists(json, 'params') ? undefined : CommerceParamsFromJSON(json['params']), - }; -} - -export function CommerceToJSON(value?: Commerce | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'params': CommerceParamsToJSON(value.params), - }; -} - diff --git a/typescript-fetch/models/CommerceParams.ts b/typescript-fetch/models/CommerceParams.ts deleted file mode 100644 index a203e19..0000000 --- a/typescript-fetch/models/CommerceParams.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CommerceParams - */ -export interface CommerceParams { - /** - * - * @type {boolean} - * @memberof CommerceParams - */ - isCartEnabled: boolean; - /** - * - * @type {boolean} - * @memberof CommerceParams - */ - isCatalogVisible: boolean; -} - -/** - * Check if a given object implements the CommerceParams interface. - */ -export function instanceOfCommerceParams(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "isCartEnabled" in value; - isInstance = isInstance && "isCatalogVisible" in value; - - return isInstance; -} - -export function CommerceParamsFromJSON(json: any): CommerceParams { - return CommerceParamsFromJSONTyped(json, false); -} - -export function CommerceParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceParams { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'isCartEnabled': json['is_cart_enabled'], - 'isCatalogVisible': json['is_catalog_visible'], - }; -} - -export function CommerceParamsToJSON(value?: CommerceParams | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'is_cart_enabled': value.isCartEnabled, - 'is_catalog_visible': value.isCatalogVisible, - }; -} - diff --git a/typescript-fetch/models/Contacts.ts b/typescript-fetch/models/Contacts.ts deleted file mode 100644 index 7b0b8bd..0000000 --- a/typescript-fetch/models/Contacts.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ContactsContactsInner } from './ContactsContactsInner'; -import { - ContactsContactsInnerFromJSON, - ContactsContactsInnerFromJSONTyped, - ContactsContactsInnerToJSON, -} from './ContactsContactsInner'; - -/** - * - * @export - * @interface Contacts - */ -export interface Contacts { - /** - * List of checked numbers - * @type {Array} - * @memberof Contacts - */ - contacts?: Array; -} - -/** - * Check if a given object implements the Contacts interface. - */ -export function instanceOfContacts(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ContactsFromJSON(json: any): Contacts { - return ContactsFromJSONTyped(json, false); -} - -export function ContactsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Contacts { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'contacts': !exists(json, 'contacts') ? undefined : ((json['contacts'] as Array).map(ContactsContactsInnerFromJSON)), - }; -} - -export function ContactsToJSON(value?: Contacts | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'contacts': value.contacts === undefined ? undefined : ((value.contacts as Array).map(ContactsContactsInnerToJSON)), - }; -} - diff --git a/typescript-fetch/models/ContactsContactsInner.ts b/typescript-fetch/models/ContactsContactsInner.ts deleted file mode 100644 index b1b766e..0000000 --- a/typescript-fetch/models/ContactsContactsInner.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ContactsContactsInner - */ -export interface ContactsContactsInner { - /** - * Sent value - * @type {string} - * @memberof ContactsContactsInner - */ - input?: string; - /** - * Contacts status: - * - * *failed* - got error on processing - * - * *processing* - still not detected - * - * *invalid* - unavailable for sending - * - * *valid* - available for sending - * @type {string} - * @memberof ContactsContactsInner - */ - status?: string; - /** - * Formatted contact phone - * @type {string} - * @memberof ContactsContactsInner - */ - waId?: string; -} - -/** - * Check if a given object implements the ContactsContactsInner interface. - */ -export function instanceOfContactsContactsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ContactsContactsInnerFromJSON(json: any): ContactsContactsInner { - return ContactsContactsInnerFromJSONTyped(json, false); -} - -export function ContactsContactsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactsContactsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'input': !exists(json, 'input') ? undefined : json['input'], - 'status': !exists(json, 'status') ? undefined : json['status'], - 'waId': !exists(json, 'wa_id') ? undefined : json['wa_id'], - }; -} - -export function ContactsContactsInnerToJSON(value?: ContactsContactsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'input': value.input, - 'status': value.status, - 'wa_id': value.waId, - }; -} - diff --git a/typescript-fetch/models/ContactsRequest.ts b/typescript-fetch/models/ContactsRequest.ts deleted file mode 100644 index c44dded..0000000 --- a/typescript-fetch/models/ContactsRequest.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ContactsRequest - */ -export interface ContactsRequest { - /** - * Operating mode: - * - * *wait* - synchronous - * - * *no_wait* - asynchronous (default) - * @type {string} - * @memberof ContactsRequest - */ - blocking?: string; - /** - * Using cache: - * - * *true* - ignore cache - * - * *false* - use cache (default) - * @type {boolean} - * @memberof ContactsRequest - */ - forceCheck?: boolean; - /** - * Array of contact numbers for checking. Recommended format is +16315551001 - * - * Example: - * - * ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - * @type {Array} - * @memberof ContactsRequest - */ - contacts: Array; -} - -/** - * Check if a given object implements the ContactsRequest interface. - */ -export function instanceOfContactsRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "contacts" in value; - - return isInstance; -} - -export function ContactsRequestFromJSON(json: any): ContactsRequest { - return ContactsRequestFromJSONTyped(json, false); -} - -export function ContactsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactsRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'blocking': !exists(json, 'blocking') ? undefined : json['blocking'], - 'forceCheck': !exists(json, 'force_check') ? undefined : json['force_check'], - 'contacts': json['contacts'], - }; -} - -export function ContactsRequestToJSON(value?: ContactsRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'blocking': value.blocking, - 'force_check': value.forceCheck, - 'contacts': value.contacts, - }; -} - diff --git a/typescript-fetch/models/GetAckInfo.ts b/typescript-fetch/models/GetAckInfo.ts deleted file mode 100644 index 776b71e..0000000 --- a/typescript-fetch/models/GetAckInfo.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetAckInfoHooksInner } from './GetAckInfoHooksInner'; -import { - GetAckInfoHooksInnerFromJSON, - GetAckInfoHooksInnerFromJSONTyped, - GetAckInfoHooksInnerToJSON, -} from './GetAckInfoHooksInner'; - -/** - * - * @export - * @interface GetAckInfo - */ -export interface GetAckInfo { - /** - * - * @type {Array} - * @memberof GetAckInfo - */ - hooks?: Array; -} - -/** - * Check if a given object implements the GetAckInfo interface. - */ -export function instanceOfGetAckInfo(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetAckInfoFromJSON(json: any): GetAckInfo { - return GetAckInfoFromJSONTyped(json, false); -} - -export function GetAckInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAckInfo { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'hooks': !exists(json, 'hooks') ? undefined : ((json['hooks'] as Array).map(GetAckInfoHooksInnerFromJSON)), - }; -} - -export function GetAckInfoToJSON(value?: GetAckInfo | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'hooks': value.hooks === undefined ? undefined : ((value.hooks as Array).map(GetAckInfoHooksInnerToJSON)), - }; -} - diff --git a/typescript-fetch/models/GetAckInfoHooksInner.ts b/typescript-fetch/models/GetAckInfoHooksInner.ts deleted file mode 100644 index b56a868..0000000 --- a/typescript-fetch/models/GetAckInfoHooksInner.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetAckInfoHooksInner - */ -export interface GetAckInfoHooksInner { - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - id?: string; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - type?: string; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - status?: string; - /** - * - * @type {object} - * @memberof GetAckInfoHooksInner - */ - pricing?: object; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - timestamp?: string; - /** - * - * @type {object} - * @memberof GetAckInfoHooksInner - */ - conversation?: object; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - recipientId?: string; -} - -/** - * Check if a given object implements the GetAckInfoHooksInner interface. - */ -export function instanceOfGetAckInfoHooksInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetAckInfoHooksInnerFromJSON(json: any): GetAckInfoHooksInner { - return GetAckInfoHooksInnerFromJSONTyped(json, false); -} - -export function GetAckInfoHooksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAckInfoHooksInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'status': !exists(json, 'status') ? undefined : json['status'], - 'pricing': !exists(json, 'pricing') ? undefined : json['pricing'], - 'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'], - 'conversation': !exists(json, 'conversation') ? undefined : json['conversation'], - 'recipientId': !exists(json, 'recipient_id') ? undefined : json['recipient_id'], - }; -} - -export function GetAckInfoHooksInnerToJSON(value?: GetAckInfoHooksInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'type': value.type, - 'status': value.status, - 'pricing': value.pricing, - 'timestamp': value.timestamp, - 'conversation': value.conversation, - 'recipient_id': value.recipientId, - }; -} - diff --git a/typescript-fetch/models/GetCommerce.ts b/typescript-fetch/models/GetCommerce.ts deleted file mode 100644 index e4d3946..0000000 --- a/typescript-fetch/models/GetCommerce.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetCommerceInner } from './GetCommerceInner'; -import { - GetCommerceInnerFromJSON, - GetCommerceInnerFromJSONTyped, - GetCommerceInnerToJSON, -} from './GetCommerceInner'; - -/** - * - * @export - * @interface GetCommerce - */ -export interface GetCommerce extends Array { -} - -/** - * Check if a given object implements the GetCommerce interface. - */ -export function instanceOfGetCommerce(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetCommerceFromJSON(json: any): GetCommerce { - return GetCommerceFromJSONTyped(json, false); -} - -export function GetCommerceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCommerce { - return json; -} - -export function GetCommerceToJSON(value?: GetCommerce | null): any { - return value; -} - diff --git a/typescript-fetch/models/GetCommerceInner.ts b/typescript-fetch/models/GetCommerceInner.ts deleted file mode 100644 index 0853e8e..0000000 --- a/typescript-fetch/models/GetCommerceInner.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetCommerceInner - */ -export interface GetCommerceInner { - /** - * - * @type {string} - * @memberof GetCommerceInner - */ - id?: string; - /** - * - * @type {boolean} - * @memberof GetCommerceInner - */ - isCartEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof GetCommerceInner - */ - isCatalogVisible?: boolean; -} - -/** - * Check if a given object implements the GetCommerceInner interface. - */ -export function instanceOfGetCommerceInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetCommerceInnerFromJSON(json: any): GetCommerceInner { - return GetCommerceInnerFromJSONTyped(json, false); -} - -export function GetCommerceInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCommerceInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'isCartEnabled': !exists(json, 'is_cart_enabled') ? undefined : json['is_cart_enabled'], - 'isCatalogVisible': !exists(json, 'is_catalog_visible') ? undefined : json['is_catalog_visible'], - }; -} - -export function GetCommerceInnerToJSON(value?: GetCommerceInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'is_cart_enabled': value.isCartEnabled, - 'is_catalog_visible': value.isCatalogVisible, - }; -} - diff --git a/typescript-fetch/models/GetIP.ts b/typescript-fetch/models/GetIP.ts deleted file mode 100644 index f6377ba..0000000 --- a/typescript-fetch/models/GetIP.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetIP - */ -export interface GetIP { - /** - * - * @type {string} - * @memberof GetIP - */ - result?: string; -} - -/** - * Check if a given object implements the GetIP interface. - */ -export function instanceOfGetIP(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetIPFromJSON(json: any): GetIP { - return GetIPFromJSONTyped(json, false); -} - -export function GetIPFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetIP { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'result': !exists(json, 'result') ? undefined : json['result'], - }; -} - -export function GetIPToJSON(value?: GetIP | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'result': value.result, - }; -} - diff --git a/typescript-fetch/models/GetMe.ts b/typescript-fetch/models/GetMe.ts deleted file mode 100644 index 34746ca..0000000 --- a/typescript-fetch/models/GetMe.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetMe - */ -export interface GetMe { - /** - * Profile`s About section. - * @type {string} - * @memberof GetMe - */ - about?: string; - /** - * Address of the business - * @type {string} - * @memberof GetMe - */ - address?: string; - /** - * Description of the business. Max 256 characters - * @type {string} - * @memberof GetMe - */ - description?: string; - /** - * Business email - * @type {string} - * @memberof GetMe - */ - email?: string; - /** - * Linked phone number - * @type {string} - * @memberof GetMe - */ - phone?: string; - /** - * Industry of the business - * @type {string} - * @memberof GetMe - */ - vertical?: GetMeVerticalEnum; - /** - * - * @type {string} - * @memberof GetMe - */ - photo?: string; -} - - -/** - * @export - */ -export const GetMeVerticalEnum = { - Automotive: 'Automotive', - BeautySpaAndSalon: 'Beauty, Spa and Salon', - ClothingAndApparel: 'Clothing and Apparel', - Education: 'Education', - Entertainment: 'Entertainment', - EventPlanningAndService: 'Event Planning and Service', - FinanceAndBanking: 'Finance and Banking', - FoodAndGrocery: 'Food and Grocery', - PublicService: 'Public Service', - HotelAndLodging: 'Hotel and Lodging', - MedicalAndHealth: 'Medical and Health', - NonProfit: 'Non-profit', - ProfessionalServices: 'Professional Services', - ShoppingAndRetail: 'Shopping and Retail', - TravelAndTransportation: 'Travel and Transportation', - Restaurant: 'Restaurant', - Other: 'Other', - Empty: '' -} as const; -export type GetMeVerticalEnum = typeof GetMeVerticalEnum[keyof typeof GetMeVerticalEnum]; - - -/** - * Check if a given object implements the GetMe interface. - */ -export function instanceOfGetMe(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMeFromJSON(json: any): GetMe { - return GetMeFromJSONTyped(json, false); -} - -export function GetMeFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'about': !exists(json, 'about') ? undefined : json['about'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'vertical': !exists(json, 'vertical') ? undefined : json['vertical'], - 'photo': !exists(json, 'photo') ? undefined : json['photo'], - }; -} - -export function GetMeToJSON(value?: GetMe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'about': value.about, - 'address': value.address, - 'description': value.description, - 'email': value.email, - 'phone': value.phone, - 'vertical': value.vertical, - 'photo': value.photo, - }; -} - diff --git a/typescript-fetch/models/GetMe401Response.ts b/typescript-fetch/models/GetMe401Response.ts deleted file mode 100644 index 92dbf94..0000000 --- a/typescript-fetch/models/GetMe401Response.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetMe401Response - */ -export interface GetMe401Response { - /** - * - * @type {string} - * @memberof GetMe401Response - */ - error?: string; -} - -/** - * Check if a given object implements the GetMe401Response interface. - */ -export function instanceOfGetMe401Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMe401ResponseFromJSON(json: any): GetMe401Response { - return GetMe401ResponseFromJSONTyped(json, false); -} - -export function GetMe401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMe401Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'error': !exists(json, 'error') ? undefined : json['error'], - }; -} - -export function GetMe401ResponseToJSON(value?: GetMe401Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'error': value.error, - }; -} - diff --git a/typescript-fetch/models/GetMessages.ts b/typescript-fetch/models/GetMessages.ts deleted file mode 100644 index 2c76a67..0000000 --- a/typescript-fetch/models/GetMessages.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetMessagesMessagesInner } from './GetMessagesMessagesInner'; -import { - GetMessagesMessagesInnerFromJSON, - GetMessagesMessagesInnerFromJSONTyped, - GetMessagesMessagesInnerToJSON, -} from './GetMessagesMessagesInner'; - -/** - * - * @export - * @interface GetMessages - */ -export interface GetMessages { - /** - * - * @type {Array} - * @memberof GetMessages - */ - messages?: Array; -} - -/** - * Check if a given object implements the GetMessages interface. - */ -export function instanceOfGetMessages(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMessagesFromJSON(json: any): GetMessages { - return GetMessagesFromJSONTyped(json, false); -} - -export function GetMessagesFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMessages { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'messages': !exists(json, 'messages') ? undefined : ((json['messages'] as Array).map(GetMessagesMessagesInnerFromJSON)), - }; -} - -export function GetMessagesToJSON(value?: GetMessages | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'messages': value.messages === undefined ? undefined : ((value.messages as Array).map(GetMessagesMessagesInnerToJSON)), - }; -} - diff --git a/typescript-fetch/models/GetMessagesMessagesInner.ts b/typescript-fetch/models/GetMessagesMessagesInner.ts deleted file mode 100644 index a148c4a..0000000 --- a/typescript-fetch/models/GetMessagesMessagesInner.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetMessagesMessagesInner - */ -export interface GetMessagesMessagesInner { - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - messageNumber?: number; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - id?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - body?: string; - /** - * - * @type {boolean} - * @memberof GetMessagesMessagesInner - */ - fromMe?: boolean; - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - self?: number; - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - isForwarded?: number; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - author?: string; - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - time?: number; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - chatId?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - type?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - senderName?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - caption?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - quotedMsgId?: string; - /** - * - * @type {object} - * @memberof GetMessagesMessagesInner - */ - metadata?: object; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - chatName?: string; -} - -/** - * Check if a given object implements the GetMessagesMessagesInner interface. - */ -export function instanceOfGetMessagesMessagesInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMessagesMessagesInnerFromJSON(json: any): GetMessagesMessagesInner { - return GetMessagesMessagesInnerFromJSONTyped(json, false); -} - -export function GetMessagesMessagesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMessagesMessagesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'messageNumber': !exists(json, 'messageNumber') ? undefined : json['messageNumber'], - 'id': !exists(json, 'id') ? undefined : json['id'], - 'body': !exists(json, 'body') ? undefined : json['body'], - 'fromMe': !exists(json, 'fromMe') ? undefined : json['fromMe'], - 'self': !exists(json, 'self') ? undefined : json['self'], - 'isForwarded': !exists(json, 'isForwarded') ? undefined : json['isForwarded'], - 'author': !exists(json, 'author') ? undefined : json['author'], - 'time': !exists(json, 'time') ? undefined : json['time'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'senderName': !exists(json, 'senderName') ? undefined : json['senderName'], - 'caption': !exists(json, 'caption') ? undefined : json['caption'], - 'quotedMsgId': !exists(json, 'quotedMsgId') ? undefined : json['quotedMsgId'], - 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'], - 'chatName': !exists(json, 'chatName') ? undefined : json['chatName'], - }; -} - -export function GetMessagesMessagesInnerToJSON(value?: GetMessagesMessagesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'messageNumber': value.messageNumber, - 'id': value.id, - 'body': value.body, - 'fromMe': value.fromMe, - 'self': value.self, - 'isForwarded': value.isForwarded, - 'author': value.author, - 'time': value.time, - 'chatId': value.chatId, - 'type': value.type, - 'senderName': value.senderName, - 'caption': value.caption, - 'quotedMsgId': value.quotedMsgId, - 'metadata': value.metadata, - 'chatName': value.chatName, - }; -} - diff --git a/typescript-fetch/models/GetTemplates.ts b/typescript-fetch/models/GetTemplates.ts deleted file mode 100644 index 595f6d6..0000000 --- a/typescript-fetch/models/GetTemplates.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetTemplatesTemplatesInner } from './GetTemplatesTemplatesInner'; -import { - GetTemplatesTemplatesInnerFromJSON, - GetTemplatesTemplatesInnerFromJSONTyped, - GetTemplatesTemplatesInnerToJSON, -} from './GetTemplatesTemplatesInner'; - -/** - * - * @export - * @interface GetTemplates - */ -export interface GetTemplates { - /** - * - * @type {number} - * @memberof GetTemplates - */ - total?: number; - /** - * - * @type {Array} - * @memberof GetTemplates - */ - templates?: Array; -} - -/** - * Check if a given object implements the GetTemplates interface. - */ -export function instanceOfGetTemplates(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetTemplatesFromJSON(json: any): GetTemplates { - return GetTemplatesFromJSONTyped(json, false); -} - -export function GetTemplatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetTemplates { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'total': !exists(json, 'total') ? undefined : json['total'], - 'templates': !exists(json, 'templates') ? undefined : ((json['templates'] as Array).map(GetTemplatesTemplatesInnerFromJSON)), - }; -} - -export function GetTemplatesToJSON(value?: GetTemplates | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'total': value.total, - 'templates': value.templates === undefined ? undefined : ((value.templates as Array).map(GetTemplatesTemplatesInnerToJSON)), - }; -} - diff --git a/typescript-fetch/models/GetTemplatesTemplatesInner.ts b/typescript-fetch/models/GetTemplatesTemplatesInner.ts deleted file mode 100644 index 13c7db1..0000000 --- a/typescript-fetch/models/GetTemplatesTemplatesInner.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateCategoryProp } from './TemplateCategoryProp'; -import { - TemplateCategoryPropFromJSON, - TemplateCategoryPropFromJSONTyped, - TemplateCategoryPropToJSON, -} from './TemplateCategoryProp'; -import type { TemplateComponentsPropInner } from './TemplateComponentsPropInner'; -import { - TemplateComponentsPropInnerFromJSON, - TemplateComponentsPropInnerFromJSONTyped, - TemplateComponentsPropInnerToJSON, -} from './TemplateComponentsPropInner'; -import type { TemplateLanguageProp } from './TemplateLanguageProp'; -import { - TemplateLanguagePropFromJSON, - TemplateLanguagePropFromJSONTyped, - TemplateLanguagePropToJSON, -} from './TemplateLanguageProp'; - -/** - * - * @export - * @interface GetTemplatesTemplatesInner - */ -export interface GetTemplatesTemplatesInner { - /** - * - * @type {TemplateCategoryProp} - * @memberof GetTemplatesTemplatesInner - */ - category?: TemplateCategoryProp; - /** - * Array of template components - * @type {Array} - * @memberof GetTemplatesTemplatesInner - */ - components?: Array; - /** - * - * @type {TemplateLanguageProp} - * @memberof GetTemplatesTemplatesInner - */ - language?: TemplateLanguageProp; - /** - * - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - name?: string; - /** - * Can be found by method /templates - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - namespace?: string; - /** - * - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - rejectedReason?: string; - /** - * - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - status?: string; -} - -/** - * Check if a given object implements the GetTemplatesTemplatesInner interface. - */ -export function instanceOfGetTemplatesTemplatesInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetTemplatesTemplatesInnerFromJSON(json: any): GetTemplatesTemplatesInner { - return GetTemplatesTemplatesInnerFromJSONTyped(json, false); -} - -export function GetTemplatesTemplatesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetTemplatesTemplatesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'category': !exists(json, 'category') ? undefined : TemplateCategoryPropFromJSON(json['category']), - 'components': !exists(json, 'components') ? undefined : ((json['components'] as Array).map(TemplateComponentsPropInnerFromJSON)), - 'language': !exists(json, 'language') ? undefined : TemplateLanguagePropFromJSON(json['language']), - 'name': !exists(json, 'name') ? undefined : json['name'], - 'namespace': !exists(json, 'namespace') ? undefined : json['namespace'], - 'rejectedReason': !exists(json, 'rejected_reason') ? undefined : json['rejected_reason'], - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function GetTemplatesTemplatesInnerToJSON(value?: GetTemplatesTemplatesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'category': TemplateCategoryPropToJSON(value.category), - 'components': value.components === undefined ? undefined : ((value.components as Array).map(TemplateComponentsPropInnerToJSON)), - 'language': TemplateLanguagePropToJSON(value.language), - 'name': value.name, - 'namespace': value.namespace, - 'rejected_reason': value.rejectedReason, - 'status': value.status, - }; -} - diff --git a/typescript-fetch/models/MeComponents.ts b/typescript-fetch/models/MeComponents.ts deleted file mode 100644 index 8cb083c..0000000 --- a/typescript-fetch/models/MeComponents.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface MeComponents - */ -export interface MeComponents { - /** - * Profile`s About section. - * @type {string} - * @memberof MeComponents - */ - about?: string; - /** - * Address of the business - * @type {string} - * @memberof MeComponents - */ - address?: string; - /** - * Description of the business. Max 256 characters - * @type {string} - * @memberof MeComponents - */ - description?: string; - /** - * Business email - * @type {string} - * @memberof MeComponents - */ - email?: string; - /** - * Linked phone number - * @type {string} - * @memberof MeComponents - */ - phone?: string; - /** - * Industry of the business - * @type {string} - * @memberof MeComponents - */ - vertical?: MeComponentsVerticalEnum; - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof MeComponents - */ - photo?: string; -} - - -/** - * @export - */ -export const MeComponentsVerticalEnum = { - Automotive: 'Automotive', - BeautySpaAndSalon: 'Beauty, Spa and Salon', - ClothingAndApparel: 'Clothing and Apparel', - Education: 'Education', - Entertainment: 'Entertainment', - EventPlanningAndService: 'Event Planning and Service', - FinanceAndBanking: 'Finance and Banking', - FoodAndGrocery: 'Food and Grocery', - PublicService: 'Public Service', - HotelAndLodging: 'Hotel and Lodging', - MedicalAndHealth: 'Medical and Health', - NonProfit: 'Non-profit', - ProfessionalServices: 'Professional Services', - ShoppingAndRetail: 'Shopping and Retail', - TravelAndTransportation: 'Travel and Transportation', - Restaurant: 'Restaurant', - Other: 'Other', - Empty: '' -} as const; -export type MeComponentsVerticalEnum = typeof MeComponentsVerticalEnum[keyof typeof MeComponentsVerticalEnum]; - - -/** - * Check if a given object implements the MeComponents interface. - */ -export function instanceOfMeComponents(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MeComponentsFromJSON(json: any): MeComponents { - return MeComponentsFromJSONTyped(json, false); -} - -export function MeComponentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MeComponents { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'about': !exists(json, 'about') ? undefined : json['about'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'vertical': !exists(json, 'vertical') ? undefined : json['vertical'], - 'photo': !exists(json, 'photo') ? undefined : json['photo'], - }; -} - -export function MeComponentsToJSON(value?: MeComponents | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'about': value.about, - 'address': value.address, - 'description': value.description, - 'email': value.email, - 'phone': value.phone, - 'vertical': value.vertical, - 'photo': value.photo, - }; -} - diff --git a/typescript-fetch/models/MediaId.ts b/typescript-fetch/models/MediaId.ts deleted file mode 100644 index 503f73a..0000000 --- a/typescript-fetch/models/MediaId.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface MediaId - */ -export interface MediaId { - /** - * - * @type {string} - * @memberof MediaId - */ - mediaId?: string; -} - -/** - * Check if a given object implements the MediaId interface. - */ -export function instanceOfMediaId(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MediaIdFromJSON(json: any): MediaId { - return MediaIdFromJSONTyped(json, false); -} - -export function MediaIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaId { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'mediaId': !exists(json, 'mediaId') ? undefined : json['mediaId'], - }; -} - -export function MediaIdToJSON(value?: MediaId | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'mediaId': value.mediaId, - }; -} - diff --git a/typescript-fetch/models/Message.ts b/typescript-fetch/models/Message.ts deleted file mode 100644 index f3e389b..0000000 --- a/typescript-fetch/models/Message.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface Message - */ -export interface Message { - /** - * unique id - * @type {string} - * @memberof Message - */ - id?: string; - /** - * text message for type "chat", or link to download the file for "ptt", "image", "audio", "video" and "document", or latitude and longitude for "location", or message "[Call]" for "call_log" - * @type {string} - * @memberof Message - */ - body?: string; - /** - * true - outgoing, false - incoming - * @type {boolean} - * @memberof Message - */ - fromMe?: boolean; - /** - * 1 - generated by api, 0 - generated by app - * @type {number} - * @memberof Message - */ - self?: number; - /** - * true - forwarded message, false - direct message - * @type {boolean} - * @memberof Message - */ - isForwarded?: boolean; - /** - * Author ID of the message - * @type {string} - * @memberof Message - */ - author?: string; - /** - * send time, unix timestamp - * @type {number} - * @memberof Message - */ - time?: number; - /** - * chat ID - * @type {string} - * @memberof Message - */ - chatId?: string; - /** - * type of the message - * @type {string} - * @memberof Message - */ - type?: MessageTypeEnum; - /** - * Sender name - * @type {string} - * @memberof Message - */ - senderName?: string; - /** - * File caption or filename - * @type {string} - * @memberof Message - */ - caption?: string; - /** - * ID of quoted message - * @type {string} - * @memberof Message - */ - quotedMsgId?: string; -} - - -/** - * @export - */ -export const MessageTypeEnum = { - Chat: 'chat', - Interactive: 'interactive', - Image: 'image', - Video: 'video', - Document: 'document', - Audio: 'audio', - Sticker: 'sticker', - Voice: 'voice' -} as const; -export type MessageTypeEnum = typeof MessageTypeEnum[keyof typeof MessageTypeEnum]; - - -/** - * Check if a given object implements the Message interface. - */ -export function instanceOfMessage(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MessageFromJSON(json: any): Message { - return MessageFromJSONTyped(json, false); -} - -export function MessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Message { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'body': !exists(json, 'body') ? undefined : json['body'], - 'fromMe': !exists(json, 'fromMe') ? undefined : json['fromMe'], - 'self': !exists(json, 'self') ? undefined : json['self'], - 'isForwarded': !exists(json, 'isForwarded') ? undefined : json['isForwarded'], - 'author': !exists(json, 'author') ? undefined : json['author'], - 'time': !exists(json, 'time') ? undefined : json['time'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'senderName': !exists(json, 'senderName') ? undefined : json['senderName'], - 'caption': !exists(json, 'caption') ? undefined : json['caption'], - 'quotedMsgId': !exists(json, 'quotedMsgId') ? undefined : json['quotedMsgId'], - }; -} - -export function MessageToJSON(value?: Message | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'body': value.body, - 'fromMe': value.fromMe, - 'self': value.self, - 'isForwarded': value.isForwarded, - 'author': value.author, - 'time': value.time, - 'chatId': value.chatId, - 'type': value.type, - 'senderName': value.senderName, - 'caption': value.caption, - 'quotedMsgId': value.quotedMsgId, - }; -} - diff --git a/typescript-fetch/models/ReadMessageRequest.ts b/typescript-fetch/models/ReadMessageRequest.ts deleted file mode 100644 index 4e24ea0..0000000 --- a/typescript-fetch/models/ReadMessageRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ReadMessageRequest - */ -export interface ReadMessageRequest { - /** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @type {string} - * @memberof ReadMessageRequest - */ - messageId?: string; -} - -/** - * Check if a given object implements the ReadMessageRequest interface. - */ -export function instanceOfReadMessageRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ReadMessageRequestFromJSON(json: any): ReadMessageRequest { - return ReadMessageRequestFromJSONTyped(json, false); -} - -export function ReadMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReadMessageRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'messageId': !exists(json, 'messageId') ? undefined : json['messageId'], - }; -} - -export function ReadMessageRequestToJSON(value?: ReadMessageRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'messageId': value.messageId, - }; -} - diff --git a/typescript-fetch/models/RemoveTemplateRequest.ts b/typescript-fetch/models/RemoveTemplateRequest.ts deleted file mode 100644 index 101f41b..0000000 --- a/typescript-fetch/models/RemoveTemplateRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface RemoveTemplateRequest - */ -export interface RemoveTemplateRequest { - /** - * Template name - * @type {string} - * @memberof RemoveTemplateRequest - */ - name?: string; -} - -/** - * Check if a given object implements the RemoveTemplateRequest interface. - */ -export function instanceOfRemoveTemplateRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function RemoveTemplateRequestFromJSON(json: any): RemoveTemplateRequest { - return RemoveTemplateRequestFromJSONTyped(json, false); -} - -export function RemoveTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveTemplateRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function RemoveTemplateRequestToJSON(value?: RemoveTemplateRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/typescript-fetch/models/SendContactRequest.ts b/typescript-fetch/models/SendContactRequest.ts deleted file mode 100644 index d5c0110..0000000 --- a/typescript-fetch/models/SendContactRequest.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendContactRequest - */ -export interface SendContactRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendContactRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendContactRequest - */ - phone?: number; - /** - * Array containing contact objects. - * - * Contact object parameters: - * - * **name** - full contact name. Required. Object with properties: - * - * * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) - * - * * first_name - First name. Example: Adam - * - * * last_name - Last name. Example: Smith - * - * * middle_name - Middle name. Example: John - * - * * suffix - Name suffix. Example: Junior - * - * * prefix - Name prefix. Example: Lord - * - * **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 - * - * **addresses** - array containing address objects with parameters: - * - * * street - Street number and name. Example: 1 Hacker Way - * - * * city - City name. Example: Menlo Park - * - * * state - State abbreviation. Example: CA - * - * * zip - ZIP code. Example: 94025 - * - * * country - Full country name. Example: United States - * - * * country_code - Two-letter country abbreviation. Example: us - * - * * type - Standard Values: HOME, WORK. Example: HOME - * - * **emails** - array containing email objects with parameters: - * - * * email - Email address. Example: test@fb.com - * - * * type - Standard Values: HOME, WORK. Example: WORK - * - * **org** - object containing parameters: - * - * * company - Name of the contact's company. Example: WhatsApp - * - * * department - Name of the contact's department. Example: Design - * - * * title - Contact's business title. Example: Manager - * - * **phones** - array containing phone objects with parameters: - * - * * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 - * - * * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME - * - * * wa_id - WhatsApp ID. Example: 19405551234 - * - * **urls** - array containing url objects with parameters: - * - * * url - URL. Example: https://www.facebook.com - * - * * type - Standard Values: HOME, WORK. Example: WORK - * - * Example: [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - * @type {Array} - * @memberof SendContactRequest - */ - contacts?: Array; -} - -/** - * Check if a given object implements the SendContactRequest interface. - */ -export function instanceOfSendContactRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendContactRequestFromJSON(json: any): SendContactRequest { - return SendContactRequestFromJSONTyped(json, false); -} - -export function SendContactRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'contacts': !exists(json, 'contacts') ? undefined : json['contacts'], - }; -} - -export function SendContactRequestToJSON(value?: SendContactRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'contacts': value.contacts, - }; -} - diff --git a/typescript-fetch/models/SendFileRequest.ts b/typescript-fetch/models/SendFileRequest.ts deleted file mode 100644 index 16d9d3d..0000000 --- a/typescript-fetch/models/SendFileRequest.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendFileRequest - */ -export interface SendFileRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendFileRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendFileRequest - */ - phone?: number; - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof SendFileRequest - */ - body: string; - /** - * File name, for *example 1.jpg* or *hello.xlsx* - * @type {string} - * @memberof SendFileRequest - */ - filename: string; - /** - * Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - * @type {string} - * @memberof SendFileRequest - */ - caption?: string; -} - -/** - * Check if a given object implements the SendFileRequest interface. - */ -export function instanceOfSendFileRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - isInstance = isInstance && "filename" in value; - - return isInstance; -} - -export function SendFileRequestFromJSON(json: any): SendFileRequest { - return SendFileRequestFromJSONTyped(json, false); -} - -export function SendFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendFileRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'body': json['body'], - 'filename': json['filename'], - 'caption': !exists(json, 'caption') ? undefined : json['caption'], - }; -} - -export function SendFileRequestToJSON(value?: SendFileRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'body': value.body, - 'filename': value.filename, - 'caption': value.caption, - }; -} - diff --git a/typescript-fetch/models/SendListRequest.ts b/typescript-fetch/models/SendListRequest.ts deleted file mode 100644 index 7c118e7..0000000 --- a/typescript-fetch/models/SendListRequest.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendListRequestAllOfSections } from './SendListRequestAllOfSections'; -import { - SendListRequestAllOfSectionsFromJSON, - SendListRequestAllOfSectionsFromJSONTyped, - SendListRequestAllOfSectionsToJSON, -} from './SendListRequestAllOfSections'; - -/** - * - * @export - * @interface SendListRequest - */ -export interface SendListRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendListRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendListRequest - */ - phone?: number; - /** - * Main message text - * @type {string} - * @memberof SendListRequest - */ - body: string; - /** - * Header will be located above message text - * @type {string} - * @memberof SendListRequest - */ - header?: string; - /** - * Footer will be placed under message text - * @type {string} - * @memberof SendListRequest - */ - footer?: string; - /** - * Action for open list - * @type {string} - * @memberof SendListRequest - */ - action: string; - /** - * Up to 10 sections from which the client can choose. - * - * Each section is object with fields: - * - * *title* - Title of section, up to 24 symbols. Required if there are more then 1 section - * - * *rows* - available options. Required - * - * - * - * Each option is object with fields: - * - * *id* - Unique id for option, up to 200 symbols. Required - * - * *title* - Title of option, up to 24 symbols. Required - * - * *description* - Description of option, up to 72 symbols - * - * - * - * Example: - * - * [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - * @type {Array} - * @memberof SendListRequest - */ - sections: Array; -} - -/** - * Check if a given object implements the SendListRequest interface. - */ -export function instanceOfSendListRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - isInstance = isInstance && "action" in value; - isInstance = isInstance && "sections" in value; - - return isInstance; -} - -export function SendListRequestFromJSON(json: any): SendListRequest { - return SendListRequestFromJSONTyped(json, false); -} - -export function SendListRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'body': json['body'], - 'header': !exists(json, 'header') ? undefined : json['header'], - 'footer': !exists(json, 'footer') ? undefined : json['footer'], - 'action': json['action'], - 'sections': ((json['sections'] as Array).map(SendListRequestAllOfSectionsFromJSON)), - }; -} - -export function SendListRequestToJSON(value?: SendListRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'body': value.body, - 'header': value.header, - 'footer': value.footer, - 'action': value.action, - 'sections': ((value.sections as Array).map(SendListRequestAllOfSectionsToJSON)), - }; -} - diff --git a/typescript-fetch/models/SendListRequestAllOfRows.ts b/typescript-fetch/models/SendListRequestAllOfRows.ts deleted file mode 100644 index 02f1d10..0000000 --- a/typescript-fetch/models/SendListRequestAllOfRows.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendListRequestAllOfRows - */ -export interface SendListRequestAllOfRows { - /** - * Unique id for option, up to 200 symbols - * @type {string} - * @memberof SendListRequestAllOfRows - */ - id: string; - /** - * Title of option, up to 24 symbols. - * @type {string} - * @memberof SendListRequestAllOfRows - */ - title: string; - /** - * Description of option, up to 72 symbols - * @type {string} - * @memberof SendListRequestAllOfRows - */ - description?: string; -} - -/** - * Check if a given object implements the SendListRequestAllOfRows interface. - */ -export function instanceOfSendListRequestAllOfRows(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "title" in value; - - return isInstance; -} - -export function SendListRequestAllOfRowsFromJSON(json: any): SendListRequestAllOfRows { - return SendListRequestAllOfRowsFromJSONTyped(json, false); -} - -export function SendListRequestAllOfRowsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequestAllOfRows { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'title': json['title'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function SendListRequestAllOfRowsToJSON(value?: SendListRequestAllOfRows | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'title': value.title, - 'description': value.description, - }; -} - diff --git a/typescript-fetch/models/SendListRequestAllOfSections.ts b/typescript-fetch/models/SendListRequestAllOfSections.ts deleted file mode 100644 index 12ec879..0000000 --- a/typescript-fetch/models/SendListRequestAllOfSections.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendListRequestAllOfRows } from './SendListRequestAllOfRows'; -import { - SendListRequestAllOfRowsFromJSON, - SendListRequestAllOfRowsFromJSONTyped, - SendListRequestAllOfRowsToJSON, -} from './SendListRequestAllOfRows'; - -/** - * - * @export - * @interface SendListRequestAllOfSections - */ -export interface SendListRequestAllOfSections { - /** - * Title of section, up to 24 symbols. Required if there are more then 1 section - * @type {string} - * @memberof SendListRequestAllOfSections - */ - title?: string; - /** - * - * @type {Array} - * @memberof SendListRequestAllOfSections - */ - rows: Array; -} - -/** - * Check if a given object implements the SendListRequestAllOfSections interface. - */ -export function instanceOfSendListRequestAllOfSections(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "rows" in value; - - return isInstance; -} - -export function SendListRequestAllOfSectionsFromJSON(json: any): SendListRequestAllOfSections { - return SendListRequestAllOfSectionsFromJSONTyped(json, false); -} - -export function SendListRequestAllOfSectionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequestAllOfSections { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'title': !exists(json, 'title') ? undefined : json['title'], - 'rows': ((json['rows'] as Array).map(SendListRequestAllOfRowsFromJSON)), - }; -} - -export function SendListRequestAllOfSectionsToJSON(value?: SendListRequestAllOfSections | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'title': value.title, - 'rows': ((value.rows as Array).map(SendListRequestAllOfRowsToJSON)), - }; -} - diff --git a/typescript-fetch/models/SendLocationRequest.ts b/typescript-fetch/models/SendLocationRequest.ts deleted file mode 100644 index 691904c..0000000 --- a/typescript-fetch/models/SendLocationRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendLocationRequest - */ -export interface SendLocationRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendLocationRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendLocationRequest - */ - phone?: number; - /** - * Latitude of the location. Example: 45.018337 - * @type {string} - * @memberof SendLocationRequest - */ - lat: string; - /** - * Longitude of the location. Example: -73.968285 - * @type {string} - * @memberof SendLocationRequest - */ - lng: string; - /** - * Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - * @type {string} - * @memberof SendLocationRequest - */ - address?: string; - /** - * Name of the location. Example: Facebook HQ - * @type {string} - * @memberof SendLocationRequest - */ - name?: string; -} - -/** - * Check if a given object implements the SendLocationRequest interface. - */ -export function instanceOfSendLocationRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "lat" in value; - isInstance = isInstance && "lng" in value; - - return isInstance; -} - -export function SendLocationRequestFromJSON(json: any): SendLocationRequest { - return SendLocationRequestFromJSONTyped(json, false); -} - -export function SendLocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendLocationRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'lat': json['lat'], - 'lng': json['lng'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function SendLocationRequestToJSON(value?: SendLocationRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'lat': value.lat, - 'lng': value.lng, - 'address': value.address, - 'name': value.name, - }; -} - diff --git a/typescript-fetch/models/SendMessageRequest.ts b/typescript-fetch/models/SendMessageRequest.ts deleted file mode 100644 index 969552f..0000000 --- a/typescript-fetch/models/SendMessageRequest.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendMessageRequest - */ -export interface SendMessageRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendMessageRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendMessageRequest - */ - phone?: number; - /** - * Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - * @type {string} - * @memberof SendMessageRequest - */ - body: string; -} - -/** - * Check if a given object implements the SendMessageRequest interface. - */ -export function instanceOfSendMessageRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - - return isInstance; -} - -export function SendMessageRequestFromJSON(json: any): SendMessageRequest { - return SendMessageRequestFromJSONTyped(json, false); -} - -export function SendMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendMessageRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'body': json['body'], - }; -} - -export function SendMessageRequestToJSON(value?: SendMessageRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'body': value.body, - }; -} - diff --git a/typescript-fetch/models/SendMessageStatus.ts b/typescript-fetch/models/SendMessageStatus.ts deleted file mode 100644 index 208c044..0000000 --- a/typescript-fetch/models/SendMessageStatus.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendMessageStatus - */ -export interface SendMessageStatus { - /** - * - * @type {boolean} - * @memberof SendMessageStatus - */ - sent?: boolean; - /** - * unique message id - * @type {string} - * @memberof SendMessageStatus - */ - id?: string; - /** - * Posting status message - * @type {string} - * @memberof SendMessageStatus - */ - message?: string; - /** - * Result description - * @type {string} - * @memberof SendMessageStatus - */ - description?: string; -} - -/** - * Check if a given object implements the SendMessageStatus interface. - */ -export function instanceOfSendMessageStatus(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendMessageStatusFromJSON(json: any): SendMessageStatus { - return SendMessageStatusFromJSONTyped(json, false); -} - -export function SendMessageStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendMessageStatus { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'sent': !exists(json, 'sent') ? undefined : json['sent'], - 'id': !exists(json, 'id') ? undefined : json['id'], - 'message': !exists(json, 'message') ? undefined : json['message'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function SendMessageStatusToJSON(value?: SendMessageStatus | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'sent': value.sent, - 'id': value.id, - 'message': value.message, - 'description': value.description, - }; -} - diff --git a/typescript-fetch/models/SendProductRequest.ts b/typescript-fetch/models/SendProductRequest.ts deleted file mode 100644 index 7b7d971..0000000 --- a/typescript-fetch/models/SendProductRequest.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendProductRequestAllOfAction } from './SendProductRequestAllOfAction'; -import { - SendProductRequestAllOfActionFromJSON, - SendProductRequestAllOfActionFromJSONTyped, - SendProductRequestAllOfActionToJSON, -} from './SendProductRequestAllOfAction'; - -/** - * - * @export - * @interface SendProductRequest - */ -export interface SendProductRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendProductRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendProductRequest - */ - phone?: number; - /** - * - * @type {SendProductRequestAllOfAction} - * @memberof SendProductRequest - */ - action: SendProductRequestAllOfAction; - /** - * Text of message. Example: Some text. - * @type {string} - * @memberof SendProductRequest - */ - body?: string; - /** - * Located under the message text. Example: Footer. - * @type {string} - * @memberof SendProductRequest - */ - footer?: string; - /** - * Header of catalog. Example: Header. - * - * **Required when sending the catalog.** - * @type {string} - * @memberof SendProductRequest - */ - header?: string; -} - -/** - * Check if a given object implements the SendProductRequest interface. - */ -export function instanceOfSendProductRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "action" in value; - - return isInstance; -} - -export function SendProductRequestFromJSON(json: any): SendProductRequest { - return SendProductRequestFromJSONTyped(json, false); -} - -export function SendProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'action': SendProductRequestAllOfActionFromJSON(json['action']), - 'body': !exists(json, 'body') ? undefined : json['body'], - 'footer': !exists(json, 'footer') ? undefined : json['footer'], - 'header': !exists(json, 'header') ? undefined : json['header'], - }; -} - -export function SendProductRequestToJSON(value?: SendProductRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'action': SendProductRequestAllOfActionToJSON(value.action), - 'body': value.body, - 'footer': value.footer, - 'header': value.header, - }; -} - diff --git a/typescript-fetch/models/SendProductRequestAllOfAction.ts b/typescript-fetch/models/SendProductRequestAllOfAction.ts deleted file mode 100644 index edc61a8..0000000 --- a/typescript-fetch/models/SendProductRequestAllOfAction.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendProductRequestAllOfActionSections } from './SendProductRequestAllOfActionSections'; -import { - SendProductRequestAllOfActionSectionsFromJSON, - SendProductRequestAllOfActionSectionsFromJSONTyped, - SendProductRequestAllOfActionSectionsToJSON, -} from './SendProductRequestAllOfActionSections'; - -/** - * Object containing info about product or catalog. Can contain the following fields: - * - * **catalog_id** - id of catalog - * - * **product_retailer_id** - id of product. Only for sending single product. - * - * **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. - * - * Example: {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]} - * @export - * @interface SendProductRequestAllOfAction - */ -export interface SendProductRequestAllOfAction { - /** - * id of the catalog - * @type {string} - * @memberof SendProductRequestAllOfAction - */ - catalogId?: string; - /** - * id of the product - * @type {string} - * @memberof SendProductRequestAllOfAction - */ - productRetailerId?: string; - /** - * - * @type {Array} - * @memberof SendProductRequestAllOfAction - */ - sections?: Array; -} - -/** - * Check if a given object implements the SendProductRequestAllOfAction interface. - */ -export function instanceOfSendProductRequestAllOfAction(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendProductRequestAllOfActionFromJSON(json: any): SendProductRequestAllOfAction { - return SendProductRequestAllOfActionFromJSONTyped(json, false); -} - -export function SendProductRequestAllOfActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequestAllOfAction { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'catalogId': !exists(json, 'catalog_id') ? undefined : json['catalog_id'], - 'productRetailerId': !exists(json, 'product_retailer_id') ? undefined : json['product_retailer_id'], - 'sections': !exists(json, 'sections') ? undefined : ((json['sections'] as Array).map(SendProductRequestAllOfActionSectionsFromJSON)), - }; -} - -export function SendProductRequestAllOfActionToJSON(value?: SendProductRequestAllOfAction | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'catalog_id': value.catalogId, - 'product_retailer_id': value.productRetailerId, - 'sections': value.sections === undefined ? undefined : ((value.sections as Array).map(SendProductRequestAllOfActionSectionsToJSON)), - }; -} - diff --git a/typescript-fetch/models/SendProductRequestAllOfActionProductItems.ts b/typescript-fetch/models/SendProductRequestAllOfActionProductItems.ts deleted file mode 100644 index f8c5a58..0000000 --- a/typescript-fetch/models/SendProductRequestAllOfActionProductItems.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendProductRequestAllOfActionProductItems - */ -export interface SendProductRequestAllOfActionProductItems { - /** - * id of the product - * @type {string} - * @memberof SendProductRequestAllOfActionProductItems - */ - productRetailerId?: string; -} - -/** - * Check if a given object implements the SendProductRequestAllOfActionProductItems interface. - */ -export function instanceOfSendProductRequestAllOfActionProductItems(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendProductRequestAllOfActionProductItemsFromJSON(json: any): SendProductRequestAllOfActionProductItems { - return SendProductRequestAllOfActionProductItemsFromJSONTyped(json, false); -} - -export function SendProductRequestAllOfActionProductItemsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequestAllOfActionProductItems { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'productRetailerId': !exists(json, 'product_retailer_id') ? undefined : json['product_retailer_id'], - }; -} - -export function SendProductRequestAllOfActionProductItemsToJSON(value?: SendProductRequestAllOfActionProductItems | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'product_retailer_id': value.productRetailerId, - }; -} - diff --git a/typescript-fetch/models/SendProductRequestAllOfActionSections.ts b/typescript-fetch/models/SendProductRequestAllOfActionSections.ts deleted file mode 100644 index c4b7568..0000000 --- a/typescript-fetch/models/SendProductRequestAllOfActionSections.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendProductRequestAllOfActionProductItems } from './SendProductRequestAllOfActionProductItems'; -import { - SendProductRequestAllOfActionProductItemsFromJSON, - SendProductRequestAllOfActionProductItemsFromJSONTyped, - SendProductRequestAllOfActionProductItemsToJSON, -} from './SendProductRequestAllOfActionProductItems'; - -/** - * - * @export - * @interface SendProductRequestAllOfActionSections - */ -export interface SendProductRequestAllOfActionSections { - /** - * Title of the section. Example: the-section-title - * @type {string} - * @memberof SendProductRequestAllOfActionSections - */ - title?: string; - /** - * - * @type {Array} - * @memberof SendProductRequestAllOfActionSections - */ - productItems?: Array; -} - -/** - * Check if a given object implements the SendProductRequestAllOfActionSections interface. - */ -export function instanceOfSendProductRequestAllOfActionSections(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendProductRequestAllOfActionSectionsFromJSON(json: any): SendProductRequestAllOfActionSections { - return SendProductRequestAllOfActionSectionsFromJSONTyped(json, false); -} - -export function SendProductRequestAllOfActionSectionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequestAllOfActionSections { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'title': !exists(json, 'title') ? undefined : json['title'], - 'productItems': !exists(json, 'product_items') ? undefined : ((json['product_items'] as Array).map(SendProductRequestAllOfActionProductItemsFromJSON)), - }; -} - -export function SendProductRequestAllOfActionSectionsToJSON(value?: SendProductRequestAllOfActionSections | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'title': value.title, - 'product_items': value.productItems === undefined ? undefined : ((value.productItems as Array).map(SendProductRequestAllOfActionProductItemsToJSON)), - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequest.ts b/typescript-fetch/models/SendTemplateRequest.ts deleted file mode 100644 index 361a610..0000000 --- a/typescript-fetch/models/SendTemplateRequest.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendTemplateRequestAllOfLanguage } from './SendTemplateRequestAllOfLanguage'; -import { - SendTemplateRequestAllOfLanguageFromJSON, - SendTemplateRequestAllOfLanguageFromJSONTyped, - SendTemplateRequestAllOfLanguageToJSON, -} from './SendTemplateRequestAllOfLanguage'; -import type { SendTemplateRequestAllOfParams } from './SendTemplateRequestAllOfParams'; -import { - SendTemplateRequestAllOfParamsFromJSON, - SendTemplateRequestAllOfParamsFromJSONTyped, - SendTemplateRequestAllOfParamsToJSON, -} from './SendTemplateRequestAllOfParams'; - -/** - * - * @export - * @interface SendTemplateRequest - */ -export interface SendTemplateRequest { - /** - * Can be found by method /templates - * @type {string} - * @memberof SendTemplateRequest - */ - namespace: string; - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendTemplateRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {number} - * @memberof SendTemplateRequest - */ - phone?: number; - /** - * Name of template - * @type {string} - * @memberof SendTemplateRequest - */ - template: string; - /** - * - * @type {SendTemplateRequestAllOfLanguage} - * @memberof SendTemplateRequest - */ - language: SendTemplateRequestAllOfLanguage; - /** - * Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: - * - * **type** - section of parameters - header, body, footer, button - * - * **parameters** - variables for section. - * - * Each variable is an object that can contain the following fields: - * - * **type** - can be text, currency, date_time, image, document or video - * - * **video**- id (mediaId) - * - * **document** - * - * * id (mediaId) - * - * * filename(optional) - * - * **image** - object with field link (image url) - * - * **currency** - object containing parameters currency_code and amount_1000. - * - * * *currency_code* - Currency code as defined in ISO 4217. - * - * * *amount_1000* - Amount multiplied by 1000. - * - * * *fallback_value* - Default text if localization fails. - * - * **date_time** - If the date_time object is used, further definition of the date and time is required. - * - * * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. - * - * * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. - * - * * *fallback_value* - Default text if localization fails. - * - * **button** - if button has parameter - * - * * sub_type (url/quick_reply) - * - * * parameters (array to fill button variable) - * - * * index - button position. - * - * **The number of parameters passed must match the number of parameters in the template** - * @type {Array} - * @memberof SendTemplateRequest - */ - params?: Array; -} - -/** - * Check if a given object implements the SendTemplateRequest interface. - */ -export function instanceOfSendTemplateRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "namespace" in value; - isInstance = isInstance && "template" in value; - isInstance = isInstance && "language" in value; - - return isInstance; -} - -export function SendTemplateRequestFromJSON(json: any): SendTemplateRequest { - return SendTemplateRequestFromJSONTyped(json, false); -} - -export function SendTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'namespace': json['namespace'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'template': json['template'], - 'language': SendTemplateRequestAllOfLanguageFromJSON(json['language']), - 'params': !exists(json, 'params') ? undefined : ((json['params'] as Array).map(SendTemplateRequestAllOfParamsFromJSON)), - }; -} - -export function SendTemplateRequestToJSON(value?: SendTemplateRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'namespace': value.namespace, - 'chatId': value.chatId, - 'phone': value.phone, - 'template': value.template, - 'language': SendTemplateRequestAllOfLanguageToJSON(value.language), - 'params': value.params === undefined ? undefined : ((value.params as Array).map(SendTemplateRequestAllOfParamsToJSON)), - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequestAllOfCurrency.ts b/typescript-fetch/models/SendTemplateRequestAllOfCurrency.ts deleted file mode 100644 index c21ba73..0000000 --- a/typescript-fetch/models/SendTemplateRequestAllOfCurrency.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendTemplateRequestAllOfCurrency - */ -export interface SendTemplateRequestAllOfCurrency { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfCurrency - */ - currencyCode?: string; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfCurrency - */ - amount1000?: number; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfCurrency interface. - */ -export function instanceOfSendTemplateRequestAllOfCurrency(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfCurrencyFromJSON(json: any): SendTemplateRequestAllOfCurrency { - return SendTemplateRequestAllOfCurrencyFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfCurrencyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfCurrency { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'currencyCode': !exists(json, 'currency_code') ? undefined : json['currency_code'], - 'amount1000': !exists(json, 'amount_1000') ? undefined : json['amount_1000'], - }; -} - -export function SendTemplateRequestAllOfCurrencyToJSON(value?: SendTemplateRequestAllOfCurrency | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'currency_code': value.currencyCode, - 'amount_1000': value.amount1000, - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequestAllOfDateTime.ts b/typescript-fetch/models/SendTemplateRequestAllOfDateTime.ts deleted file mode 100644 index 55883df..0000000 --- a/typescript-fetch/models/SendTemplateRequestAllOfDateTime.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendTemplateRequestAllOfDateTimeComponent } from './SendTemplateRequestAllOfDateTimeComponent'; -import { - SendTemplateRequestAllOfDateTimeComponentFromJSON, - SendTemplateRequestAllOfDateTimeComponentFromJSONTyped, - SendTemplateRequestAllOfDateTimeComponentToJSON, -} from './SendTemplateRequestAllOfDateTimeComponent'; -import type { SendTemplateRequestAllOfDateTimeUnixEpoch } from './SendTemplateRequestAllOfDateTimeUnixEpoch'; -import { - SendTemplateRequestAllOfDateTimeUnixEpochFromJSON, - SendTemplateRequestAllOfDateTimeUnixEpochFromJSONTyped, - SendTemplateRequestAllOfDateTimeUnixEpochToJSON, -} from './SendTemplateRequestAllOfDateTimeUnixEpoch'; - -/** - * - * @export - * @interface SendTemplateRequestAllOfDateTime - */ -export interface SendTemplateRequestAllOfDateTime { - /** - * - * @type {SendTemplateRequestAllOfDateTimeComponent} - * @memberof SendTemplateRequestAllOfDateTime - */ - component?: SendTemplateRequestAllOfDateTimeComponent; - /** - * - * @type {SendTemplateRequestAllOfDateTimeUnixEpoch} - * @memberof SendTemplateRequestAllOfDateTime - */ - unixEpoch?: SendTemplateRequestAllOfDateTimeUnixEpoch; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfDateTime interface. - */ -export function instanceOfSendTemplateRequestAllOfDateTime(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfDateTimeFromJSON(json: any): SendTemplateRequestAllOfDateTime { - return SendTemplateRequestAllOfDateTimeFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfDateTimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfDateTime { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'component': !exists(json, 'component') ? undefined : SendTemplateRequestAllOfDateTimeComponentFromJSON(json['component']), - 'unixEpoch': !exists(json, 'unix_epoch') ? undefined : SendTemplateRequestAllOfDateTimeUnixEpochFromJSON(json['unix_epoch']), - }; -} - -export function SendTemplateRequestAllOfDateTimeToJSON(value?: SendTemplateRequestAllOfDateTime | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'component': SendTemplateRequestAllOfDateTimeComponentToJSON(value.component), - 'unix_epoch': SendTemplateRequestAllOfDateTimeUnixEpochToJSON(value.unixEpoch), - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequestAllOfDateTimeComponent.ts b/typescript-fetch/models/SendTemplateRequestAllOfDateTimeComponent.ts deleted file mode 100644 index 51fca47..0000000 --- a/typescript-fetch/models/SendTemplateRequestAllOfDateTimeComponent.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendTemplateRequestAllOfDateTimeComponent - */ -export interface SendTemplateRequestAllOfDateTimeComponent { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - dayOfWeek?: SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - year?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - month?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - dayOfMonth?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - hour?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - minute?: number; - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - calendar?: SendTemplateRequestAllOfDateTimeComponentCalendarEnum; -} - - -/** - * @export - */ -export const SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum = { - Monday: 'MONDAY', - Tuesday: 'TUESDAY', - Wednesday: 'WEDNESDAY', - Thursday: 'THURSDAY', - Friday: 'FRIDAY', - Saturday: 'SATURDAY', - Sunday: 'SUNDAY', - _1: '1', - _2: '2', - _3: '3', - _4: '4', - _5: '5', - _6: '6', - _7: '7' -} as const; -export type SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum = typeof SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum[keyof typeof SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum]; - -/** - * @export - */ -export const SendTemplateRequestAllOfDateTimeComponentCalendarEnum = { - Gregorian: 'GREGORIAN', - SolarHijri: 'SOLAR_HIJRI' -} as const; -export type SendTemplateRequestAllOfDateTimeComponentCalendarEnum = typeof SendTemplateRequestAllOfDateTimeComponentCalendarEnum[keyof typeof SendTemplateRequestAllOfDateTimeComponentCalendarEnum]; - - -/** - * Check if a given object implements the SendTemplateRequestAllOfDateTimeComponent interface. - */ -export function instanceOfSendTemplateRequestAllOfDateTimeComponent(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfDateTimeComponentFromJSON(json: any): SendTemplateRequestAllOfDateTimeComponent { - return SendTemplateRequestAllOfDateTimeComponentFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfDateTimeComponentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfDateTimeComponent { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dayOfWeek': !exists(json, 'day_of_week') ? undefined : json['day_of_week'], - 'year': !exists(json, 'year') ? undefined : json['year'], - 'month': !exists(json, 'month') ? undefined : json['month'], - 'dayOfMonth': !exists(json, 'day_of_month') ? undefined : json['day_of_month'], - 'hour': !exists(json, 'hour') ? undefined : json['hour'], - 'minute': !exists(json, 'minute') ? undefined : json['minute'], - 'calendar': !exists(json, 'calendar') ? undefined : json['calendar'], - }; -} - -export function SendTemplateRequestAllOfDateTimeComponentToJSON(value?: SendTemplateRequestAllOfDateTimeComponent | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'day_of_week': value.dayOfWeek, - 'year': value.year, - 'month': value.month, - 'day_of_month': value.dayOfMonth, - 'hour': value.hour, - 'minute': value.minute, - 'calendar': value.calendar, - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts b/typescript-fetch/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts deleted file mode 100644 index 9ab31f6..0000000 --- a/typescript-fetch/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendTemplateRequestAllOfDateTimeUnixEpoch - */ -export interface SendTemplateRequestAllOfDateTimeUnixEpoch { - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeUnixEpoch - */ - timestamp?: number; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfDateTimeUnixEpoch interface. - */ -export function instanceOfSendTemplateRequestAllOfDateTimeUnixEpoch(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfDateTimeUnixEpochFromJSON(json: any): SendTemplateRequestAllOfDateTimeUnixEpoch { - return SendTemplateRequestAllOfDateTimeUnixEpochFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfDateTimeUnixEpochFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfDateTimeUnixEpoch { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'], - }; -} - -export function SendTemplateRequestAllOfDateTimeUnixEpochToJSON(value?: SendTemplateRequestAllOfDateTimeUnixEpoch | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'timestamp': value.timestamp, - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequestAllOfLanguage.ts b/typescript-fetch/models/SendTemplateRequestAllOfLanguage.ts deleted file mode 100644 index aba150f..0000000 --- a/typescript-fetch/models/SendTemplateRequestAllOfLanguage.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateLanguageProp } from './TemplateLanguageProp'; -import { - TemplateLanguagePropFromJSON, - TemplateLanguagePropFromJSONTyped, - TemplateLanguagePropToJSON, -} from './TemplateLanguageProp'; - -/** - * Object, containing fields "policy" and "code". - * - * **policy** - now "deterministic" is only available option; - * - * **code** - one of supported language codes - * @export - * @interface SendTemplateRequestAllOfLanguage - */ -export interface SendTemplateRequestAllOfLanguage { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfLanguage - */ - policy?: SendTemplateRequestAllOfLanguagePolicyEnum; - /** - * - * @type {TemplateLanguageProp} - * @memberof SendTemplateRequestAllOfLanguage - */ - code?: TemplateLanguageProp; -} - - -/** - * @export - */ -export const SendTemplateRequestAllOfLanguagePolicyEnum = { - Deterministic: 'deterministic' -} as const; -export type SendTemplateRequestAllOfLanguagePolicyEnum = typeof SendTemplateRequestAllOfLanguagePolicyEnum[keyof typeof SendTemplateRequestAllOfLanguagePolicyEnum]; - - -/** - * Check if a given object implements the SendTemplateRequestAllOfLanguage interface. - */ -export function instanceOfSendTemplateRequestAllOfLanguage(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfLanguageFromJSON(json: any): SendTemplateRequestAllOfLanguage { - return SendTemplateRequestAllOfLanguageFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfLanguageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfLanguage { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'policy': !exists(json, 'policy') ? undefined : json['policy'], - 'code': !exists(json, 'code') ? undefined : TemplateLanguagePropFromJSON(json['code']), - }; -} - -export function SendTemplateRequestAllOfLanguageToJSON(value?: SendTemplateRequestAllOfLanguage | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'policy': value.policy, - 'code': TemplateLanguagePropToJSON(value.code), - }; -} - diff --git a/typescript-fetch/models/SendTemplateRequestAllOfParams.ts b/typescript-fetch/models/SendTemplateRequestAllOfParams.ts deleted file mode 100644 index 4abedf0..0000000 --- a/typescript-fetch/models/SendTemplateRequestAllOfParams.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendTemplateRequestAllOfCurrency } from './SendTemplateRequestAllOfCurrency'; -import { - SendTemplateRequestAllOfCurrencyFromJSON, - SendTemplateRequestAllOfCurrencyFromJSONTyped, - SendTemplateRequestAllOfCurrencyToJSON, -} from './SendTemplateRequestAllOfCurrency'; -import type { SendTemplateRequestAllOfDateTime } from './SendTemplateRequestAllOfDateTime'; -import { - SendTemplateRequestAllOfDateTimeFromJSON, - SendTemplateRequestAllOfDateTimeFromJSONTyped, - SendTemplateRequestAllOfDateTimeToJSON, -} from './SendTemplateRequestAllOfDateTime'; - -/** - * - * @export - * @interface SendTemplateRequestAllOfParams - */ -export interface SendTemplateRequestAllOfParams { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfParams - */ - _default?: string; - /** - * - * @type {SendTemplateRequestAllOfCurrency} - * @memberof SendTemplateRequestAllOfParams - */ - currency?: SendTemplateRequestAllOfCurrency; - /** - * - * @type {SendTemplateRequestAllOfDateTime} - * @memberof SendTemplateRequestAllOfParams - */ - dateTime?: SendTemplateRequestAllOfDateTime; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfParams interface. - */ -export function instanceOfSendTemplateRequestAllOfParams(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfParamsFromJSON(json: any): SendTemplateRequestAllOfParams { - return SendTemplateRequestAllOfParamsFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfParams { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - '_default': !exists(json, 'default') ? undefined : json['default'], - 'currency': !exists(json, 'currency') ? undefined : SendTemplateRequestAllOfCurrencyFromJSON(json['currency']), - 'dateTime': !exists(json, 'date_time') ? undefined : SendTemplateRequestAllOfDateTimeFromJSON(json['date_time']), - }; -} - -export function SendTemplateRequestAllOfParamsToJSON(value?: SendTemplateRequestAllOfParams | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'default': value._default, - 'currency': SendTemplateRequestAllOfCurrencyToJSON(value.currency), - 'date_time': SendTemplateRequestAllOfDateTimeToJSON(value.dateTime), - }; -} - diff --git a/typescript-fetch/models/SetCommerce.ts b/typescript-fetch/models/SetCommerce.ts deleted file mode 100644 index 1cdc509..0000000 --- a/typescript-fetch/models/SetCommerce.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetCommerce - */ -export interface SetCommerce { - /** - * - * @type {boolean} - * @memberof SetCommerce - */ - success?: boolean; -} - -/** - * Check if a given object implements the SetCommerce interface. - */ -export function instanceOfSetCommerce(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetCommerceFromJSON(json: any): SetCommerce { - return SetCommerceFromJSONTyped(json, false); -} - -export function SetCommerceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetCommerce { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'success': !exists(json, 'success') ? undefined : json['success'], - }; -} - -export function SetCommerceToJSON(value?: SetCommerce | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'success': value.success, - }; -} - diff --git a/typescript-fetch/models/SetMe.ts b/typescript-fetch/models/SetMe.ts deleted file mode 100644 index 9fee480..0000000 --- a/typescript-fetch/models/SetMe.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetMe - */ -export interface SetMe { - /** - * - * @type {string} - * @memberof SetMe - */ - result?: string; -} - -/** - * Check if a given object implements the SetMe interface. - */ -export function instanceOfSetMe(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetMeFromJSON(json: any): SetMe { - return SetMeFromJSONTyped(json, false); -} - -export function SetMeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetMe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'result': !exists(json, 'result') ? undefined : json['result'], - }; -} - -export function SetMeToJSON(value?: SetMe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'result': value.result, - }; -} - diff --git a/typescript-fetch/models/SetMeRequest.ts b/typescript-fetch/models/SetMeRequest.ts deleted file mode 100644 index f361b3a..0000000 --- a/typescript-fetch/models/SetMeRequest.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetMeRequest - */ -export interface SetMeRequest { - /** - * Profile`s About section. - * @type {string} - * @memberof SetMeRequest - */ - about?: string; - /** - * Address of the business - * @type {string} - * @memberof SetMeRequest - */ - address?: string; - /** - * Description of the business. Max 256 characters - * @type {string} - * @memberof SetMeRequest - */ - description?: string; - /** - * Business email - * @type {string} - * @memberof SetMeRequest - */ - email?: string; - /** - * Linked phone number - * @type {string} - * @memberof SetMeRequest - */ - phone?: string; - /** - * Industry of the business - * @type {string} - * @memberof SetMeRequest - */ - vertical?: SetMeRequestVerticalEnum; - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof SetMeRequest - */ - photo?: string; -} - - -/** - * @export - */ -export const SetMeRequestVerticalEnum = { - Automotive: 'Automotive', - BeautySpaAndSalon: 'Beauty, Spa and Salon', - ClothingAndApparel: 'Clothing and Apparel', - Education: 'Education', - Entertainment: 'Entertainment', - EventPlanningAndService: 'Event Planning and Service', - FinanceAndBanking: 'Finance and Banking', - FoodAndGrocery: 'Food and Grocery', - PublicService: 'Public Service', - HotelAndLodging: 'Hotel and Lodging', - MedicalAndHealth: 'Medical and Health', - NonProfit: 'Non-profit', - ProfessionalServices: 'Professional Services', - ShoppingAndRetail: 'Shopping and Retail', - TravelAndTransportation: 'Travel and Transportation', - Restaurant: 'Restaurant', - Other: 'Other', - Empty: '' -} as const; -export type SetMeRequestVerticalEnum = typeof SetMeRequestVerticalEnum[keyof typeof SetMeRequestVerticalEnum]; - - -/** - * Check if a given object implements the SetMeRequest interface. - */ -export function instanceOfSetMeRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetMeRequestFromJSON(json: any): SetMeRequest { - return SetMeRequestFromJSONTyped(json, false); -} - -export function SetMeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetMeRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'about': !exists(json, 'about') ? undefined : json['about'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'vertical': !exists(json, 'vertical') ? undefined : json['vertical'], - 'photo': !exists(json, 'photo') ? undefined : json['photo'], - }; -} - -export function SetMeRequestToJSON(value?: SetMeRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'about': value.about, - 'address': value.address, - 'description': value.description, - 'email': value.email, - 'phone': value.phone, - 'vertical': value.vertical, - 'photo': value.photo, - }; -} - diff --git a/typescript-fetch/models/SetSettings200Response.ts b/typescript-fetch/models/SetSettings200Response.ts deleted file mode 100644 index 737984c..0000000 --- a/typescript-fetch/models/SetSettings200Response.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SetSettings200ResponseAllOfUpdate } from './SetSettings200ResponseAllOfUpdate'; -import { - SetSettings200ResponseAllOfUpdateFromJSON, - SetSettings200ResponseAllOfUpdateFromJSONTyped, - SetSettings200ResponseAllOfUpdateToJSON, -} from './SetSettings200ResponseAllOfUpdate'; - -/** - * - * @export - * @interface SetSettings200Response - */ -export interface SetSettings200Response { - /** - * - * @type {string} - * @memberof SetSettings200Response - */ - webhookUrl?: string | null; - /** - * - * @type {SetSettings200ResponseAllOfUpdate} - * @memberof SetSettings200Response - */ - update: SetSettings200ResponseAllOfUpdate; -} - -/** - * Check if a given object implements the SetSettings200Response interface. - */ -export function instanceOfSetSettings200Response(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "update" in value; - - return isInstance; -} - -export function SetSettings200ResponseFromJSON(json: any): SetSettings200Response { - return SetSettings200ResponseFromJSONTyped(json, false); -} - -export function SetSettings200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetSettings200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': !exists(json, 'webhookUrl') ? undefined : json['webhookUrl'], - 'update': SetSettings200ResponseAllOfUpdateFromJSON(json['update']), - }; -} - -export function SetSettings200ResponseToJSON(value?: SetSettings200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - 'update': SetSettings200ResponseAllOfUpdateToJSON(value.update), - }; -} - diff --git a/typescript-fetch/models/SetSettings200ResponseAllOfUpdate.ts b/typescript-fetch/models/SetSettings200ResponseAllOfUpdate.ts deleted file mode 100644 index d65c3db..0000000 --- a/typescript-fetch/models/SetSettings200ResponseAllOfUpdate.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetSettings200ResponseAllOfUpdate - */ -export interface SetSettings200ResponseAllOfUpdate { - /** - * - * @type {string} - * @memberof SetSettings200ResponseAllOfUpdate - */ - webhookUrl?: string | null; -} - -/** - * Check if a given object implements the SetSettings200ResponseAllOfUpdate interface. - */ -export function instanceOfSetSettings200ResponseAllOfUpdate(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetSettings200ResponseAllOfUpdateFromJSON(json: any): SetSettings200ResponseAllOfUpdate { - return SetSettings200ResponseAllOfUpdateFromJSONTyped(json, false); -} - -export function SetSettings200ResponseAllOfUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetSettings200ResponseAllOfUpdate { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': !exists(json, 'webhookUrl') ? undefined : json['webhookUrl'], - }; -} - -export function SetSettings200ResponseAllOfUpdateToJSON(value?: SetSettings200ResponseAllOfUpdate | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - }; -} - diff --git a/typescript-fetch/models/SetWebhookStatus.ts b/typescript-fetch/models/SetWebhookStatus.ts deleted file mode 100644 index 07313be..0000000 --- a/typescript-fetch/models/SetWebhookStatus.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetWebhookStatus - */ -export interface SetWebhookStatus { - /** - * Flag indicating that the current request has changed webhook - * @type {boolean} - * @memberof SetWebhookStatus - */ - set?: boolean; - /** - * - * @type {string} - * @memberof SetWebhookStatus - */ - message?: string; -} - -/** - * Check if a given object implements the SetWebhookStatus interface. - */ -export function instanceOfSetWebhookStatus(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetWebhookStatusFromJSON(json: any): SetWebhookStatus { - return SetWebhookStatusFromJSONTyped(json, false); -} - -export function SetWebhookStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetWebhookStatus { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'set': !exists(json, 'set') ? undefined : json['set'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function SetWebhookStatusToJSON(value?: SetWebhookStatus | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'set': value.set, - 'message': value.message, - }; -} - diff --git a/typescript-fetch/models/Settings.ts b/typescript-fetch/models/Settings.ts deleted file mode 100644 index b627e54..0000000 --- a/typescript-fetch/models/Settings.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface Settings - */ -export interface Settings { - /** - * - * @type {string} - * @memberof Settings - */ - webhookUrl?: string | null; -} - -/** - * Check if a given object implements the Settings interface. - */ -export function instanceOfSettings(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SettingsFromJSON(json: any): Settings { - return SettingsFromJSONTyped(json, false); -} - -export function SettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Settings { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': !exists(json, 'webhookUrl') ? undefined : json['webhookUrl'], - }; -} - -export function SettingsToJSON(value?: Settings | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - }; -} - diff --git a/typescript-fetch/models/TemplateCategoryProp.ts b/typescript-fetch/models/TemplateCategoryProp.ts deleted file mode 100644 index b8d956c..0000000 --- a/typescript-fetch/models/TemplateCategoryProp.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * Template category - * @export - */ -export const TemplateCategoryProp = { - Marketing: 'MARKETING', - Transactional: 'TRANSACTIONAL', - Otp: 'OTP' -} as const; -export type TemplateCategoryProp = typeof TemplateCategoryProp[keyof typeof TemplateCategoryProp]; - - -export function TemplateCategoryPropFromJSON(json: any): TemplateCategoryProp { - return TemplateCategoryPropFromJSONTyped(json, false); -} - -export function TemplateCategoryPropFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateCategoryProp { - return json as TemplateCategoryProp; -} - -export function TemplateCategoryPropToJSON(value?: TemplateCategoryProp | null): any { - return value as any; -} - diff --git a/typescript-fetch/models/TemplateComponentsProp.ts b/typescript-fetch/models/TemplateComponentsProp.ts deleted file mode 100644 index 7f722aa..0000000 --- a/typescript-fetch/models/TemplateComponentsProp.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateComponentsPropInner } from './TemplateComponentsPropInner'; -import { - TemplateComponentsPropInnerFromJSON, - TemplateComponentsPropInnerFromJSONTyped, - TemplateComponentsPropInnerToJSON, -} from './TemplateComponentsPropInner'; - -/** - * Array of template components - * @export - * @interface TemplateComponentsProp - */ -export interface TemplateComponentsProp extends Array { -} - -/** - * Check if a given object implements the TemplateComponentsProp interface. - */ -export function instanceOfTemplateComponentsProp(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function TemplateComponentsPropFromJSON(json: any): TemplateComponentsProp { - return TemplateComponentsPropFromJSONTyped(json, false); -} - -export function TemplateComponentsPropFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateComponentsProp { - return json; -} - -export function TemplateComponentsPropToJSON(value?: TemplateComponentsProp | null): any { - return value; -} - diff --git a/typescript-fetch/models/TemplateComponentsPropInner.ts b/typescript-fetch/models/TemplateComponentsPropInner.ts deleted file mode 100644 index 4ed7c0d..0000000 --- a/typescript-fetch/models/TemplateComponentsPropInner.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateComponentsPropInnerButtonsInner } from './TemplateComponentsPropInnerButtonsInner'; -import { - TemplateComponentsPropInnerButtonsInnerFromJSON, - TemplateComponentsPropInnerButtonsInnerFromJSONTyped, - TemplateComponentsPropInnerButtonsInnerToJSON, -} from './TemplateComponentsPropInnerButtonsInner'; - -/** - * - * @export - * @interface TemplateComponentsPropInner - */ -export interface TemplateComponentsPropInner { - /** - * - * @type {string} - * @memberof TemplateComponentsPropInner - */ - type?: TemplateComponentsPropInnerTypeEnum; - /** - * Only for HEADER type - * @type {string} - * @memberof TemplateComponentsPropInner - */ - format?: TemplateComponentsPropInnerFormatEnum; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInner - */ - text?: string; - /** - * - * @type {object} - * @memberof TemplateComponentsPropInner - */ - example?: object; - /** - * - * @type {Array} - * @memberof TemplateComponentsPropInner - */ - buttons?: Array; -} - - -/** - * @export - */ -export const TemplateComponentsPropInnerTypeEnum = { - Body: 'BODY', - Header: 'HEADER', - Footer: 'FOOTER', - Buttons: 'BUTTONS' -} as const; -export type TemplateComponentsPropInnerTypeEnum = typeof TemplateComponentsPropInnerTypeEnum[keyof typeof TemplateComponentsPropInnerTypeEnum]; - -/** - * @export - */ -export const TemplateComponentsPropInnerFormatEnum = { - Text: 'TEXT', - Image: 'IMAGE', - Document: 'DOCUMENT', - Video: 'VIDEO' -} as const; -export type TemplateComponentsPropInnerFormatEnum = typeof TemplateComponentsPropInnerFormatEnum[keyof typeof TemplateComponentsPropInnerFormatEnum]; - - -/** - * Check if a given object implements the TemplateComponentsPropInner interface. - */ -export function instanceOfTemplateComponentsPropInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function TemplateComponentsPropInnerFromJSON(json: any): TemplateComponentsPropInner { - return TemplateComponentsPropInnerFromJSONTyped(json, false); -} - -export function TemplateComponentsPropInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateComponentsPropInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'type': !exists(json, 'type') ? undefined : json['type'], - 'format': !exists(json, 'format') ? undefined : json['format'], - 'text': !exists(json, 'text') ? undefined : json['text'], - 'example': !exists(json, 'example') ? undefined : json['example'], - 'buttons': !exists(json, 'buttons') ? undefined : ((json['buttons'] as Array).map(TemplateComponentsPropInnerButtonsInnerFromJSON)), - }; -} - -export function TemplateComponentsPropInnerToJSON(value?: TemplateComponentsPropInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'type': value.type, - 'format': value.format, - 'text': value.text, - 'example': value.example, - 'buttons': value.buttons === undefined ? undefined : ((value.buttons as Array).map(TemplateComponentsPropInnerButtonsInnerToJSON)), - }; -} - diff --git a/typescript-fetch/models/TemplateComponentsPropInnerButtonsInner.ts b/typescript-fetch/models/TemplateComponentsPropInnerButtonsInner.ts deleted file mode 100644 index 4a04aff..0000000 --- a/typescript-fetch/models/TemplateComponentsPropInnerButtonsInner.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface TemplateComponentsPropInnerButtonsInner - */ -export interface TemplateComponentsPropInnerButtonsInner { - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - type?: TemplateComponentsPropInnerButtonsInnerTypeEnum; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - text?: string; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - url?: string; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - phoneNumber?: string; - /** - * - * @type {Array} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - example?: Array; -} - - -/** - * @export - */ -export const TemplateComponentsPropInnerButtonsInnerTypeEnum = { - PhoneNumber: 'PHONE_NUMBER', - Url: 'URL', - QuickReply: 'QUICK_REPLY' -} as const; -export type TemplateComponentsPropInnerButtonsInnerTypeEnum = typeof TemplateComponentsPropInnerButtonsInnerTypeEnum[keyof typeof TemplateComponentsPropInnerButtonsInnerTypeEnum]; - - -/** - * Check if a given object implements the TemplateComponentsPropInnerButtonsInner interface. - */ -export function instanceOfTemplateComponentsPropInnerButtonsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function TemplateComponentsPropInnerButtonsInnerFromJSON(json: any): TemplateComponentsPropInnerButtonsInner { - return TemplateComponentsPropInnerButtonsInnerFromJSONTyped(json, false); -} - -export function TemplateComponentsPropInnerButtonsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateComponentsPropInnerButtonsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'type': !exists(json, 'type') ? undefined : json['type'], - 'text': !exists(json, 'text') ? undefined : json['text'], - 'url': !exists(json, 'url') ? undefined : json['url'], - 'phoneNumber': !exists(json, 'phone_number') ? undefined : json['phone_number'], - 'example': !exists(json, 'example') ? undefined : json['example'], - }; -} - -export function TemplateComponentsPropInnerButtonsInnerToJSON(value?: TemplateComponentsPropInnerButtonsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'type': value.type, - 'text': value.text, - 'url': value.url, - 'phone_number': value.phoneNumber, - 'example': value.example, - }; -} - diff --git a/typescript-fetch/models/TemplateLanguageProp.ts b/typescript-fetch/models/TemplateLanguageProp.ts deleted file mode 100644 index 80a142a..0000000 --- a/typescript-fetch/models/TemplateLanguageProp.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * Template language - * @export - */ -export const TemplateLanguageProp = { - Af: 'af', - Sq: 'sq', - Ar: 'ar', - Az: 'az', - Bn: 'bn', - Bg: 'bg', - Ca: 'ca', - ZhCn: 'zh_CN', - ZhHk: 'zh_HK', - ZhTw: 'zh_TW', - Hr: 'hr', - Cs: 'cs', - Da: 'da', - Nl: 'nl', - En: 'en', - EnGb: 'en_GB', - EnUs: 'en_US', - Et: 'et', - Fil: 'fil', - Fi: 'fi', - Fr: 'fr', - De: 'de', - El: 'el', - Gu: 'gu', - He: 'he', - Hi: 'hi', - Hu: 'hu', - Id: 'id', - Ga: 'ga', - It: 'it', - Ja: 'ja', - Kn: 'kn', - Kk: 'kk', - Ko: 'ko', - Lo: 'lo', - Lv: 'lv', - Lt: 'lt', - Mk: 'mk', - Ms: 'ms', - Mr: 'mr', - Nb: 'nb', - Fa: 'fa', - Pl: 'pl', - PtBr: 'pt_BR', - PtPt: 'pt_PT', - Pa: 'pa', - Ro: 'ro', - Ru: 'ru', - Sr: 'sr', - Sk: 'sk', - Sl: 'sl', - Es: 'es', - EsAr: 'es_AR', - EsEs: 'es_ES', - EsMx: 'es_MX', - Sw: 'sw', - Sv: 'sv', - Ta: 'ta', - Te: 'te', - Th: 'th', - Tr: 'tr', - Uk: 'uk', - Ur: 'ur', - Uz: 'uz', - Vi: 'vi' -} as const; -export type TemplateLanguageProp = typeof TemplateLanguageProp[keyof typeof TemplateLanguageProp]; - - -export function TemplateLanguagePropFromJSON(json: any): TemplateLanguageProp { - return TemplateLanguagePropFromJSONTyped(json, false); -} - -export function TemplateLanguagePropFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateLanguageProp { - return json as TemplateLanguageProp; -} - -export function TemplateLanguagePropToJSON(value?: TemplateLanguageProp | null): any { - return value as any; -} - diff --git a/typescript-fetch/models/UploadMedia.ts b/typescript-fetch/models/UploadMedia.ts deleted file mode 100644 index c09250b..0000000 --- a/typescript-fetch/models/UploadMedia.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface UploadMedia - */ -export interface UploadMedia { - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof UploadMedia - */ - body: string; -} - -/** - * Check if a given object implements the UploadMedia interface. - */ -export function instanceOfUploadMedia(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - - return isInstance; -} - -export function UploadMediaFromJSON(json: any): UploadMedia { - return UploadMediaFromJSONTyped(json, false); -} - -export function UploadMediaFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadMedia { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'body': json['body'], - }; -} - -export function UploadMediaToJSON(value?: UploadMedia | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'body': value.body, - }; -} - diff --git a/typescript-fetch/models/WebhookUrl.ts b/typescript-fetch/models/WebhookUrl.ts deleted file mode 100644 index 8023fe8..0000000 --- a/typescript-fetch/models/WebhookUrl.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface WebhookUrl - */ -export interface WebhookUrl { - /** - * Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - * @type {string} - * @memberof WebhookUrl - */ - webhookUrl: string; -} - -/** - * Check if a given object implements the WebhookUrl interface. - */ -export function instanceOfWebhookUrl(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "webhookUrl" in value; - - return isInstance; -} - -export function WebhookUrlFromJSON(json: any): WebhookUrl { - return WebhookUrlFromJSONTyped(json, false); -} - -export function WebhookUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookUrl { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': json['webhookUrl'], - }; -} - -export function WebhookUrlToJSON(value?: WebhookUrl | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - }; -} - diff --git a/typescript-fetch/models/index.ts b/typescript-fetch/models/index.ts deleted file mode 100644 index 8cd282e..0000000 --- a/typescript-fetch/models/index.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Ack'; -export * from './AddTemplateRequest'; -export * from './ChannelExtendedStatisticsInner'; -export * from './ChannelStatistics'; -export * from './ChannelStatus'; -export * from './Commerce'; -export * from './CommerceParams'; -export * from './Contacts'; -export * from './ContactsContactsInner'; -export * from './ContactsRequest'; -export * from './GetAckInfo'; -export * from './GetAckInfoHooksInner'; -export * from './GetCommerceInner'; -export * from './GetIP'; -export * from './GetMe'; -export * from './GetMe401Response'; -export * from './GetMessages'; -export * from './GetMessagesMessagesInner'; -export * from './GetTemplates'; -export * from './GetTemplatesTemplatesInner'; -export * from './MeComponents'; -export * from './MediaId'; -export * from './Message'; -export * from './ReadMessageRequest'; -export * from './RemoveTemplateRequest'; -export * from './SendContactRequest'; -export * from './SendFileRequest'; -export * from './SendListRequest'; -export * from './SendListRequestAllOfRows'; -export * from './SendListRequestAllOfSections'; -export * from './SendLocationRequest'; -export * from './SendMessageRequest'; -export * from './SendMessageStatus'; -export * from './SendProductRequest'; -export * from './SendProductRequestAllOfAction'; -export * from './SendProductRequestAllOfActionProductItems'; -export * from './SendProductRequestAllOfActionSections'; -export * from './SendTemplateRequest'; -export * from './SendTemplateRequestAllOfCurrency'; -export * from './SendTemplateRequestAllOfDateTime'; -export * from './SendTemplateRequestAllOfDateTimeComponent'; -export * from './SendTemplateRequestAllOfDateTimeUnixEpoch'; -export * from './SendTemplateRequestAllOfLanguage'; -export * from './SendTemplateRequestAllOfParams'; -export * from './SetCommerce'; -export * from './SetMe'; -export * from './SetMeRequest'; -export * from './SetSettings200Response'; -export * from './SetSettings200ResponseAllOfUpdate'; -export * from './SetWebhookStatus'; -export * from './Settings'; -export * from './TemplateCategoryProp'; -export * from './TemplateComponentsPropInner'; -export * from './TemplateComponentsPropInnerButtonsInner'; -export * from './TemplateLanguageProp'; -export * from './UploadMedia'; -export * from './WebhookUrl'; diff --git a/typescript-fetch/openapitools.json b/typescript-fetch/openapitools.json deleted file mode 100644 index 4053ae8..0000000 --- a/typescript-fetch/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "7.0.1" - } -} diff --git a/typescript-fetch/package-lock.json b/typescript-fetch/package-lock.json deleted file mode 100644 index 5bf7c84..0000000 --- a/typescript-fetch/package-lock.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "one_msg_waba_sdk_ts", - "version": "2.39.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "one_msg_waba_sdk_ts", - "version": "2.39.0", - "devDependencies": { - "typescript": "^4.0" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - } - }, - "dependencies": { - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - } - } -} diff --git a/typescript-fetch/package.json b/typescript-fetch/package.json deleted file mode 100644 index 08c9012..0000000 --- a/typescript-fetch/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "one_msg_waba_sdk_ts", - "version": "2.39.4", - "description": "OpenAPI client for one_msg_waba_sdk_ts", - "author": "OpenAPI-Generator", - "repository": { - "type": "git", - "url": "https://github.com/1msg/1sdk" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "devDependencies": { - "typescript": "^4.0" - } -} diff --git a/typescript-fetch/runtime.ts b/typescript-fetch/runtime.ts deleted file mode 100644 index 5aae4af..0000000 --- a/typescript-fetch/runtime.ts +++ /dev/null @@ -1,434 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "https://api.1msg.io/YOUR_INSTANCE_NUMBER".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - private configuration: ConfigurationParameters; - constructor(configuration: ConfigurationParameters = {}) { - this.configuration = configuration - } - - set config(configuration: ConfigurationParameters) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/typescript-fetch/src/apis/ChannelApi.ts b/typescript-fetch/src/apis/ChannelApi.ts deleted file mode 100644 index 2a3822f..0000000 --- a/typescript-fetch/src/apis/ChannelApi.ts +++ /dev/null @@ -1,378 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ChannelExtendedStatisticsInner, - ChannelStatistics, - ChannelStatus, - GetCommerceInner, - GetIP, - GetMe, - GetMe401Response, - SetMe, - SetMeRequest, - SetSettings200Response, - Settings, -} from '../models/index'; -import { - ChannelExtendedStatisticsInnerFromJSON, - ChannelExtendedStatisticsInnerToJSON, - ChannelStatisticsFromJSON, - ChannelStatisticsToJSON, - ChannelStatusFromJSON, - ChannelStatusToJSON, - GetCommerceInnerFromJSON, - GetCommerceInnerToJSON, - GetIPFromJSON, - GetIPToJSON, - GetMeFromJSON, - GetMeToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - SetMeFromJSON, - SetMeToJSON, - SetMeRequestFromJSON, - SetMeRequestToJSON, - SetSettings200ResponseFromJSON, - SetSettings200ResponseToJSON, - SettingsFromJSON, - SettingsToJSON, -} from '../models/index'; - -export interface GetStatisticsRequest { - date?: string; -} - -export interface SetMeOperationRequest { - setMeRequest: SetMeRequest; -} - -export interface SetSettingsRequest { - settings: Settings; -} - -/** - * - */ -export class ChannelApi extends runtime.BaseAPI { - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Get Commerce Settings - */ - async getCommerceRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/commerce`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetCommerceInnerFromJSON)); - } - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Get Commerce Settings - */ - async getCommerce(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getCommerceRaw(initOverrides); - return await response.value(); - } - - /** - * Get channel usage extended statistics - * Get Extended Channel statistics - */ - async getExtendedStatisticsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/extendedStatistics`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChannelExtendedStatisticsInnerFromJSON)); - } - - /** - * Get channel usage extended statistics - * Get Extended Channel statistics - */ - async getExtendedStatistics(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getExtendedStatisticsRaw(initOverrides); - return await response.value(); - } - - /** - * Use this edge to retrieve your profile\'s About info - * Get Profile Info - */ - async getMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/me`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetMeFromJSON(jsonValue)); - } - - /** - * Use this edge to retrieve your profile\'s About info - * Get Profile Info - */ - async getMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMeRaw(initOverrides); - return await response.value(); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Get Settings - */ - async getSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/settings`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SettingsFromJSON(jsonValue)); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Get Settings - */ - async getSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSettingsRaw(initOverrides); - return await response.value(); - } - - /** - * Get channel usage statistics - * Get Channel statistics - */ - async getStatisticsRaw(requestParameters: GetStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.date !== undefined) { - queryParameters['date'] = requestParameters.date; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/statistics`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ChannelStatisticsFromJSON(jsonValue)); - } - - /** - * Get channel usage statistics - * Get Channel statistics - */ - async getStatistics(requestParameters: GetStatisticsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatisticsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * Get Status - */ - async getStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/status`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ChannelStatusFromJSON(jsonValue)); - } - - /** - * Returns the status of your WhatsApp Business API client. Channel statuses: **connected**_/_**connecting** - everything is ok. **disconnected** - The Coreapp is not connected to the WhatsApp servers. **uninitialized** - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status. **unregistered** - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support) - * Get Status - */ - async getStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatusRaw(initOverrides); - return await response.value(); - } - - /** - * - * Get channel server IP - */ - async outputIPRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/outputIP`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetIPFromJSON(jsonValue)); - } - - /** - * - * Get channel server IP - */ - async outputIP(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.outputIPRaw(initOverrides); - return await response.value(); - } - - /** - * Change user info - * Change user info - */ - async setMeRaw(requestParameters: SetMeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.setMeRequest === null || requestParameters.setMeRequest === undefined) { - throw new runtime.RequiredError('setMeRequest','Required parameter requestParameters.setMeRequest was null or undefined when calling setMe.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/me`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SetMeRequestToJSON(requestParameters.setMeRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetMeFromJSON(jsonValue)); - } - - /** - * Change user info - * Change user info - */ - async setMe(requestParameters: SetMeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setMeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Set settings - */ - async setSettingsRaw(requestParameters: SetSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.settings === null || requestParameters.settings === undefined) { - throw new runtime.RequiredError('settings','Required parameter requestParameters.settings was null or undefined when calling setSettings.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/settings`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SettingsToJSON(requestParameters.settings), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetSettings200ResponseFromJSON(jsonValue)); - } - - /** - * **webhookUrl** - Http or https URL for receiving notifications. - * Set settings - */ - async setSettings(requestParameters: SetSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setSettingsRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/src/apis/MediaApi.ts b/typescript-fetch/src/apis/MediaApi.ts deleted file mode 100644 index 20003dd..0000000 --- a/typescript-fetch/src/apis/MediaApi.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - MediaId, - UploadMedia, -} from '../models/index'; -import { - MediaIdFromJSON, - MediaIdToJSON, - UploadMediaFromJSON, - UploadMediaToJSON, -} from '../models/index'; - -export interface UploadMediaRequest { - uploadMedia: UploadMedia; -} - -/** - * - */ -export class MediaApi extends runtime.BaseAPI { - - /** - * Upload media and get mediaId. Uploaded media can be sent in template - * Upload media & get mediaId - */ - async uploadMediaRaw(requestParameters: UploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.uploadMedia === null || requestParameters.uploadMedia === undefined) { - throw new runtime.RequiredError('uploadMedia','Required parameter requestParameters.uploadMedia was null or undefined when calling uploadMedia.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/uploadMedia`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: UploadMediaToJSON(requestParameters.uploadMedia), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => MediaIdFromJSON(jsonValue)); - } - - /** - * Upload media and get mediaId. Uploaded media can be sent in template - * Upload media & get mediaId - */ - async uploadMedia(requestParameters: UploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.uploadMediaRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/src/apis/MessagingApi.ts b/typescript-fetch/src/apis/MessagingApi.ts deleted file mode 100644 index 49780a8..0000000 --- a/typescript-fetch/src/apis/MessagingApi.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - GetMe401Response, - GetMessages, - ReadMessageRequest, - SendContactRequest, - SendFileRequest, - SendListRequest, - SendLocationRequest, - SendMessageRequest, - SendMessageStatus, - SetMe, -} from '../models/index'; -import { - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - GetMessagesFromJSON, - GetMessagesToJSON, - ReadMessageRequestFromJSON, - ReadMessageRequestToJSON, - SendContactRequestFromJSON, - SendContactRequestToJSON, - SendFileRequestFromJSON, - SendFileRequestToJSON, - SendListRequestFromJSON, - SendListRequestToJSON, - SendLocationRequestFromJSON, - SendLocationRequestToJSON, - SendMessageRequestFromJSON, - SendMessageRequestToJSON, - SendMessageStatusFromJSON, - SendMessageStatusToJSON, - SetMeFromJSON, - SetMeToJSON, -} from '../models/index'; - -export interface MessagesListRequest { - last?: boolean; - lastMessageNumber?: number; - firstMessageNumber?: number; - limit?: number; - chatId?: string; - minTime?: number; - maxTime?: number; - msgId?: string; -} - -export interface ReadMessageOperationRequest { - readMessageRequest?: ReadMessageRequest; -} - -export interface SendContactOperationRequest { - sendContactRequest: SendContactRequest; -} - -export interface SendFileOperationRequest { - sendFileRequest: SendFileRequest; -} - -export interface SendListOperationRequest { - sendListRequest: SendListRequest; -} - -export interface SendLocationOperationRequest { - sendLocationRequest: SendLocationRequest; -} - -export interface SendMessageOperationRequest { - sendMessageRequest: SendMessageRequest; -} - -/** - * - */ -export class MessagingApi extends runtime.BaseAPI { - - /** - * - * Get messages list - */ - async messagesListRaw(requestParameters: MessagesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.last !== undefined) { - queryParameters['last'] = requestParameters.last; - } - - if (requestParameters.lastMessageNumber !== undefined) { - queryParameters['lastMessageNumber'] = requestParameters.lastMessageNumber; - } - - if (requestParameters.firstMessageNumber !== undefined) { - queryParameters['firstMessageNumber'] = requestParameters.firstMessageNumber; - } - - if (requestParameters.limit !== undefined) { - queryParameters['limit'] = requestParameters.limit; - } - - if (requestParameters.chatId !== undefined) { - queryParameters['chatId'] = requestParameters.chatId; - } - - if (requestParameters.minTime !== undefined) { - queryParameters['min_time'] = requestParameters.minTime; - } - - if (requestParameters.maxTime !== undefined) { - queryParameters['max_time'] = requestParameters.maxTime; - } - - if (requestParameters.msgId !== undefined) { - queryParameters['msgId'] = requestParameters.msgId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/messages`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetMessagesFromJSON(jsonValue)); - } - - /** - * - * Get messages list - */ - async messagesList(requestParameters: MessagesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.messagesListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * Mark message as read - */ - async readMessageRaw(requestParameters: ReadMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/readMessage`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ReadMessageRequestToJSON(requestParameters.readMessageRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetMeFromJSON(jsonValue)); - } - - /** - * - * Mark message as read - */ - async readMessage(requestParameters: ReadMessageOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.readMessageRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Contact - */ - async sendContactRaw(requestParameters: SendContactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendContactRequest === null || requestParameters.sendContactRequest === undefined) { - throw new runtime.RequiredError('sendContactRequest','Required parameter requestParameters.sendContactRequest was null or undefined when calling sendContact.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendContact`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendContactRequestToJSON(requestParameters.sendContactRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Contact - */ - async sendContact(requestParameters: SendContactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendContactRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a File - */ - async sendFileRaw(requestParameters: SendFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendFileRequest === null || requestParameters.sendFileRequest === undefined) { - throw new runtime.RequiredError('sendFileRequest','Required parameter requestParameters.sendFileRequest was null or undefined when calling sendFile.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendFile`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendFileRequestToJSON(requestParameters.sendFileRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a File - */ - async sendFile(requestParameters: SendFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendFileRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send List Message - */ - async sendListRaw(requestParameters: SendListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendListRequest === null || requestParameters.sendListRequest === undefined) { - throw new runtime.RequiredError('sendListRequest','Required parameter requestParameters.sendListRequest was null or undefined when calling sendList.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendList`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendListRequestToJSON(requestParameters.sendListRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send List Message - */ - async sendList(requestParameters: SendListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Location - */ - async sendLocationRaw(requestParameters: SendLocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendLocationRequest === null || requestParameters.sendLocationRequest === undefined) { - throw new runtime.RequiredError('sendLocationRequest','Required parameter requestParameters.sendLocationRequest was null or undefined when calling sendLocation.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendLocation`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendLocationRequestToJSON(requestParameters.sendLocationRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Location - */ - async sendLocation(requestParameters: SendLocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendLocationRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Message - */ - async sendMessageRaw(requestParameters: SendMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendMessageRequest === null || requestParameters.sendMessageRequest === undefined) { - throw new runtime.RequiredError('sendMessageRequest','Required parameter requestParameters.sendMessageRequest was null or undefined when calling sendMessage.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendMessage`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendMessageRequestToJSON(requestParameters.sendMessageRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. - * Send a Message - */ - async sendMessage(requestParameters: SendMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendMessageRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/src/apis/ProductsCatalogsApi.ts b/typescript-fetch/src/apis/ProductsCatalogsApi.ts deleted file mode 100644 index 64dc2c9..0000000 --- a/typescript-fetch/src/apis/ProductsCatalogsApi.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - Commerce, - GetMe401Response, - SendMessageStatus, - SendProductRequest, - SetCommerce, -} from '../models/index'; -import { - CommerceFromJSON, - CommerceToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - SendMessageStatusFromJSON, - SendMessageStatusToJSON, - SendProductRequestFromJSON, - SendProductRequestToJSON, - SetCommerceFromJSON, - SetCommerceToJSON, -} from '../models/index'; - -export interface SendProductOperationRequest { - sendProductRequest: SendProductRequest; -} - -export interface SetCommerceRequest { - commerce: Commerce; -} - -/** - * - */ -export class ProductsCatalogsApi extends runtime.BaseAPI { - - /** - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * Send a Product - */ - async sendProductRaw(requestParameters: SendProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendProductRequest === null || requestParameters.sendProductRequest === undefined) { - throw new runtime.RequiredError('sendProductRequest','Required parameter requestParameters.sendProductRequest was null or undefined when calling sendProduct.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendProduct`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendProductRequestToJSON(requestParameters.sendProductRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases. **You can not send products to Business WhatsApp clients.** - * Send a Product - */ - async sendProduct(requestParameters: SendProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendProductRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Set Commerce Settings - */ - async setCommerceRaw(requestParameters: SetCommerceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.commerce === null || requestParameters.commerce === undefined) { - throw new runtime.RequiredError('commerce','Required parameter requestParameters.commerce was null or undefined when calling setCommerce.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/commerce`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CommerceToJSON(requestParameters.commerce), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetCommerceFromJSON(jsonValue)); - } - - /** - * **is_catalog_visible** - Set to true to show catalog storefront icon or false to hide it. **is_cart_enabled** - Set to true to enable cart or false to disable it. - * Set Commerce Settings - */ - async setCommerce(requestParameters: SetCommerceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setCommerceRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/src/apis/TemplatesApi.ts b/typescript-fetch/src/apis/TemplatesApi.ts deleted file mode 100644 index e881845..0000000 --- a/typescript-fetch/src/apis/TemplatesApi.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - AddTemplateRequest, - GetMe401Response, - GetTemplates, - RemoveTemplateRequest, - SendMessageStatus, - SendTemplateRequest, - SetMe, -} from '../models/index'; -import { - AddTemplateRequestFromJSON, - AddTemplateRequestToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - GetTemplatesFromJSON, - GetTemplatesToJSON, - RemoveTemplateRequestFromJSON, - RemoveTemplateRequestToJSON, - SendMessageStatusFromJSON, - SendMessageStatusToJSON, - SendTemplateRequestFromJSON, - SendTemplateRequestToJSON, - SetMeFromJSON, - SetMeToJSON, -} from '../models/index'; - -export interface AddTemplateOperationRequest { - addTemplateRequest: AddTemplateRequest; -} - -export interface RemoveTemplateOperationRequest { - removeTemplateRequest: RemoveTemplateRequest; -} - -export interface SendTemplateOperationRequest { - sendTemplateRequest: SendTemplateRequest; -} - -/** - * - */ -export class TemplatesApi extends runtime.BaseAPI { - - /** - * Create new template for sending. - * Create template - */ - async addTemplateRaw(requestParameters: AddTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.addTemplateRequest === null || requestParameters.addTemplateRequest === undefined) { - throw new runtime.RequiredError('addTemplateRequest','Required parameter requestParameters.addTemplateRequest was null or undefined when calling addTemplate.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/addTemplate`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AddTemplateRequestToJSON(requestParameters.addTemplateRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Create new template for sending. - * Create template - */ - async addTemplate(requestParameters: AddTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addTemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Deleted template can not be restored. - * Remove template - */ - async removeTemplateRaw(requestParameters: RemoveTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.removeTemplateRequest === null || requestParameters.removeTemplateRequest === undefined) { - throw new runtime.RequiredError('removeTemplateRequest','Required parameter requestParameters.removeTemplateRequest was null or undefined when calling removeTemplate.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/removeTemplate`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RemoveTemplateRequestToJSON(requestParameters.removeTemplateRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetMeFromJSON(jsonValue)); - } - - /** - * Deleted template can not be restored. - * Remove template - */ - async removeTemplate(requestParameters: RemoveTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.removeTemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * Send Template Message - */ - async sendTemplateRaw(requestParameters: SendTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.sendTemplateRequest === null || requestParameters.sendTemplateRequest === undefined) { - throw new runtime.RequiredError('sendTemplateRequest','Required parameter requestParameters.sendTemplateRequest was null or undefined when calling sendTemplate.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/sendTemplate`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SendTemplateRequestToJSON(requestParameters.sendTemplateRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SendMessageStatusFromJSON(jsonValue)); - } - - /** - * Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone. Example: {\"template\":\"template_name\",\"language\":{\"policy\":\"deterministic\",\"code\":\"en\"},\"namespace\":\"namespace_id\",\"params\":[{\"type\":\"header\",\"parameters\":[{\"type\":\"image\",\"image\": {\"link\":\"https://...\"}}]},{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"test\"}]}],\"phone\":\"556123122026\"} - * Send Template Message - */ - async sendTemplate(requestParameters: SendTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.sendTemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * Get templates list - */ - async templatesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/templates`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetTemplatesFromJSON(jsonValue)); - } - - /** - * - * Get templates list - */ - async templatesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.templatesListRaw(initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/src/apis/WebhooksApi.ts b/typescript-fetch/src/apis/WebhooksApi.ts deleted file mode 100644 index 2490adc..0000000 --- a/typescript-fetch/src/apis/WebhooksApi.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - GetAckInfo, - GetMe401Response, - SetWebhookStatus, - WebhookUrl, -} from '../models/index'; -import { - GetAckInfoFromJSON, - GetAckInfoToJSON, - GetMe401ResponseFromJSON, - GetMe401ResponseToJSON, - SetWebhookStatusFromJSON, - SetWebhookStatusToJSON, - WebhookUrlFromJSON, - WebhookUrlToJSON, -} from '../models/index'; - -export interface AckHookInfoRequest { - messageId: string; -} - -export interface SetWebhookRequest { - webhookUrl: WebhookUrl; -} - -/** - * - */ -export class WebhooksApi extends runtime.BaseAPI { - - /** - * - * Check ACKs - */ - async ackHookInfoRaw(requestParameters: AckHookInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.messageId === null || requestParameters.messageId === undefined) { - throw new runtime.RequiredError('messageId','Required parameter requestParameters.messageId was null or undefined when calling ackHookInfo.'); - } - - const queryParameters: any = {}; - - if (requestParameters.messageId !== undefined) { - queryParameters['messageId'] = requestParameters.messageId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/hookInfo`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetAckInfoFromJSON(jsonValue)); - } - - /** - * - * Check ACKs - */ - async ackHookInfo(requestParameters: AckHookInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.ackHookInfoRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * Set webhook - */ - async setWebhookRaw(requestParameters: SetWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.webhookUrl === null || requestParameters.webhookUrl === undefined) { - throw new runtime.RequiredError('webhookUrl','Required parameter requestParameters.webhookUrl was null or undefined when calling setWebhook.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - queryParameters["token"] = this.configuration.apiKey("token"); // token authentication - } - - const response = await this.request({ - path: `/webhook`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: WebhookUrlToJSON(requestParameters.webhookUrl), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SetWebhookStatusFromJSON(jsonValue)); - } - - /** - * Sets the URL for receiving webhook notifications of new messages and message delivery events (ack). **API responses in \"Callbacks\" tab** - * Set webhook - */ - async setWebhook(requestParameters: SetWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setWebhookRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript-fetch/src/apis/index.ts b/typescript-fetch/src/apis/index.ts deleted file mode 100644 index 43034e7..0000000 --- a/typescript-fetch/src/apis/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './ChannelApi'; -export * from './MediaApi'; -export * from './MessagingApi'; -export * from './ProductsCatalogsApi'; -export * from './TemplatesApi'; -export * from './WebhooksApi'; diff --git a/typescript-fetch/src/index.ts b/typescript-fetch/src/index.ts deleted file mode 100644 index bebe8bb..0000000 --- a/typescript-fetch/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; diff --git a/typescript-fetch/src/models/Ack.ts b/typescript-fetch/src/models/Ack.ts deleted file mode 100644 index 307fe28..0000000 --- a/typescript-fetch/src/models/Ack.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface Ack - */ -export interface Ack { - /** - * unique id of message - * @type {string} - * @memberof Ack - */ - id?: string; - /** - * chat ID - * @type {string} - * @memberof Ack - */ - chatId?: string; - /** - * type of the message status - * @type {string} - * @memberof Ack - */ - status?: AckStatusEnum; -} - - -/** - * @export - */ -export const AckStatusEnum = { - Delivered: 'delivered', - Viewed: 'viewed', - Sent: 'sent' -} as const; -export type AckStatusEnum = typeof AckStatusEnum[keyof typeof AckStatusEnum]; - - -/** - * Check if a given object implements the Ack interface. - */ -export function instanceOfAck(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function AckFromJSON(json: any): Ack { - return AckFromJSONTyped(json, false); -} - -export function AckFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ack { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function AckToJSON(value?: Ack | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'chatId': value.chatId, - 'status': value.status, - }; -} - diff --git a/typescript-fetch/src/models/AddTemplateRequest.ts b/typescript-fetch/src/models/AddTemplateRequest.ts deleted file mode 100644 index d3dbbf9..0000000 --- a/typescript-fetch/src/models/AddTemplateRequest.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateCategoryProp } from './TemplateCategoryProp'; -import { - TemplateCategoryPropFromJSON, - TemplateCategoryPropFromJSONTyped, - TemplateCategoryPropToJSON, -} from './TemplateCategoryProp'; -import type { TemplateComponentsPropInner } from './TemplateComponentsPropInner'; -import { - TemplateComponentsPropInnerFromJSON, - TemplateComponentsPropInnerFromJSONTyped, - TemplateComponentsPropInnerToJSON, -} from './TemplateComponentsPropInner'; -import type { TemplateLanguageProp } from './TemplateLanguageProp'; -import { - TemplateLanguagePropFromJSON, - TemplateLanguagePropFromJSONTyped, - TemplateLanguagePropToJSON, -} from './TemplateLanguageProp'; - -/** - * - * @export - * @interface AddTemplateRequest - */ -export interface AddTemplateRequest { - /** - * Name of template - * @type {string} - * @memberof AddTemplateRequest - */ - name?: string; - /** - * - * @type {TemplateCategoryProp} - * @memberof AddTemplateRequest - */ - category?: TemplateCategoryProp; - /** - * Array of template components - * @type {Array} - * @memberof AddTemplateRequest - */ - components?: Array; - /** - * - * @type {TemplateLanguageProp} - * @memberof AddTemplateRequest - */ - language?: TemplateLanguageProp; -} - -/** - * Check if a given object implements the AddTemplateRequest interface. - */ -export function instanceOfAddTemplateRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function AddTemplateRequestFromJSON(json: any): AddTemplateRequest { - return AddTemplateRequestFromJSONTyped(json, false); -} - -export function AddTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddTemplateRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': !exists(json, 'name') ? undefined : json['name'], - 'category': !exists(json, 'category') ? undefined : TemplateCategoryPropFromJSON(json['category']), - 'components': !exists(json, 'components') ? undefined : ((json['components'] as Array).map(TemplateComponentsPropInnerFromJSON)), - 'language': !exists(json, 'language') ? undefined : TemplateLanguagePropFromJSON(json['language']), - }; -} - -export function AddTemplateRequestToJSON(value?: AddTemplateRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'category': TemplateCategoryPropToJSON(value.category), - 'components': value.components === undefined ? undefined : ((value.components as Array).map(TemplateComponentsPropInnerToJSON)), - 'language': TemplateLanguagePropToJSON(value.language), - }; -} - diff --git a/typescript-fetch/src/models/ChannelExtendedStatisticsInner.ts b/typescript-fetch/src/models/ChannelExtendedStatisticsInner.ts deleted file mode 100644 index 9e6c551..0000000 --- a/typescript-fetch/src/models/ChannelExtendedStatisticsInner.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ChannelExtendedStatisticsInner - */ -export interface ChannelExtendedStatisticsInner { - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - businessInitiatedPaidQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - businessInitiatedPrice?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - businessInitiatedQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - freeEntryPoint?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - freeQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - freeTier?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - paidQuantity?: number; - /** - * - * @type {string} - * @memberof ChannelExtendedStatisticsInner - */ - periodDate?: string; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - quantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - totalPrice?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - userInitiatedPaidQuantity?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - userInitiatedPrice?: number; - /** - * - * @type {number} - * @memberof ChannelExtendedStatisticsInner - */ - userInitiatedQuantity?: number; -} - -/** - * Check if a given object implements the ChannelExtendedStatisticsInner interface. - */ -export function instanceOfChannelExtendedStatisticsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelExtendedStatisticsInnerFromJSON(json: any): ChannelExtendedStatisticsInner { - return ChannelExtendedStatisticsInnerFromJSONTyped(json, false); -} - -export function ChannelExtendedStatisticsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelExtendedStatisticsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'businessInitiatedPaidQuantity': !exists(json, 'business_initiated_paid_quantity') ? undefined : json['business_initiated_paid_quantity'], - 'businessInitiatedPrice': !exists(json, 'business_initiated_price') ? undefined : json['business_initiated_price'], - 'businessInitiatedQuantity': !exists(json, 'business_initiated_quantity') ? undefined : json['business_initiated_quantity'], - 'freeEntryPoint': !exists(json, 'free_entry_point') ? undefined : json['free_entry_point'], - 'freeQuantity': !exists(json, 'free_quantity') ? undefined : json['free_quantity'], - 'freeTier': !exists(json, 'free_tier') ? undefined : json['free_tier'], - 'paidQuantity': !exists(json, 'paid_quantity') ? undefined : json['paid_quantity'], - 'periodDate': !exists(json, 'period_date') ? undefined : json['period_date'], - 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], - 'totalPrice': !exists(json, 'total_price') ? undefined : json['total_price'], - 'userInitiatedPaidQuantity': !exists(json, 'user_initiated_paid_quantity') ? undefined : json['user_initiated_paid_quantity'], - 'userInitiatedPrice': !exists(json, 'user_initiated_price') ? undefined : json['user_initiated_price'], - 'userInitiatedQuantity': !exists(json, 'user_initiated_quantity') ? undefined : json['user_initiated_quantity'], - }; -} - -export function ChannelExtendedStatisticsInnerToJSON(value?: ChannelExtendedStatisticsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'business_initiated_paid_quantity': value.businessInitiatedPaidQuantity, - 'business_initiated_price': value.businessInitiatedPrice, - 'business_initiated_quantity': value.businessInitiatedQuantity, - 'free_entry_point': value.freeEntryPoint, - 'free_quantity': value.freeQuantity, - 'free_tier': value.freeTier, - 'paid_quantity': value.paidQuantity, - 'period_date': value.periodDate, - 'quantity': value.quantity, - 'total_price': value.totalPrice, - 'user_initiated_paid_quantity': value.userInitiatedPaidQuantity, - 'user_initiated_price': value.userInitiatedPrice, - 'user_initiated_quantity': value.userInitiatedQuantity, - }; -} - diff --git a/typescript-fetch/src/models/ChannelStatistics.ts b/typescript-fetch/src/models/ChannelStatistics.ts deleted file mode 100644 index c817b1b..0000000 --- a/typescript-fetch/src/models/ChannelStatistics.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ChannelStatistics - */ -export interface ChannelStatistics { - /** - * - * @type {string} - * @memberof ChannelStatistics - */ - date?: string; - /** - * - * @type {number} - * @memberof ChannelStatistics - */ - templatesCost?: number; -} - -/** - * Check if a given object implements the ChannelStatistics interface. - */ -export function instanceOfChannelStatistics(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelStatisticsFromJSON(json: any): ChannelStatistics { - return ChannelStatisticsFromJSONTyped(json, false); -} - -export function ChannelStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelStatistics { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'date': !exists(json, 'date') ? undefined : json['date'], - 'templatesCost': !exists(json, 'templates_cost') ? undefined : json['templates_cost'], - }; -} - -export function ChannelStatisticsToJSON(value?: ChannelStatistics | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'date': value.date, - 'templates_cost': value.templatesCost, - }; -} - diff --git a/typescript-fetch/src/models/ChannelStatus.ts b/typescript-fetch/src/models/ChannelStatus.ts deleted file mode 100644 index 3d62e28..0000000 --- a/typescript-fetch/src/models/ChannelStatus.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ChannelStatus - */ -export interface ChannelStatus { - /** - * channel Status - * @type {string} - * @memberof ChannelStatus - */ - status?: ChannelStatusStatusEnum; -} - - -/** - * @export - */ -export const ChannelStatusStatusEnum = { - Connected: 'connected', - Connecting: 'connecting', - Disconnected: 'disconnected', - Uninitialized: 'uninitialized', - Unregistered: 'unregistered' -} as const; -export type ChannelStatusStatusEnum = typeof ChannelStatusStatusEnum[keyof typeof ChannelStatusStatusEnum]; - - -/** - * Check if a given object implements the ChannelStatus interface. - */ -export function instanceOfChannelStatus(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelStatusFromJSON(json: any): ChannelStatus { - return ChannelStatusFromJSONTyped(json, false); -} - -export function ChannelStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelStatus { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function ChannelStatusToJSON(value?: ChannelStatus | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'status': value.status, - }; -} - diff --git a/typescript-fetch/src/models/Commerce.ts b/typescript-fetch/src/models/Commerce.ts deleted file mode 100644 index eaad4c6..0000000 --- a/typescript-fetch/src/models/Commerce.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { CommerceParams } from './CommerceParams'; -import { - CommerceParamsFromJSON, - CommerceParamsFromJSONTyped, - CommerceParamsToJSON, -} from './CommerceParams'; - -/** - * - * @export - * @interface Commerce - */ -export interface Commerce { - /** - * - * @type {CommerceParams} - * @memberof Commerce - */ - params?: CommerceParams; -} - -/** - * Check if a given object implements the Commerce interface. - */ -export function instanceOfCommerce(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function CommerceFromJSON(json: any): Commerce { - return CommerceFromJSONTyped(json, false); -} - -export function CommerceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Commerce { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'params': !exists(json, 'params') ? undefined : CommerceParamsFromJSON(json['params']), - }; -} - -export function CommerceToJSON(value?: Commerce | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'params': CommerceParamsToJSON(value.params), - }; -} - diff --git a/typescript-fetch/src/models/CommerceParams.ts b/typescript-fetch/src/models/CommerceParams.ts deleted file mode 100644 index a203e19..0000000 --- a/typescript-fetch/src/models/CommerceParams.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CommerceParams - */ -export interface CommerceParams { - /** - * - * @type {boolean} - * @memberof CommerceParams - */ - isCartEnabled: boolean; - /** - * - * @type {boolean} - * @memberof CommerceParams - */ - isCatalogVisible: boolean; -} - -/** - * Check if a given object implements the CommerceParams interface. - */ -export function instanceOfCommerceParams(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "isCartEnabled" in value; - isInstance = isInstance && "isCatalogVisible" in value; - - return isInstance; -} - -export function CommerceParamsFromJSON(json: any): CommerceParams { - return CommerceParamsFromJSONTyped(json, false); -} - -export function CommerceParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommerceParams { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'isCartEnabled': json['is_cart_enabled'], - 'isCatalogVisible': json['is_catalog_visible'], - }; -} - -export function CommerceParamsToJSON(value?: CommerceParams | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'is_cart_enabled': value.isCartEnabled, - 'is_catalog_visible': value.isCatalogVisible, - }; -} - diff --git a/typescript-fetch/src/models/Contacts.ts b/typescript-fetch/src/models/Contacts.ts deleted file mode 100644 index 7b0b8bd..0000000 --- a/typescript-fetch/src/models/Contacts.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { ContactsContactsInner } from './ContactsContactsInner'; -import { - ContactsContactsInnerFromJSON, - ContactsContactsInnerFromJSONTyped, - ContactsContactsInnerToJSON, -} from './ContactsContactsInner'; - -/** - * - * @export - * @interface Contacts - */ -export interface Contacts { - /** - * List of checked numbers - * @type {Array} - * @memberof Contacts - */ - contacts?: Array; -} - -/** - * Check if a given object implements the Contacts interface. - */ -export function instanceOfContacts(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ContactsFromJSON(json: any): Contacts { - return ContactsFromJSONTyped(json, false); -} - -export function ContactsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Contacts { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'contacts': !exists(json, 'contacts') ? undefined : ((json['contacts'] as Array).map(ContactsContactsInnerFromJSON)), - }; -} - -export function ContactsToJSON(value?: Contacts | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'contacts': value.contacts === undefined ? undefined : ((value.contacts as Array).map(ContactsContactsInnerToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/ContactsContactsInner.ts b/typescript-fetch/src/models/ContactsContactsInner.ts deleted file mode 100644 index b1b766e..0000000 --- a/typescript-fetch/src/models/ContactsContactsInner.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ContactsContactsInner - */ -export interface ContactsContactsInner { - /** - * Sent value - * @type {string} - * @memberof ContactsContactsInner - */ - input?: string; - /** - * Contacts status: - * - * *failed* - got error on processing - * - * *processing* - still not detected - * - * *invalid* - unavailable for sending - * - * *valid* - available for sending - * @type {string} - * @memberof ContactsContactsInner - */ - status?: string; - /** - * Formatted contact phone - * @type {string} - * @memberof ContactsContactsInner - */ - waId?: string; -} - -/** - * Check if a given object implements the ContactsContactsInner interface. - */ -export function instanceOfContactsContactsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ContactsContactsInnerFromJSON(json: any): ContactsContactsInner { - return ContactsContactsInnerFromJSONTyped(json, false); -} - -export function ContactsContactsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactsContactsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'input': !exists(json, 'input') ? undefined : json['input'], - 'status': !exists(json, 'status') ? undefined : json['status'], - 'waId': !exists(json, 'wa_id') ? undefined : json['wa_id'], - }; -} - -export function ContactsContactsInnerToJSON(value?: ContactsContactsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'input': value.input, - 'status': value.status, - 'wa_id': value.waId, - }; -} - diff --git a/typescript-fetch/src/models/ContactsRequest.ts b/typescript-fetch/src/models/ContactsRequest.ts deleted file mode 100644 index c44dded..0000000 --- a/typescript-fetch/src/models/ContactsRequest.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ContactsRequest - */ -export interface ContactsRequest { - /** - * Operating mode: - * - * *wait* - synchronous - * - * *no_wait* - asynchronous (default) - * @type {string} - * @memberof ContactsRequest - */ - blocking?: string; - /** - * Using cache: - * - * *true* - ignore cache - * - * *false* - use cache (default) - * @type {boolean} - * @memberof ContactsRequest - */ - forceCheck?: boolean; - /** - * Array of contact numbers for checking. Recommended format is +16315551001 - * - * Example: - * - * ["16315551000","+1 631 555 1001","6315551002","+1 (631) 555-1004","1-631-555-1005"] - * @type {Array} - * @memberof ContactsRequest - */ - contacts: Array; -} - -/** - * Check if a given object implements the ContactsRequest interface. - */ -export function instanceOfContactsRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "contacts" in value; - - return isInstance; -} - -export function ContactsRequestFromJSON(json: any): ContactsRequest { - return ContactsRequestFromJSONTyped(json, false); -} - -export function ContactsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactsRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'blocking': !exists(json, 'blocking') ? undefined : json['blocking'], - 'forceCheck': !exists(json, 'force_check') ? undefined : json['force_check'], - 'contacts': json['contacts'], - }; -} - -export function ContactsRequestToJSON(value?: ContactsRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'blocking': value.blocking, - 'force_check': value.forceCheck, - 'contacts': value.contacts, - }; -} - diff --git a/typescript-fetch/src/models/GetAckInfo.ts b/typescript-fetch/src/models/GetAckInfo.ts deleted file mode 100644 index 776b71e..0000000 --- a/typescript-fetch/src/models/GetAckInfo.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetAckInfoHooksInner } from './GetAckInfoHooksInner'; -import { - GetAckInfoHooksInnerFromJSON, - GetAckInfoHooksInnerFromJSONTyped, - GetAckInfoHooksInnerToJSON, -} from './GetAckInfoHooksInner'; - -/** - * - * @export - * @interface GetAckInfo - */ -export interface GetAckInfo { - /** - * - * @type {Array} - * @memberof GetAckInfo - */ - hooks?: Array; -} - -/** - * Check if a given object implements the GetAckInfo interface. - */ -export function instanceOfGetAckInfo(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetAckInfoFromJSON(json: any): GetAckInfo { - return GetAckInfoFromJSONTyped(json, false); -} - -export function GetAckInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAckInfo { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'hooks': !exists(json, 'hooks') ? undefined : ((json['hooks'] as Array).map(GetAckInfoHooksInnerFromJSON)), - }; -} - -export function GetAckInfoToJSON(value?: GetAckInfo | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'hooks': value.hooks === undefined ? undefined : ((value.hooks as Array).map(GetAckInfoHooksInnerToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/GetAckInfoHooksInner.ts b/typescript-fetch/src/models/GetAckInfoHooksInner.ts deleted file mode 100644 index b56a868..0000000 --- a/typescript-fetch/src/models/GetAckInfoHooksInner.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetAckInfoHooksInner - */ -export interface GetAckInfoHooksInner { - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - id?: string; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - type?: string; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - status?: string; - /** - * - * @type {object} - * @memberof GetAckInfoHooksInner - */ - pricing?: object; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - timestamp?: string; - /** - * - * @type {object} - * @memberof GetAckInfoHooksInner - */ - conversation?: object; - /** - * - * @type {string} - * @memberof GetAckInfoHooksInner - */ - recipientId?: string; -} - -/** - * Check if a given object implements the GetAckInfoHooksInner interface. - */ -export function instanceOfGetAckInfoHooksInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetAckInfoHooksInnerFromJSON(json: any): GetAckInfoHooksInner { - return GetAckInfoHooksInnerFromJSONTyped(json, false); -} - -export function GetAckInfoHooksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAckInfoHooksInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'status': !exists(json, 'status') ? undefined : json['status'], - 'pricing': !exists(json, 'pricing') ? undefined : json['pricing'], - 'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'], - 'conversation': !exists(json, 'conversation') ? undefined : json['conversation'], - 'recipientId': !exists(json, 'recipient_id') ? undefined : json['recipient_id'], - }; -} - -export function GetAckInfoHooksInnerToJSON(value?: GetAckInfoHooksInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'type': value.type, - 'status': value.status, - 'pricing': value.pricing, - 'timestamp': value.timestamp, - 'conversation': value.conversation, - 'recipient_id': value.recipientId, - }; -} - diff --git a/typescript-fetch/src/models/GetCommerceInner.ts b/typescript-fetch/src/models/GetCommerceInner.ts deleted file mode 100644 index 0853e8e..0000000 --- a/typescript-fetch/src/models/GetCommerceInner.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetCommerceInner - */ -export interface GetCommerceInner { - /** - * - * @type {string} - * @memberof GetCommerceInner - */ - id?: string; - /** - * - * @type {boolean} - * @memberof GetCommerceInner - */ - isCartEnabled?: boolean; - /** - * - * @type {boolean} - * @memberof GetCommerceInner - */ - isCatalogVisible?: boolean; -} - -/** - * Check if a given object implements the GetCommerceInner interface. - */ -export function instanceOfGetCommerceInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetCommerceInnerFromJSON(json: any): GetCommerceInner { - return GetCommerceInnerFromJSONTyped(json, false); -} - -export function GetCommerceInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCommerceInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'isCartEnabled': !exists(json, 'is_cart_enabled') ? undefined : json['is_cart_enabled'], - 'isCatalogVisible': !exists(json, 'is_catalog_visible') ? undefined : json['is_catalog_visible'], - }; -} - -export function GetCommerceInnerToJSON(value?: GetCommerceInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'is_cart_enabled': value.isCartEnabled, - 'is_catalog_visible': value.isCatalogVisible, - }; -} - diff --git a/typescript-fetch/src/models/GetIP.ts b/typescript-fetch/src/models/GetIP.ts deleted file mode 100644 index f6377ba..0000000 --- a/typescript-fetch/src/models/GetIP.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetIP - */ -export interface GetIP { - /** - * - * @type {string} - * @memberof GetIP - */ - result?: string; -} - -/** - * Check if a given object implements the GetIP interface. - */ -export function instanceOfGetIP(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetIPFromJSON(json: any): GetIP { - return GetIPFromJSONTyped(json, false); -} - -export function GetIPFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetIP { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'result': !exists(json, 'result') ? undefined : json['result'], - }; -} - -export function GetIPToJSON(value?: GetIP | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'result': value.result, - }; -} - diff --git a/typescript-fetch/src/models/GetMe.ts b/typescript-fetch/src/models/GetMe.ts deleted file mode 100644 index 34746ca..0000000 --- a/typescript-fetch/src/models/GetMe.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetMe - */ -export interface GetMe { - /** - * Profile`s About section. - * @type {string} - * @memberof GetMe - */ - about?: string; - /** - * Address of the business - * @type {string} - * @memberof GetMe - */ - address?: string; - /** - * Description of the business. Max 256 characters - * @type {string} - * @memberof GetMe - */ - description?: string; - /** - * Business email - * @type {string} - * @memberof GetMe - */ - email?: string; - /** - * Linked phone number - * @type {string} - * @memberof GetMe - */ - phone?: string; - /** - * Industry of the business - * @type {string} - * @memberof GetMe - */ - vertical?: GetMeVerticalEnum; - /** - * - * @type {string} - * @memberof GetMe - */ - photo?: string; -} - - -/** - * @export - */ -export const GetMeVerticalEnum = { - Automotive: 'Automotive', - BeautySpaAndSalon: 'Beauty, Spa and Salon', - ClothingAndApparel: 'Clothing and Apparel', - Education: 'Education', - Entertainment: 'Entertainment', - EventPlanningAndService: 'Event Planning and Service', - FinanceAndBanking: 'Finance and Banking', - FoodAndGrocery: 'Food and Grocery', - PublicService: 'Public Service', - HotelAndLodging: 'Hotel and Lodging', - MedicalAndHealth: 'Medical and Health', - NonProfit: 'Non-profit', - ProfessionalServices: 'Professional Services', - ShoppingAndRetail: 'Shopping and Retail', - TravelAndTransportation: 'Travel and Transportation', - Restaurant: 'Restaurant', - Other: 'Other', - Empty: '' -} as const; -export type GetMeVerticalEnum = typeof GetMeVerticalEnum[keyof typeof GetMeVerticalEnum]; - - -/** - * Check if a given object implements the GetMe interface. - */ -export function instanceOfGetMe(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMeFromJSON(json: any): GetMe { - return GetMeFromJSONTyped(json, false); -} - -export function GetMeFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'about': !exists(json, 'about') ? undefined : json['about'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'vertical': !exists(json, 'vertical') ? undefined : json['vertical'], - 'photo': !exists(json, 'photo') ? undefined : json['photo'], - }; -} - -export function GetMeToJSON(value?: GetMe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'about': value.about, - 'address': value.address, - 'description': value.description, - 'email': value.email, - 'phone': value.phone, - 'vertical': value.vertical, - 'photo': value.photo, - }; -} - diff --git a/typescript-fetch/src/models/GetMe401Response.ts b/typescript-fetch/src/models/GetMe401Response.ts deleted file mode 100644 index 92dbf94..0000000 --- a/typescript-fetch/src/models/GetMe401Response.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetMe401Response - */ -export interface GetMe401Response { - /** - * - * @type {string} - * @memberof GetMe401Response - */ - error?: string; -} - -/** - * Check if a given object implements the GetMe401Response interface. - */ -export function instanceOfGetMe401Response(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMe401ResponseFromJSON(json: any): GetMe401Response { - return GetMe401ResponseFromJSONTyped(json, false); -} - -export function GetMe401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMe401Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'error': !exists(json, 'error') ? undefined : json['error'], - }; -} - -export function GetMe401ResponseToJSON(value?: GetMe401Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'error': value.error, - }; -} - diff --git a/typescript-fetch/src/models/GetMessages.ts b/typescript-fetch/src/models/GetMessages.ts deleted file mode 100644 index 2c76a67..0000000 --- a/typescript-fetch/src/models/GetMessages.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetMessagesMessagesInner } from './GetMessagesMessagesInner'; -import { - GetMessagesMessagesInnerFromJSON, - GetMessagesMessagesInnerFromJSONTyped, - GetMessagesMessagesInnerToJSON, -} from './GetMessagesMessagesInner'; - -/** - * - * @export - * @interface GetMessages - */ -export interface GetMessages { - /** - * - * @type {Array} - * @memberof GetMessages - */ - messages?: Array; -} - -/** - * Check if a given object implements the GetMessages interface. - */ -export function instanceOfGetMessages(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMessagesFromJSON(json: any): GetMessages { - return GetMessagesFromJSONTyped(json, false); -} - -export function GetMessagesFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMessages { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'messages': !exists(json, 'messages') ? undefined : ((json['messages'] as Array).map(GetMessagesMessagesInnerFromJSON)), - }; -} - -export function GetMessagesToJSON(value?: GetMessages | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'messages': value.messages === undefined ? undefined : ((value.messages as Array).map(GetMessagesMessagesInnerToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/GetMessagesMessagesInner.ts b/typescript-fetch/src/models/GetMessagesMessagesInner.ts deleted file mode 100644 index a148c4a..0000000 --- a/typescript-fetch/src/models/GetMessagesMessagesInner.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GetMessagesMessagesInner - */ -export interface GetMessagesMessagesInner { - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - messageNumber?: number; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - id?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - body?: string; - /** - * - * @type {boolean} - * @memberof GetMessagesMessagesInner - */ - fromMe?: boolean; - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - self?: number; - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - isForwarded?: number; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - author?: string; - /** - * - * @type {number} - * @memberof GetMessagesMessagesInner - */ - time?: number; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - chatId?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - type?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - senderName?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - caption?: string; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - quotedMsgId?: string; - /** - * - * @type {object} - * @memberof GetMessagesMessagesInner - */ - metadata?: object; - /** - * - * @type {string} - * @memberof GetMessagesMessagesInner - */ - chatName?: string; -} - -/** - * Check if a given object implements the GetMessagesMessagesInner interface. - */ -export function instanceOfGetMessagesMessagesInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetMessagesMessagesInnerFromJSON(json: any): GetMessagesMessagesInner { - return GetMessagesMessagesInnerFromJSONTyped(json, false); -} - -export function GetMessagesMessagesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMessagesMessagesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'messageNumber': !exists(json, 'messageNumber') ? undefined : json['messageNumber'], - 'id': !exists(json, 'id') ? undefined : json['id'], - 'body': !exists(json, 'body') ? undefined : json['body'], - 'fromMe': !exists(json, 'fromMe') ? undefined : json['fromMe'], - 'self': !exists(json, 'self') ? undefined : json['self'], - 'isForwarded': !exists(json, 'isForwarded') ? undefined : json['isForwarded'], - 'author': !exists(json, 'author') ? undefined : json['author'], - 'time': !exists(json, 'time') ? undefined : json['time'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'senderName': !exists(json, 'senderName') ? undefined : json['senderName'], - 'caption': !exists(json, 'caption') ? undefined : json['caption'], - 'quotedMsgId': !exists(json, 'quotedMsgId') ? undefined : json['quotedMsgId'], - 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'], - 'chatName': !exists(json, 'chatName') ? undefined : json['chatName'], - }; -} - -export function GetMessagesMessagesInnerToJSON(value?: GetMessagesMessagesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'messageNumber': value.messageNumber, - 'id': value.id, - 'body': value.body, - 'fromMe': value.fromMe, - 'self': value.self, - 'isForwarded': value.isForwarded, - 'author': value.author, - 'time': value.time, - 'chatId': value.chatId, - 'type': value.type, - 'senderName': value.senderName, - 'caption': value.caption, - 'quotedMsgId': value.quotedMsgId, - 'metadata': value.metadata, - 'chatName': value.chatName, - }; -} - diff --git a/typescript-fetch/src/models/GetTemplates.ts b/typescript-fetch/src/models/GetTemplates.ts deleted file mode 100644 index 595f6d6..0000000 --- a/typescript-fetch/src/models/GetTemplates.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { GetTemplatesTemplatesInner } from './GetTemplatesTemplatesInner'; -import { - GetTemplatesTemplatesInnerFromJSON, - GetTemplatesTemplatesInnerFromJSONTyped, - GetTemplatesTemplatesInnerToJSON, -} from './GetTemplatesTemplatesInner'; - -/** - * - * @export - * @interface GetTemplates - */ -export interface GetTemplates { - /** - * - * @type {number} - * @memberof GetTemplates - */ - total?: number; - /** - * - * @type {Array} - * @memberof GetTemplates - */ - templates?: Array; -} - -/** - * Check if a given object implements the GetTemplates interface. - */ -export function instanceOfGetTemplates(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetTemplatesFromJSON(json: any): GetTemplates { - return GetTemplatesFromJSONTyped(json, false); -} - -export function GetTemplatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetTemplates { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'total': !exists(json, 'total') ? undefined : json['total'], - 'templates': !exists(json, 'templates') ? undefined : ((json['templates'] as Array).map(GetTemplatesTemplatesInnerFromJSON)), - }; -} - -export function GetTemplatesToJSON(value?: GetTemplates | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'total': value.total, - 'templates': value.templates === undefined ? undefined : ((value.templates as Array).map(GetTemplatesTemplatesInnerToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/GetTemplatesTemplatesInner.ts b/typescript-fetch/src/models/GetTemplatesTemplatesInner.ts deleted file mode 100644 index 13c7db1..0000000 --- a/typescript-fetch/src/models/GetTemplatesTemplatesInner.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateCategoryProp } from './TemplateCategoryProp'; -import { - TemplateCategoryPropFromJSON, - TemplateCategoryPropFromJSONTyped, - TemplateCategoryPropToJSON, -} from './TemplateCategoryProp'; -import type { TemplateComponentsPropInner } from './TemplateComponentsPropInner'; -import { - TemplateComponentsPropInnerFromJSON, - TemplateComponentsPropInnerFromJSONTyped, - TemplateComponentsPropInnerToJSON, -} from './TemplateComponentsPropInner'; -import type { TemplateLanguageProp } from './TemplateLanguageProp'; -import { - TemplateLanguagePropFromJSON, - TemplateLanguagePropFromJSONTyped, - TemplateLanguagePropToJSON, -} from './TemplateLanguageProp'; - -/** - * - * @export - * @interface GetTemplatesTemplatesInner - */ -export interface GetTemplatesTemplatesInner { - /** - * - * @type {TemplateCategoryProp} - * @memberof GetTemplatesTemplatesInner - */ - category?: TemplateCategoryProp; - /** - * Array of template components - * @type {Array} - * @memberof GetTemplatesTemplatesInner - */ - components?: Array; - /** - * - * @type {TemplateLanguageProp} - * @memberof GetTemplatesTemplatesInner - */ - language?: TemplateLanguageProp; - /** - * - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - name?: string; - /** - * Can be found by method /templates - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - namespace?: string; - /** - * - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - rejectedReason?: string; - /** - * - * @type {string} - * @memberof GetTemplatesTemplatesInner - */ - status?: string; -} - -/** - * Check if a given object implements the GetTemplatesTemplatesInner interface. - */ -export function instanceOfGetTemplatesTemplatesInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function GetTemplatesTemplatesInnerFromJSON(json: any): GetTemplatesTemplatesInner { - return GetTemplatesTemplatesInnerFromJSONTyped(json, false); -} - -export function GetTemplatesTemplatesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetTemplatesTemplatesInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'category': !exists(json, 'category') ? undefined : TemplateCategoryPropFromJSON(json['category']), - 'components': !exists(json, 'components') ? undefined : ((json['components'] as Array).map(TemplateComponentsPropInnerFromJSON)), - 'language': !exists(json, 'language') ? undefined : TemplateLanguagePropFromJSON(json['language']), - 'name': !exists(json, 'name') ? undefined : json['name'], - 'namespace': !exists(json, 'namespace') ? undefined : json['namespace'], - 'rejectedReason': !exists(json, 'rejected_reason') ? undefined : json['rejected_reason'], - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function GetTemplatesTemplatesInnerToJSON(value?: GetTemplatesTemplatesInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'category': TemplateCategoryPropToJSON(value.category), - 'components': value.components === undefined ? undefined : ((value.components as Array).map(TemplateComponentsPropInnerToJSON)), - 'language': TemplateLanguagePropToJSON(value.language), - 'name': value.name, - 'namespace': value.namespace, - 'rejected_reason': value.rejectedReason, - 'status': value.status, - }; -} - diff --git a/typescript-fetch/src/models/MeComponents.ts b/typescript-fetch/src/models/MeComponents.ts deleted file mode 100644 index 8cb083c..0000000 --- a/typescript-fetch/src/models/MeComponents.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface MeComponents - */ -export interface MeComponents { - /** - * Profile`s About section. - * @type {string} - * @memberof MeComponents - */ - about?: string; - /** - * Address of the business - * @type {string} - * @memberof MeComponents - */ - address?: string; - /** - * Description of the business. Max 256 characters - * @type {string} - * @memberof MeComponents - */ - description?: string; - /** - * Business email - * @type {string} - * @memberof MeComponents - */ - email?: string; - /** - * Linked phone number - * @type {string} - * @memberof MeComponents - */ - phone?: string; - /** - * Industry of the business - * @type {string} - * @memberof MeComponents - */ - vertical?: MeComponentsVerticalEnum; - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof MeComponents - */ - photo?: string; -} - - -/** - * @export - */ -export const MeComponentsVerticalEnum = { - Automotive: 'Automotive', - BeautySpaAndSalon: 'Beauty, Spa and Salon', - ClothingAndApparel: 'Clothing and Apparel', - Education: 'Education', - Entertainment: 'Entertainment', - EventPlanningAndService: 'Event Planning and Service', - FinanceAndBanking: 'Finance and Banking', - FoodAndGrocery: 'Food and Grocery', - PublicService: 'Public Service', - HotelAndLodging: 'Hotel and Lodging', - MedicalAndHealth: 'Medical and Health', - NonProfit: 'Non-profit', - ProfessionalServices: 'Professional Services', - ShoppingAndRetail: 'Shopping and Retail', - TravelAndTransportation: 'Travel and Transportation', - Restaurant: 'Restaurant', - Other: 'Other', - Empty: '' -} as const; -export type MeComponentsVerticalEnum = typeof MeComponentsVerticalEnum[keyof typeof MeComponentsVerticalEnum]; - - -/** - * Check if a given object implements the MeComponents interface. - */ -export function instanceOfMeComponents(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MeComponentsFromJSON(json: any): MeComponents { - return MeComponentsFromJSONTyped(json, false); -} - -export function MeComponentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MeComponents { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'about': !exists(json, 'about') ? undefined : json['about'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'vertical': !exists(json, 'vertical') ? undefined : json['vertical'], - 'photo': !exists(json, 'photo') ? undefined : json['photo'], - }; -} - -export function MeComponentsToJSON(value?: MeComponents | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'about': value.about, - 'address': value.address, - 'description': value.description, - 'email': value.email, - 'phone': value.phone, - 'vertical': value.vertical, - 'photo': value.photo, - }; -} - diff --git a/typescript-fetch/src/models/MediaId.ts b/typescript-fetch/src/models/MediaId.ts deleted file mode 100644 index 503f73a..0000000 --- a/typescript-fetch/src/models/MediaId.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface MediaId - */ -export interface MediaId { - /** - * - * @type {string} - * @memberof MediaId - */ - mediaId?: string; -} - -/** - * Check if a given object implements the MediaId interface. - */ -export function instanceOfMediaId(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MediaIdFromJSON(json: any): MediaId { - return MediaIdFromJSONTyped(json, false); -} - -export function MediaIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaId { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'mediaId': !exists(json, 'mediaId') ? undefined : json['mediaId'], - }; -} - -export function MediaIdToJSON(value?: MediaId | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'mediaId': value.mediaId, - }; -} - diff --git a/typescript-fetch/src/models/Message.ts b/typescript-fetch/src/models/Message.ts deleted file mode 100644 index f3e389b..0000000 --- a/typescript-fetch/src/models/Message.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface Message - */ -export interface Message { - /** - * unique id - * @type {string} - * @memberof Message - */ - id?: string; - /** - * text message for type "chat", or link to download the file for "ptt", "image", "audio", "video" and "document", or latitude and longitude for "location", or message "[Call]" for "call_log" - * @type {string} - * @memberof Message - */ - body?: string; - /** - * true - outgoing, false - incoming - * @type {boolean} - * @memberof Message - */ - fromMe?: boolean; - /** - * 1 - generated by api, 0 - generated by app - * @type {number} - * @memberof Message - */ - self?: number; - /** - * true - forwarded message, false - direct message - * @type {boolean} - * @memberof Message - */ - isForwarded?: boolean; - /** - * Author ID of the message - * @type {string} - * @memberof Message - */ - author?: string; - /** - * send time, unix timestamp - * @type {number} - * @memberof Message - */ - time?: number; - /** - * chat ID - * @type {string} - * @memberof Message - */ - chatId?: string; - /** - * type of the message - * @type {string} - * @memberof Message - */ - type?: MessageTypeEnum; - /** - * Sender name - * @type {string} - * @memberof Message - */ - senderName?: string; - /** - * File caption or filename - * @type {string} - * @memberof Message - */ - caption?: string; - /** - * ID of quoted message - * @type {string} - * @memberof Message - */ - quotedMsgId?: string; -} - - -/** - * @export - */ -export const MessageTypeEnum = { - Chat: 'chat', - Interactive: 'interactive', - Image: 'image', - Video: 'video', - Document: 'document', - Audio: 'audio', - Sticker: 'sticker', - Voice: 'voice' -} as const; -export type MessageTypeEnum = typeof MessageTypeEnum[keyof typeof MessageTypeEnum]; - - -/** - * Check if a given object implements the Message interface. - */ -export function instanceOfMessage(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function MessageFromJSON(json: any): Message { - return MessageFromJSONTyped(json, false); -} - -export function MessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Message { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'body': !exists(json, 'body') ? undefined : json['body'], - 'fromMe': !exists(json, 'fromMe') ? undefined : json['fromMe'], - 'self': !exists(json, 'self') ? undefined : json['self'], - 'isForwarded': !exists(json, 'isForwarded') ? undefined : json['isForwarded'], - 'author': !exists(json, 'author') ? undefined : json['author'], - 'time': !exists(json, 'time') ? undefined : json['time'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'senderName': !exists(json, 'senderName') ? undefined : json['senderName'], - 'caption': !exists(json, 'caption') ? undefined : json['caption'], - 'quotedMsgId': !exists(json, 'quotedMsgId') ? undefined : json['quotedMsgId'], - }; -} - -export function MessageToJSON(value?: Message | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'body': value.body, - 'fromMe': value.fromMe, - 'self': value.self, - 'isForwarded': value.isForwarded, - 'author': value.author, - 'time': value.time, - 'chatId': value.chatId, - 'type': value.type, - 'senderName': value.senderName, - 'caption': value.caption, - 'quotedMsgId': value.quotedMsgId, - }; -} - diff --git a/typescript-fetch/src/models/ReadMessageRequest.ts b/typescript-fetch/src/models/ReadMessageRequest.ts deleted file mode 100644 index 4e24ea0..0000000 --- a/typescript-fetch/src/models/ReadMessageRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ReadMessageRequest - */ -export interface ReadMessageRequest { - /** - * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U - * @type {string} - * @memberof ReadMessageRequest - */ - messageId?: string; -} - -/** - * Check if a given object implements the ReadMessageRequest interface. - */ -export function instanceOfReadMessageRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ReadMessageRequestFromJSON(json: any): ReadMessageRequest { - return ReadMessageRequestFromJSONTyped(json, false); -} - -export function ReadMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReadMessageRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'messageId': !exists(json, 'messageId') ? undefined : json['messageId'], - }; -} - -export function ReadMessageRequestToJSON(value?: ReadMessageRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'messageId': value.messageId, - }; -} - diff --git a/typescript-fetch/src/models/RemoveTemplateRequest.ts b/typescript-fetch/src/models/RemoveTemplateRequest.ts deleted file mode 100644 index 101f41b..0000000 --- a/typescript-fetch/src/models/RemoveTemplateRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface RemoveTemplateRequest - */ -export interface RemoveTemplateRequest { - /** - * Template name - * @type {string} - * @memberof RemoveTemplateRequest - */ - name?: string; -} - -/** - * Check if a given object implements the RemoveTemplateRequest interface. - */ -export function instanceOfRemoveTemplateRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function RemoveTemplateRequestFromJSON(json: any): RemoveTemplateRequest { - return RemoveTemplateRequestFromJSONTyped(json, false); -} - -export function RemoveTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveTemplateRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function RemoveTemplateRequestToJSON(value?: RemoveTemplateRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/typescript-fetch/src/models/SendContactRequest.ts b/typescript-fetch/src/models/SendContactRequest.ts deleted file mode 100644 index fd86033..0000000 --- a/typescript-fetch/src/models/SendContactRequest.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendContactRequest - */ -export interface SendContactRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendContactRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendContactRequest - */ - phone?: string; - /** - * Array containing contact objects. - * - * Contact object parameters: - * - * **name** - full contact name. Required. Object with properties: - * - * * formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix) - * - * * first_name - First name. Example: Adam - * - * * last_name - Last name. Example: Smith - * - * * middle_name - Middle name. Example: John - * - * * suffix - Name suffix. Example: Junior - * - * * prefix - Name prefix. Example: Lord - * - * **birthday** - YYYY-MM-DD formatted string. Example: 2012-08-18 - * - * **addresses** - array containing address objects with parameters: - * - * * street - Street number and name. Example: 1 Hacker Way - * - * * city - City name. Example: Menlo Park - * - * * state - State abbreviation. Example: CA - * - * * zip - ZIP code. Example: 94025 - * - * * country - Full country name. Example: United States - * - * * country_code - Two-letter country abbreviation. Example: us - * - * * type - Standard Values: HOME, WORK. Example: HOME - * - * **emails** - array containing email objects with parameters: - * - * * email - Email address. Example: test@fb.com - * - * * type - Standard Values: HOME, WORK. Example: WORK - * - * **org** - object containing parameters: - * - * * company - Name of the contact's company. Example: WhatsApp - * - * * department - Name of the contact's department. Example: Design - * - * * title - Contact's business title. Example: Manager - * - * **phones** - array containing phone objects with parameters: - * - * * phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234 - * - * * type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME - * - * * wa_id - WhatsApp ID. Example: 19405551234 - * - * **urls** - array containing url objects with parameters: - * - * * url - URL. Example: https://www.facebook.com - * - * * type - Standard Values: HOME, WORK. Example: WORK - * - * Example: [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}] - * @type {Array} - * @memberof SendContactRequest - */ - contacts?: Array; -} - -/** - * Check if a given object implements the SendContactRequest interface. - */ -export function instanceOfSendContactRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendContactRequestFromJSON(json: any): SendContactRequest { - return SendContactRequestFromJSONTyped(json, false); -} - -export function SendContactRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'contacts': !exists(json, 'contacts') ? undefined : json['contacts'], - }; -} - -export function SendContactRequestToJSON(value?: SendContactRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'contacts': value.contacts, - }; -} - diff --git a/typescript-fetch/src/models/SendFileRequest.ts b/typescript-fetch/src/models/SendFileRequest.ts deleted file mode 100644 index 642ab5f..0000000 --- a/typescript-fetch/src/models/SendFileRequest.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendFileRequest - */ -export interface SendFileRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendFileRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendFileRequest - */ - phone?: string; - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof SendFileRequest - */ - body: string; - /** - * File name, for *example 1.jpg* or *hello.xlsx* - * @type {string} - * @memberof SendFileRequest - */ - filename: string; - /** - * Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026 - * @type {string} - * @memberof SendFileRequest - */ - caption?: string; -} - -/** - * Check if a given object implements the SendFileRequest interface. - */ -export function instanceOfSendFileRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - isInstance = isInstance && "filename" in value; - - return isInstance; -} - -export function SendFileRequestFromJSON(json: any): SendFileRequest { - return SendFileRequestFromJSONTyped(json, false); -} - -export function SendFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendFileRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'body': json['body'], - 'filename': json['filename'], - 'caption': !exists(json, 'caption') ? undefined : json['caption'], - }; -} - -export function SendFileRequestToJSON(value?: SendFileRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'body': value.body, - 'filename': value.filename, - 'caption': value.caption, - }; -} - diff --git a/typescript-fetch/src/models/SendListRequest.ts b/typescript-fetch/src/models/SendListRequest.ts deleted file mode 100644 index 87a184c..0000000 --- a/typescript-fetch/src/models/SendListRequest.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendListRequestAllOfSections } from './SendListRequestAllOfSections'; -import { - SendListRequestAllOfSectionsFromJSON, - SendListRequestAllOfSectionsFromJSONTyped, - SendListRequestAllOfSectionsToJSON, -} from './SendListRequestAllOfSections'; - -/** - * - * @export - * @interface SendListRequest - */ -export interface SendListRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendListRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendListRequest - */ - phone?: string; - /** - * Main message text - * @type {string} - * @memberof SendListRequest - */ - body: string; - /** - * Header will be located above message text - * @type {string} - * @memberof SendListRequest - */ - header?: string; - /** - * Footer will be placed under message text - * @type {string} - * @memberof SendListRequest - */ - footer?: string; - /** - * Action for open list - * @type {string} - * @memberof SendListRequest - */ - action: string; - /** - * Up to 10 sections from which the client can choose. - * - * Each section is object with fields: - * - * *title* - Title of section, up to 24 symbols. Required if there are more then 1 section - * - * *rows* - available options. Required - * - * - * - * Each option is object with fields: - * - * *id* - Unique id for option, up to 200 symbols. Required - * - * *title* - Title of option, up to 24 symbols. Required - * - * *description* - Description of option, up to 72 symbols - * - * - * - * Example: - * - * [{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}] - * @type {Array} - * @memberof SendListRequest - */ - sections: Array; -} - -/** - * Check if a given object implements the SendListRequest interface. - */ -export function instanceOfSendListRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - isInstance = isInstance && "action" in value; - isInstance = isInstance && "sections" in value; - - return isInstance; -} - -export function SendListRequestFromJSON(json: any): SendListRequest { - return SendListRequestFromJSONTyped(json, false); -} - -export function SendListRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'body': json['body'], - 'header': !exists(json, 'header') ? undefined : json['header'], - 'footer': !exists(json, 'footer') ? undefined : json['footer'], - 'action': json['action'], - 'sections': ((json['sections'] as Array).map(SendListRequestAllOfSectionsFromJSON)), - }; -} - -export function SendListRequestToJSON(value?: SendListRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'body': value.body, - 'header': value.header, - 'footer': value.footer, - 'action': value.action, - 'sections': ((value.sections as Array).map(SendListRequestAllOfSectionsToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/SendListRequestAllOfRows.ts b/typescript-fetch/src/models/SendListRequestAllOfRows.ts deleted file mode 100644 index 02f1d10..0000000 --- a/typescript-fetch/src/models/SendListRequestAllOfRows.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendListRequestAllOfRows - */ -export interface SendListRequestAllOfRows { - /** - * Unique id for option, up to 200 symbols - * @type {string} - * @memberof SendListRequestAllOfRows - */ - id: string; - /** - * Title of option, up to 24 symbols. - * @type {string} - * @memberof SendListRequestAllOfRows - */ - title: string; - /** - * Description of option, up to 72 symbols - * @type {string} - * @memberof SendListRequestAllOfRows - */ - description?: string; -} - -/** - * Check if a given object implements the SendListRequestAllOfRows interface. - */ -export function instanceOfSendListRequestAllOfRows(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "title" in value; - - return isInstance; -} - -export function SendListRequestAllOfRowsFromJSON(json: any): SendListRequestAllOfRows { - return SendListRequestAllOfRowsFromJSONTyped(json, false); -} - -export function SendListRequestAllOfRowsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequestAllOfRows { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'title': json['title'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function SendListRequestAllOfRowsToJSON(value?: SendListRequestAllOfRows | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'title': value.title, - 'description': value.description, - }; -} - diff --git a/typescript-fetch/src/models/SendListRequestAllOfSections.ts b/typescript-fetch/src/models/SendListRequestAllOfSections.ts deleted file mode 100644 index 12ec879..0000000 --- a/typescript-fetch/src/models/SendListRequestAllOfSections.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendListRequestAllOfRows } from './SendListRequestAllOfRows'; -import { - SendListRequestAllOfRowsFromJSON, - SendListRequestAllOfRowsFromJSONTyped, - SendListRequestAllOfRowsToJSON, -} from './SendListRequestAllOfRows'; - -/** - * - * @export - * @interface SendListRequestAllOfSections - */ -export interface SendListRequestAllOfSections { - /** - * Title of section, up to 24 symbols. Required if there are more then 1 section - * @type {string} - * @memberof SendListRequestAllOfSections - */ - title?: string; - /** - * - * @type {Array} - * @memberof SendListRequestAllOfSections - */ - rows: Array; -} - -/** - * Check if a given object implements the SendListRequestAllOfSections interface. - */ -export function instanceOfSendListRequestAllOfSections(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "rows" in value; - - return isInstance; -} - -export function SendListRequestAllOfSectionsFromJSON(json: any): SendListRequestAllOfSections { - return SendListRequestAllOfSectionsFromJSONTyped(json, false); -} - -export function SendListRequestAllOfSectionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequestAllOfSections { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'title': !exists(json, 'title') ? undefined : json['title'], - 'rows': ((json['rows'] as Array).map(SendListRequestAllOfRowsFromJSON)), - }; -} - -export function SendListRequestAllOfSectionsToJSON(value?: SendListRequestAllOfSections | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'title': value.title, - 'rows': ((value.rows as Array).map(SendListRequestAllOfRowsToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/SendLocationRequest.ts b/typescript-fetch/src/models/SendLocationRequest.ts deleted file mode 100644 index d876a45..0000000 --- a/typescript-fetch/src/models/SendLocationRequest.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendLocationRequest - */ -export interface SendLocationRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendLocationRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendLocationRequest - */ - phone?: string; - /** - * Latitude of the location. Example: 45.018337 - * @type {string} - * @memberof SendLocationRequest - */ - lat: string; - /** - * Longitude of the location. Example: -73.968285 - * @type {string} - * @memberof SendLocationRequest - */ - lng: string; - /** - * Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 - * @type {string} - * @memberof SendLocationRequest - */ - address?: string; - /** - * Name of the location. Example: Facebook HQ - * @type {string} - * @memberof SendLocationRequest - */ - name: string; -} - -/** - * Check if a given object implements the SendLocationRequest interface. - */ -export function instanceOfSendLocationRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "lat" in value; - isInstance = isInstance && "lng" in value; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function SendLocationRequestFromJSON(json: any): SendLocationRequest { - return SendLocationRequestFromJSONTyped(json, false); -} - -export function SendLocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendLocationRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'lat': json['lat'], - 'lng': json['lng'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'name': json['name'], - }; -} - -export function SendLocationRequestToJSON(value?: SendLocationRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'lat': value.lat, - 'lng': value.lng, - 'address': value.address, - 'name': value.name, - }; -} - diff --git a/typescript-fetch/src/models/SendMessageRequest.ts b/typescript-fetch/src/models/SendMessageRequest.ts deleted file mode 100644 index 68b99a2..0000000 --- a/typescript-fetch/src/models/SendMessageRequest.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendMessageRequest - */ -export interface SendMessageRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendMessageRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendMessageRequest - */ - phone?: string; - /** - * Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026 - * @type {string} - * @memberof SendMessageRequest - */ - body: string; -} - -/** - * Check if a given object implements the SendMessageRequest interface. - */ -export function instanceOfSendMessageRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - - return isInstance; -} - -export function SendMessageRequestFromJSON(json: any): SendMessageRequest { - return SendMessageRequestFromJSONTyped(json, false); -} - -export function SendMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendMessageRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'body': json['body'], - }; -} - -export function SendMessageRequestToJSON(value?: SendMessageRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'body': value.body, - }; -} - diff --git a/typescript-fetch/src/models/SendMessageStatus.ts b/typescript-fetch/src/models/SendMessageStatus.ts deleted file mode 100644 index 208c044..0000000 --- a/typescript-fetch/src/models/SendMessageStatus.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendMessageStatus - */ -export interface SendMessageStatus { - /** - * - * @type {boolean} - * @memberof SendMessageStatus - */ - sent?: boolean; - /** - * unique message id - * @type {string} - * @memberof SendMessageStatus - */ - id?: string; - /** - * Posting status message - * @type {string} - * @memberof SendMessageStatus - */ - message?: string; - /** - * Result description - * @type {string} - * @memberof SendMessageStatus - */ - description?: string; -} - -/** - * Check if a given object implements the SendMessageStatus interface. - */ -export function instanceOfSendMessageStatus(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendMessageStatusFromJSON(json: any): SendMessageStatus { - return SendMessageStatusFromJSONTyped(json, false); -} - -export function SendMessageStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendMessageStatus { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'sent': !exists(json, 'sent') ? undefined : json['sent'], - 'id': !exists(json, 'id') ? undefined : json['id'], - 'message': !exists(json, 'message') ? undefined : json['message'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function SendMessageStatusToJSON(value?: SendMessageStatus | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'sent': value.sent, - 'id': value.id, - 'message': value.message, - 'description': value.description, - }; -} - diff --git a/typescript-fetch/src/models/SendProductRequest.ts b/typescript-fetch/src/models/SendProductRequest.ts deleted file mode 100644 index 456473a..0000000 --- a/typescript-fetch/src/models/SendProductRequest.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendProductRequestAllOfAction } from './SendProductRequestAllOfAction'; -import { - SendProductRequestAllOfActionFromJSON, - SendProductRequestAllOfActionFromJSONTyped, - SendProductRequestAllOfActionToJSON, -} from './SendProductRequestAllOfAction'; - -/** - * - * @export - * @interface SendProductRequest - */ -export interface SendProductRequest { - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendProductRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendProductRequest - */ - phone?: string; - /** - * - * @type {SendProductRequestAllOfAction} - * @memberof SendProductRequest - */ - action: SendProductRequestAllOfAction; - /** - * Text of message. Example: Some text. - * @type {string} - * @memberof SendProductRequest - */ - body?: string; - /** - * Located under the message text. Example: Footer. - * @type {string} - * @memberof SendProductRequest - */ - footer?: string; - /** - * Header of catalog. Example: Header. - * - * **Required when sending the catalog.** - * @type {string} - * @memberof SendProductRequest - */ - header?: string; -} - -/** - * Check if a given object implements the SendProductRequest interface. - */ -export function instanceOfSendProductRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "action" in value; - - return isInstance; -} - -export function SendProductRequestFromJSON(json: any): SendProductRequest { - return SendProductRequestFromJSONTyped(json, false); -} - -export function SendProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'action': SendProductRequestAllOfActionFromJSON(json['action']), - 'body': !exists(json, 'body') ? undefined : json['body'], - 'footer': !exists(json, 'footer') ? undefined : json['footer'], - 'header': !exists(json, 'header') ? undefined : json['header'], - }; -} - -export function SendProductRequestToJSON(value?: SendProductRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'chatId': value.chatId, - 'phone': value.phone, - 'action': SendProductRequestAllOfActionToJSON(value.action), - 'body': value.body, - 'footer': value.footer, - 'header': value.header, - }; -} - diff --git a/typescript-fetch/src/models/SendProductRequestAllOfAction.ts b/typescript-fetch/src/models/SendProductRequestAllOfAction.ts deleted file mode 100644 index edc61a8..0000000 --- a/typescript-fetch/src/models/SendProductRequestAllOfAction.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendProductRequestAllOfActionSections } from './SendProductRequestAllOfActionSections'; -import { - SendProductRequestAllOfActionSectionsFromJSON, - SendProductRequestAllOfActionSectionsFromJSONTyped, - SendProductRequestAllOfActionSectionsToJSON, -} from './SendProductRequestAllOfActionSections'; - -/** - * Object containing info about product or catalog. Can contain the following fields: - * - * **catalog_id** - id of catalog - * - * **product_retailer_id** - id of product. Only for sending single product. - * - * **sections** - used for sending multiply products. It`s array containing objects with catalog info. See example below. - * - * Example: {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]} - * @export - * @interface SendProductRequestAllOfAction - */ -export interface SendProductRequestAllOfAction { - /** - * id of the catalog - * @type {string} - * @memberof SendProductRequestAllOfAction - */ - catalogId?: string; - /** - * id of the product - * @type {string} - * @memberof SendProductRequestAllOfAction - */ - productRetailerId?: string; - /** - * - * @type {Array} - * @memberof SendProductRequestAllOfAction - */ - sections?: Array; -} - -/** - * Check if a given object implements the SendProductRequestAllOfAction interface. - */ -export function instanceOfSendProductRequestAllOfAction(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendProductRequestAllOfActionFromJSON(json: any): SendProductRequestAllOfAction { - return SendProductRequestAllOfActionFromJSONTyped(json, false); -} - -export function SendProductRequestAllOfActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequestAllOfAction { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'catalogId': !exists(json, 'catalog_id') ? undefined : json['catalog_id'], - 'productRetailerId': !exists(json, 'product_retailer_id') ? undefined : json['product_retailer_id'], - 'sections': !exists(json, 'sections') ? undefined : ((json['sections'] as Array).map(SendProductRequestAllOfActionSectionsFromJSON)), - }; -} - -export function SendProductRequestAllOfActionToJSON(value?: SendProductRequestAllOfAction | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'catalog_id': value.catalogId, - 'product_retailer_id': value.productRetailerId, - 'sections': value.sections === undefined ? undefined : ((value.sections as Array).map(SendProductRequestAllOfActionSectionsToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/SendProductRequestAllOfActionProductItems.ts b/typescript-fetch/src/models/SendProductRequestAllOfActionProductItems.ts deleted file mode 100644 index f8c5a58..0000000 --- a/typescript-fetch/src/models/SendProductRequestAllOfActionProductItems.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendProductRequestAllOfActionProductItems - */ -export interface SendProductRequestAllOfActionProductItems { - /** - * id of the product - * @type {string} - * @memberof SendProductRequestAllOfActionProductItems - */ - productRetailerId?: string; -} - -/** - * Check if a given object implements the SendProductRequestAllOfActionProductItems interface. - */ -export function instanceOfSendProductRequestAllOfActionProductItems(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendProductRequestAllOfActionProductItemsFromJSON(json: any): SendProductRequestAllOfActionProductItems { - return SendProductRequestAllOfActionProductItemsFromJSONTyped(json, false); -} - -export function SendProductRequestAllOfActionProductItemsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequestAllOfActionProductItems { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'productRetailerId': !exists(json, 'product_retailer_id') ? undefined : json['product_retailer_id'], - }; -} - -export function SendProductRequestAllOfActionProductItemsToJSON(value?: SendProductRequestAllOfActionProductItems | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'product_retailer_id': value.productRetailerId, - }; -} - diff --git a/typescript-fetch/src/models/SendProductRequestAllOfActionSections.ts b/typescript-fetch/src/models/SendProductRequestAllOfActionSections.ts deleted file mode 100644 index c4b7568..0000000 --- a/typescript-fetch/src/models/SendProductRequestAllOfActionSections.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendProductRequestAllOfActionProductItems } from './SendProductRequestAllOfActionProductItems'; -import { - SendProductRequestAllOfActionProductItemsFromJSON, - SendProductRequestAllOfActionProductItemsFromJSONTyped, - SendProductRequestAllOfActionProductItemsToJSON, -} from './SendProductRequestAllOfActionProductItems'; - -/** - * - * @export - * @interface SendProductRequestAllOfActionSections - */ -export interface SendProductRequestAllOfActionSections { - /** - * Title of the section. Example: the-section-title - * @type {string} - * @memberof SendProductRequestAllOfActionSections - */ - title?: string; - /** - * - * @type {Array} - * @memberof SendProductRequestAllOfActionSections - */ - productItems?: Array; -} - -/** - * Check if a given object implements the SendProductRequestAllOfActionSections interface. - */ -export function instanceOfSendProductRequestAllOfActionSections(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendProductRequestAllOfActionSectionsFromJSON(json: any): SendProductRequestAllOfActionSections { - return SendProductRequestAllOfActionSectionsFromJSONTyped(json, false); -} - -export function SendProductRequestAllOfActionSectionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendProductRequestAllOfActionSections { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'title': !exists(json, 'title') ? undefined : json['title'], - 'productItems': !exists(json, 'product_items') ? undefined : ((json['product_items'] as Array).map(SendProductRequestAllOfActionProductItemsFromJSON)), - }; -} - -export function SendProductRequestAllOfActionSectionsToJSON(value?: SendProductRequestAllOfActionSections | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'title': value.title, - 'product_items': value.productItems === undefined ? undefined : ((value.productItems as Array).map(SendProductRequestAllOfActionProductItemsToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequest.ts b/typescript-fetch/src/models/SendTemplateRequest.ts deleted file mode 100644 index f9e0438..0000000 --- a/typescript-fetch/src/models/SendTemplateRequest.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendTemplateRequestAllOfLanguage } from './SendTemplateRequestAllOfLanguage'; -import { - SendTemplateRequestAllOfLanguageFromJSON, - SendTemplateRequestAllOfLanguageFromJSONTyped, - SendTemplateRequestAllOfLanguageToJSON, -} from './SendTemplateRequestAllOfLanguage'; -import type { SendTemplateRequestAllOfParams } from './SendTemplateRequestAllOfParams'; -import { - SendTemplateRequestAllOfParamsFromJSON, - SendTemplateRequestAllOfParamsFromJSONTyped, - SendTemplateRequestAllOfParamsToJSON, -} from './SendTemplateRequestAllOfParams'; - -/** - * - * @export - * @interface SendTemplateRequest - */ -export interface SendTemplateRequest { - /** - * Can be found by method /templates - * @type {string} - * @memberof SendTemplateRequest - */ - namespace: string; - /** - * **Required if phone is not set** - * - * Chat ID from the message list. Examples: 12020721369@c.us - * . Used instead of the phone parameter. - * @type {string} - * @memberof SendTemplateRequest - */ - chatId?: string; - /** - * **Required if chatId is not set** - * - * A phone number starting with the country code. You do not - * need to add your number. - * - * USA example: 12020721369. - * @type {string} - * @memberof SendTemplateRequest - */ - phone?: string; - /** - * Name of template - * @type {string} - * @memberof SendTemplateRequest - */ - template: string; - /** - * - * @type {SendTemplateRequestAllOfLanguage} - * @memberof SendTemplateRequest - */ - language: SendTemplateRequestAllOfLanguage; - /** - * Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field: - * - * **type** - section of parameters - header, body, footer, button - * - * **parameters** - variables for section. - * - * Each variable is an object that can contain the following fields: - * - * **type** - can be text, currency, date_time, image, document or video - * - * **video**- id (mediaId) - * - * **document** - * - * * id (mediaId) - * - * * filename(optional) - * - * **image** - object with field link (image url) - * - * **currency** - object containing parameters currency_code and amount_1000. - * - * * *currency_code* - Currency code as defined in ISO 4217. - * - * * *amount_1000* - Amount multiplied by 1000. - * - * * *fallback_value* - Default text if localization fails. - * - * **date_time** - If the date_time object is used, further definition of the date and time is required. - * - * * *component* - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in. - * - * * *unix_epoch* - The time to be displayed is dependent on the time zone the client is in. - * - * * *fallback_value* - Default text if localization fails. - * - * **button** - if button has parameter - * - * * sub_type (url/quick_reply) - * - * * parameters (array to fill button variable) - * - * * index - button position. - * - * **The number of parameters passed must match the number of parameters in the template** - * @type {Array} - * @memberof SendTemplateRequest - */ - params?: Array; -} - -/** - * Check if a given object implements the SendTemplateRequest interface. - */ -export function instanceOfSendTemplateRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "namespace" in value; - isInstance = isInstance && "template" in value; - isInstance = isInstance && "language" in value; - - return isInstance; -} - -export function SendTemplateRequestFromJSON(json: any): SendTemplateRequest { - return SendTemplateRequestFromJSONTyped(json, false); -} - -export function SendTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'namespace': json['namespace'], - 'chatId': !exists(json, 'chatId') ? undefined : json['chatId'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'template': json['template'], - 'language': SendTemplateRequestAllOfLanguageFromJSON(json['language']), - 'params': !exists(json, 'params') ? undefined : ((json['params'] as Array).map(SendTemplateRequestAllOfParamsFromJSON)), - }; -} - -export function SendTemplateRequestToJSON(value?: SendTemplateRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'namespace': value.namespace, - 'chatId': value.chatId, - 'phone': value.phone, - 'template': value.template, - 'language': SendTemplateRequestAllOfLanguageToJSON(value.language), - 'params': value.params === undefined ? undefined : ((value.params as Array).map(SendTemplateRequestAllOfParamsToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequestAllOfCurrency.ts b/typescript-fetch/src/models/SendTemplateRequestAllOfCurrency.ts deleted file mode 100644 index c21ba73..0000000 --- a/typescript-fetch/src/models/SendTemplateRequestAllOfCurrency.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendTemplateRequestAllOfCurrency - */ -export interface SendTemplateRequestAllOfCurrency { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfCurrency - */ - currencyCode?: string; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfCurrency - */ - amount1000?: number; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfCurrency interface. - */ -export function instanceOfSendTemplateRequestAllOfCurrency(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfCurrencyFromJSON(json: any): SendTemplateRequestAllOfCurrency { - return SendTemplateRequestAllOfCurrencyFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfCurrencyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfCurrency { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'currencyCode': !exists(json, 'currency_code') ? undefined : json['currency_code'], - 'amount1000': !exists(json, 'amount_1000') ? undefined : json['amount_1000'], - }; -} - -export function SendTemplateRequestAllOfCurrencyToJSON(value?: SendTemplateRequestAllOfCurrency | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'currency_code': value.currencyCode, - 'amount_1000': value.amount1000, - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequestAllOfDateTime.ts b/typescript-fetch/src/models/SendTemplateRequestAllOfDateTime.ts deleted file mode 100644 index 55883df..0000000 --- a/typescript-fetch/src/models/SendTemplateRequestAllOfDateTime.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendTemplateRequestAllOfDateTimeComponent } from './SendTemplateRequestAllOfDateTimeComponent'; -import { - SendTemplateRequestAllOfDateTimeComponentFromJSON, - SendTemplateRequestAllOfDateTimeComponentFromJSONTyped, - SendTemplateRequestAllOfDateTimeComponentToJSON, -} from './SendTemplateRequestAllOfDateTimeComponent'; -import type { SendTemplateRequestAllOfDateTimeUnixEpoch } from './SendTemplateRequestAllOfDateTimeUnixEpoch'; -import { - SendTemplateRequestAllOfDateTimeUnixEpochFromJSON, - SendTemplateRequestAllOfDateTimeUnixEpochFromJSONTyped, - SendTemplateRequestAllOfDateTimeUnixEpochToJSON, -} from './SendTemplateRequestAllOfDateTimeUnixEpoch'; - -/** - * - * @export - * @interface SendTemplateRequestAllOfDateTime - */ -export interface SendTemplateRequestAllOfDateTime { - /** - * - * @type {SendTemplateRequestAllOfDateTimeComponent} - * @memberof SendTemplateRequestAllOfDateTime - */ - component?: SendTemplateRequestAllOfDateTimeComponent; - /** - * - * @type {SendTemplateRequestAllOfDateTimeUnixEpoch} - * @memberof SendTemplateRequestAllOfDateTime - */ - unixEpoch?: SendTemplateRequestAllOfDateTimeUnixEpoch; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfDateTime interface. - */ -export function instanceOfSendTemplateRequestAllOfDateTime(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfDateTimeFromJSON(json: any): SendTemplateRequestAllOfDateTime { - return SendTemplateRequestAllOfDateTimeFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfDateTimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfDateTime { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'component': !exists(json, 'component') ? undefined : SendTemplateRequestAllOfDateTimeComponentFromJSON(json['component']), - 'unixEpoch': !exists(json, 'unix_epoch') ? undefined : SendTemplateRequestAllOfDateTimeUnixEpochFromJSON(json['unix_epoch']), - }; -} - -export function SendTemplateRequestAllOfDateTimeToJSON(value?: SendTemplateRequestAllOfDateTime | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'component': SendTemplateRequestAllOfDateTimeComponentToJSON(value.component), - 'unix_epoch': SendTemplateRequestAllOfDateTimeUnixEpochToJSON(value.unixEpoch), - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeComponent.ts b/typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeComponent.ts deleted file mode 100644 index 51fca47..0000000 --- a/typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeComponent.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendTemplateRequestAllOfDateTimeComponent - */ -export interface SendTemplateRequestAllOfDateTimeComponent { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - dayOfWeek?: SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - year?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - month?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - dayOfMonth?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - hour?: number; - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - minute?: number; - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfDateTimeComponent - */ - calendar?: SendTemplateRequestAllOfDateTimeComponentCalendarEnum; -} - - -/** - * @export - */ -export const SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum = { - Monday: 'MONDAY', - Tuesday: 'TUESDAY', - Wednesday: 'WEDNESDAY', - Thursday: 'THURSDAY', - Friday: 'FRIDAY', - Saturday: 'SATURDAY', - Sunday: 'SUNDAY', - _1: '1', - _2: '2', - _3: '3', - _4: '4', - _5: '5', - _6: '6', - _7: '7' -} as const; -export type SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum = typeof SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum[keyof typeof SendTemplateRequestAllOfDateTimeComponentDayOfWeekEnum]; - -/** - * @export - */ -export const SendTemplateRequestAllOfDateTimeComponentCalendarEnum = { - Gregorian: 'GREGORIAN', - SolarHijri: 'SOLAR_HIJRI' -} as const; -export type SendTemplateRequestAllOfDateTimeComponentCalendarEnum = typeof SendTemplateRequestAllOfDateTimeComponentCalendarEnum[keyof typeof SendTemplateRequestAllOfDateTimeComponentCalendarEnum]; - - -/** - * Check if a given object implements the SendTemplateRequestAllOfDateTimeComponent interface. - */ -export function instanceOfSendTemplateRequestAllOfDateTimeComponent(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfDateTimeComponentFromJSON(json: any): SendTemplateRequestAllOfDateTimeComponent { - return SendTemplateRequestAllOfDateTimeComponentFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfDateTimeComponentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfDateTimeComponent { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dayOfWeek': !exists(json, 'day_of_week') ? undefined : json['day_of_week'], - 'year': !exists(json, 'year') ? undefined : json['year'], - 'month': !exists(json, 'month') ? undefined : json['month'], - 'dayOfMonth': !exists(json, 'day_of_month') ? undefined : json['day_of_month'], - 'hour': !exists(json, 'hour') ? undefined : json['hour'], - 'minute': !exists(json, 'minute') ? undefined : json['minute'], - 'calendar': !exists(json, 'calendar') ? undefined : json['calendar'], - }; -} - -export function SendTemplateRequestAllOfDateTimeComponentToJSON(value?: SendTemplateRequestAllOfDateTimeComponent | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'day_of_week': value.dayOfWeek, - 'year': value.year, - 'month': value.month, - 'day_of_month': value.dayOfMonth, - 'hour': value.hour, - 'minute': value.minute, - 'calendar': value.calendar, - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts b/typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts deleted file mode 100644 index 9ab31f6..0000000 --- a/typescript-fetch/src/models/SendTemplateRequestAllOfDateTimeUnixEpoch.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SendTemplateRequestAllOfDateTimeUnixEpoch - */ -export interface SendTemplateRequestAllOfDateTimeUnixEpoch { - /** - * - * @type {number} - * @memberof SendTemplateRequestAllOfDateTimeUnixEpoch - */ - timestamp?: number; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfDateTimeUnixEpoch interface. - */ -export function instanceOfSendTemplateRequestAllOfDateTimeUnixEpoch(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfDateTimeUnixEpochFromJSON(json: any): SendTemplateRequestAllOfDateTimeUnixEpoch { - return SendTemplateRequestAllOfDateTimeUnixEpochFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfDateTimeUnixEpochFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfDateTimeUnixEpoch { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'], - }; -} - -export function SendTemplateRequestAllOfDateTimeUnixEpochToJSON(value?: SendTemplateRequestAllOfDateTimeUnixEpoch | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'timestamp': value.timestamp, - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequestAllOfLanguage.ts b/typescript-fetch/src/models/SendTemplateRequestAllOfLanguage.ts deleted file mode 100644 index aba150f..0000000 --- a/typescript-fetch/src/models/SendTemplateRequestAllOfLanguage.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateLanguageProp } from './TemplateLanguageProp'; -import { - TemplateLanguagePropFromJSON, - TemplateLanguagePropFromJSONTyped, - TemplateLanguagePropToJSON, -} from './TemplateLanguageProp'; - -/** - * Object, containing fields "policy" and "code". - * - * **policy** - now "deterministic" is only available option; - * - * **code** - one of supported language codes - * @export - * @interface SendTemplateRequestAllOfLanguage - */ -export interface SendTemplateRequestAllOfLanguage { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfLanguage - */ - policy?: SendTemplateRequestAllOfLanguagePolicyEnum; - /** - * - * @type {TemplateLanguageProp} - * @memberof SendTemplateRequestAllOfLanguage - */ - code?: TemplateLanguageProp; -} - - -/** - * @export - */ -export const SendTemplateRequestAllOfLanguagePolicyEnum = { - Deterministic: 'deterministic' -} as const; -export type SendTemplateRequestAllOfLanguagePolicyEnum = typeof SendTemplateRequestAllOfLanguagePolicyEnum[keyof typeof SendTemplateRequestAllOfLanguagePolicyEnum]; - - -/** - * Check if a given object implements the SendTemplateRequestAllOfLanguage interface. - */ -export function instanceOfSendTemplateRequestAllOfLanguage(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfLanguageFromJSON(json: any): SendTemplateRequestAllOfLanguage { - return SendTemplateRequestAllOfLanguageFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfLanguageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfLanguage { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'policy': !exists(json, 'policy') ? undefined : json['policy'], - 'code': !exists(json, 'code') ? undefined : TemplateLanguagePropFromJSON(json['code']), - }; -} - -export function SendTemplateRequestAllOfLanguageToJSON(value?: SendTemplateRequestAllOfLanguage | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'policy': value.policy, - 'code': TemplateLanguagePropToJSON(value.code), - }; -} - diff --git a/typescript-fetch/src/models/SendTemplateRequestAllOfParams.ts b/typescript-fetch/src/models/SendTemplateRequestAllOfParams.ts deleted file mode 100644 index 4abedf0..0000000 --- a/typescript-fetch/src/models/SendTemplateRequestAllOfParams.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SendTemplateRequestAllOfCurrency } from './SendTemplateRequestAllOfCurrency'; -import { - SendTemplateRequestAllOfCurrencyFromJSON, - SendTemplateRequestAllOfCurrencyFromJSONTyped, - SendTemplateRequestAllOfCurrencyToJSON, -} from './SendTemplateRequestAllOfCurrency'; -import type { SendTemplateRequestAllOfDateTime } from './SendTemplateRequestAllOfDateTime'; -import { - SendTemplateRequestAllOfDateTimeFromJSON, - SendTemplateRequestAllOfDateTimeFromJSONTyped, - SendTemplateRequestAllOfDateTimeToJSON, -} from './SendTemplateRequestAllOfDateTime'; - -/** - * - * @export - * @interface SendTemplateRequestAllOfParams - */ -export interface SendTemplateRequestAllOfParams { - /** - * - * @type {string} - * @memberof SendTemplateRequestAllOfParams - */ - _default?: string; - /** - * - * @type {SendTemplateRequestAllOfCurrency} - * @memberof SendTemplateRequestAllOfParams - */ - currency?: SendTemplateRequestAllOfCurrency; - /** - * - * @type {SendTemplateRequestAllOfDateTime} - * @memberof SendTemplateRequestAllOfParams - */ - dateTime?: SendTemplateRequestAllOfDateTime; -} - -/** - * Check if a given object implements the SendTemplateRequestAllOfParams interface. - */ -export function instanceOfSendTemplateRequestAllOfParams(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SendTemplateRequestAllOfParamsFromJSON(json: any): SendTemplateRequestAllOfParams { - return SendTemplateRequestAllOfParamsFromJSONTyped(json, false); -} - -export function SendTemplateRequestAllOfParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestAllOfParams { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - '_default': !exists(json, 'default') ? undefined : json['default'], - 'currency': !exists(json, 'currency') ? undefined : SendTemplateRequestAllOfCurrencyFromJSON(json['currency']), - 'dateTime': !exists(json, 'date_time') ? undefined : SendTemplateRequestAllOfDateTimeFromJSON(json['date_time']), - }; -} - -export function SendTemplateRequestAllOfParamsToJSON(value?: SendTemplateRequestAllOfParams | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'default': value._default, - 'currency': SendTemplateRequestAllOfCurrencyToJSON(value.currency), - 'date_time': SendTemplateRequestAllOfDateTimeToJSON(value.dateTime), - }; -} - diff --git a/typescript-fetch/src/models/SetCommerce.ts b/typescript-fetch/src/models/SetCommerce.ts deleted file mode 100644 index 1cdc509..0000000 --- a/typescript-fetch/src/models/SetCommerce.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetCommerce - */ -export interface SetCommerce { - /** - * - * @type {boolean} - * @memberof SetCommerce - */ - success?: boolean; -} - -/** - * Check if a given object implements the SetCommerce interface. - */ -export function instanceOfSetCommerce(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetCommerceFromJSON(json: any): SetCommerce { - return SetCommerceFromJSONTyped(json, false); -} - -export function SetCommerceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetCommerce { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'success': !exists(json, 'success') ? undefined : json['success'], - }; -} - -export function SetCommerceToJSON(value?: SetCommerce | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'success': value.success, - }; -} - diff --git a/typescript-fetch/src/models/SetMe.ts b/typescript-fetch/src/models/SetMe.ts deleted file mode 100644 index 9fee480..0000000 --- a/typescript-fetch/src/models/SetMe.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetMe - */ -export interface SetMe { - /** - * - * @type {string} - * @memberof SetMe - */ - result?: string; -} - -/** - * Check if a given object implements the SetMe interface. - */ -export function instanceOfSetMe(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetMeFromJSON(json: any): SetMe { - return SetMeFromJSONTyped(json, false); -} - -export function SetMeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetMe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'result': !exists(json, 'result') ? undefined : json['result'], - }; -} - -export function SetMeToJSON(value?: SetMe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'result': value.result, - }; -} - diff --git a/typescript-fetch/src/models/SetMeRequest.ts b/typescript-fetch/src/models/SetMeRequest.ts deleted file mode 100644 index f361b3a..0000000 --- a/typescript-fetch/src/models/SetMeRequest.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetMeRequest - */ -export interface SetMeRequest { - /** - * Profile`s About section. - * @type {string} - * @memberof SetMeRequest - */ - about?: string; - /** - * Address of the business - * @type {string} - * @memberof SetMeRequest - */ - address?: string; - /** - * Description of the business. Max 256 characters - * @type {string} - * @memberof SetMeRequest - */ - description?: string; - /** - * Business email - * @type {string} - * @memberof SetMeRequest - */ - email?: string; - /** - * Linked phone number - * @type {string} - * @memberof SetMeRequest - */ - phone?: string; - /** - * Industry of the business - * @type {string} - * @memberof SetMeRequest - */ - vertical?: SetMeRequestVerticalEnum; - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof SetMeRequest - */ - photo?: string; -} - - -/** - * @export - */ -export const SetMeRequestVerticalEnum = { - Automotive: 'Automotive', - BeautySpaAndSalon: 'Beauty, Spa and Salon', - ClothingAndApparel: 'Clothing and Apparel', - Education: 'Education', - Entertainment: 'Entertainment', - EventPlanningAndService: 'Event Planning and Service', - FinanceAndBanking: 'Finance and Banking', - FoodAndGrocery: 'Food and Grocery', - PublicService: 'Public Service', - HotelAndLodging: 'Hotel and Lodging', - MedicalAndHealth: 'Medical and Health', - NonProfit: 'Non-profit', - ProfessionalServices: 'Professional Services', - ShoppingAndRetail: 'Shopping and Retail', - TravelAndTransportation: 'Travel and Transportation', - Restaurant: 'Restaurant', - Other: 'Other', - Empty: '' -} as const; -export type SetMeRequestVerticalEnum = typeof SetMeRequestVerticalEnum[keyof typeof SetMeRequestVerticalEnum]; - - -/** - * Check if a given object implements the SetMeRequest interface. - */ -export function instanceOfSetMeRequest(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetMeRequestFromJSON(json: any): SetMeRequest { - return SetMeRequestFromJSONTyped(json, false); -} - -export function SetMeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetMeRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'about': !exists(json, 'about') ? undefined : json['about'], - 'address': !exists(json, 'address') ? undefined : json['address'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'vertical': !exists(json, 'vertical') ? undefined : json['vertical'], - 'photo': !exists(json, 'photo') ? undefined : json['photo'], - }; -} - -export function SetMeRequestToJSON(value?: SetMeRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'about': value.about, - 'address': value.address, - 'description': value.description, - 'email': value.email, - 'phone': value.phone, - 'vertical': value.vertical, - 'photo': value.photo, - }; -} - diff --git a/typescript-fetch/src/models/SetSettings200Response.ts b/typescript-fetch/src/models/SetSettings200Response.ts deleted file mode 100644 index 737984c..0000000 --- a/typescript-fetch/src/models/SetSettings200Response.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { SetSettings200ResponseAllOfUpdate } from './SetSettings200ResponseAllOfUpdate'; -import { - SetSettings200ResponseAllOfUpdateFromJSON, - SetSettings200ResponseAllOfUpdateFromJSONTyped, - SetSettings200ResponseAllOfUpdateToJSON, -} from './SetSettings200ResponseAllOfUpdate'; - -/** - * - * @export - * @interface SetSettings200Response - */ -export interface SetSettings200Response { - /** - * - * @type {string} - * @memberof SetSettings200Response - */ - webhookUrl?: string | null; - /** - * - * @type {SetSettings200ResponseAllOfUpdate} - * @memberof SetSettings200Response - */ - update: SetSettings200ResponseAllOfUpdate; -} - -/** - * Check if a given object implements the SetSettings200Response interface. - */ -export function instanceOfSetSettings200Response(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "update" in value; - - return isInstance; -} - -export function SetSettings200ResponseFromJSON(json: any): SetSettings200Response { - return SetSettings200ResponseFromJSONTyped(json, false); -} - -export function SetSettings200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetSettings200Response { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': !exists(json, 'webhookUrl') ? undefined : json['webhookUrl'], - 'update': SetSettings200ResponseAllOfUpdateFromJSON(json['update']), - }; -} - -export function SetSettings200ResponseToJSON(value?: SetSettings200Response | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - 'update': SetSettings200ResponseAllOfUpdateToJSON(value.update), - }; -} - diff --git a/typescript-fetch/src/models/SetSettings200ResponseAllOfUpdate.ts b/typescript-fetch/src/models/SetSettings200ResponseAllOfUpdate.ts deleted file mode 100644 index d65c3db..0000000 --- a/typescript-fetch/src/models/SetSettings200ResponseAllOfUpdate.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetSettings200ResponseAllOfUpdate - */ -export interface SetSettings200ResponseAllOfUpdate { - /** - * - * @type {string} - * @memberof SetSettings200ResponseAllOfUpdate - */ - webhookUrl?: string | null; -} - -/** - * Check if a given object implements the SetSettings200ResponseAllOfUpdate interface. - */ -export function instanceOfSetSettings200ResponseAllOfUpdate(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetSettings200ResponseAllOfUpdateFromJSON(json: any): SetSettings200ResponseAllOfUpdate { - return SetSettings200ResponseAllOfUpdateFromJSONTyped(json, false); -} - -export function SetSettings200ResponseAllOfUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetSettings200ResponseAllOfUpdate { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': !exists(json, 'webhookUrl') ? undefined : json['webhookUrl'], - }; -} - -export function SetSettings200ResponseAllOfUpdateToJSON(value?: SetSettings200ResponseAllOfUpdate | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - }; -} - diff --git a/typescript-fetch/src/models/SetWebhookStatus.ts b/typescript-fetch/src/models/SetWebhookStatus.ts deleted file mode 100644 index 07313be..0000000 --- a/typescript-fetch/src/models/SetWebhookStatus.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface SetWebhookStatus - */ -export interface SetWebhookStatus { - /** - * Flag indicating that the current request has changed webhook - * @type {boolean} - * @memberof SetWebhookStatus - */ - set?: boolean; - /** - * - * @type {string} - * @memberof SetWebhookStatus - */ - message?: string; -} - -/** - * Check if a given object implements the SetWebhookStatus interface. - */ -export function instanceOfSetWebhookStatus(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SetWebhookStatusFromJSON(json: any): SetWebhookStatus { - return SetWebhookStatusFromJSONTyped(json, false); -} - -export function SetWebhookStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetWebhookStatus { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'set': !exists(json, 'set') ? undefined : json['set'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function SetWebhookStatusToJSON(value?: SetWebhookStatus | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'set': value.set, - 'message': value.message, - }; -} - diff --git a/typescript-fetch/src/models/Settings.ts b/typescript-fetch/src/models/Settings.ts deleted file mode 100644 index b627e54..0000000 --- a/typescript-fetch/src/models/Settings.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface Settings - */ -export interface Settings { - /** - * - * @type {string} - * @memberof Settings - */ - webhookUrl?: string | null; -} - -/** - * Check if a given object implements the Settings interface. - */ -export function instanceOfSettings(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function SettingsFromJSON(json: any): Settings { - return SettingsFromJSONTyped(json, false); -} - -export function SettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Settings { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': !exists(json, 'webhookUrl') ? undefined : json['webhookUrl'], - }; -} - -export function SettingsToJSON(value?: Settings | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - }; -} - diff --git a/typescript-fetch/src/models/TemplateCategoryProp.ts b/typescript-fetch/src/models/TemplateCategoryProp.ts deleted file mode 100644 index b8d956c..0000000 --- a/typescript-fetch/src/models/TemplateCategoryProp.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * Template category - * @export - */ -export const TemplateCategoryProp = { - Marketing: 'MARKETING', - Transactional: 'TRANSACTIONAL', - Otp: 'OTP' -} as const; -export type TemplateCategoryProp = typeof TemplateCategoryProp[keyof typeof TemplateCategoryProp]; - - -export function TemplateCategoryPropFromJSON(json: any): TemplateCategoryProp { - return TemplateCategoryPropFromJSONTyped(json, false); -} - -export function TemplateCategoryPropFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateCategoryProp { - return json as TemplateCategoryProp; -} - -export function TemplateCategoryPropToJSON(value?: TemplateCategoryProp | null): any { - return value as any; -} - diff --git a/typescript-fetch/src/models/TemplateComponentsPropInner.ts b/typescript-fetch/src/models/TemplateComponentsPropInner.ts deleted file mode 100644 index 4ed7c0d..0000000 --- a/typescript-fetch/src/models/TemplateComponentsPropInner.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { TemplateComponentsPropInnerButtonsInner } from './TemplateComponentsPropInnerButtonsInner'; -import { - TemplateComponentsPropInnerButtonsInnerFromJSON, - TemplateComponentsPropInnerButtonsInnerFromJSONTyped, - TemplateComponentsPropInnerButtonsInnerToJSON, -} from './TemplateComponentsPropInnerButtonsInner'; - -/** - * - * @export - * @interface TemplateComponentsPropInner - */ -export interface TemplateComponentsPropInner { - /** - * - * @type {string} - * @memberof TemplateComponentsPropInner - */ - type?: TemplateComponentsPropInnerTypeEnum; - /** - * Only for HEADER type - * @type {string} - * @memberof TemplateComponentsPropInner - */ - format?: TemplateComponentsPropInnerFormatEnum; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInner - */ - text?: string; - /** - * - * @type {object} - * @memberof TemplateComponentsPropInner - */ - example?: object; - /** - * - * @type {Array} - * @memberof TemplateComponentsPropInner - */ - buttons?: Array; -} - - -/** - * @export - */ -export const TemplateComponentsPropInnerTypeEnum = { - Body: 'BODY', - Header: 'HEADER', - Footer: 'FOOTER', - Buttons: 'BUTTONS' -} as const; -export type TemplateComponentsPropInnerTypeEnum = typeof TemplateComponentsPropInnerTypeEnum[keyof typeof TemplateComponentsPropInnerTypeEnum]; - -/** - * @export - */ -export const TemplateComponentsPropInnerFormatEnum = { - Text: 'TEXT', - Image: 'IMAGE', - Document: 'DOCUMENT', - Video: 'VIDEO' -} as const; -export type TemplateComponentsPropInnerFormatEnum = typeof TemplateComponentsPropInnerFormatEnum[keyof typeof TemplateComponentsPropInnerFormatEnum]; - - -/** - * Check if a given object implements the TemplateComponentsPropInner interface. - */ -export function instanceOfTemplateComponentsPropInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function TemplateComponentsPropInnerFromJSON(json: any): TemplateComponentsPropInner { - return TemplateComponentsPropInnerFromJSONTyped(json, false); -} - -export function TemplateComponentsPropInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateComponentsPropInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'type': !exists(json, 'type') ? undefined : json['type'], - 'format': !exists(json, 'format') ? undefined : json['format'], - 'text': !exists(json, 'text') ? undefined : json['text'], - 'example': !exists(json, 'example') ? undefined : json['example'], - 'buttons': !exists(json, 'buttons') ? undefined : ((json['buttons'] as Array).map(TemplateComponentsPropInnerButtonsInnerFromJSON)), - }; -} - -export function TemplateComponentsPropInnerToJSON(value?: TemplateComponentsPropInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'type': value.type, - 'format': value.format, - 'text': value.text, - 'example': value.example, - 'buttons': value.buttons === undefined ? undefined : ((value.buttons as Array).map(TemplateComponentsPropInnerButtonsInnerToJSON)), - }; -} - diff --git a/typescript-fetch/src/models/TemplateComponentsPropInnerButtonsInner.ts b/typescript-fetch/src/models/TemplateComponentsPropInnerButtonsInner.ts deleted file mode 100644 index 4a04aff..0000000 --- a/typescript-fetch/src/models/TemplateComponentsPropInnerButtonsInner.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface TemplateComponentsPropInnerButtonsInner - */ -export interface TemplateComponentsPropInnerButtonsInner { - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - type?: TemplateComponentsPropInnerButtonsInnerTypeEnum; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - text?: string; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - url?: string; - /** - * - * @type {string} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - phoneNumber?: string; - /** - * - * @type {Array} - * @memberof TemplateComponentsPropInnerButtonsInner - */ - example?: Array; -} - - -/** - * @export - */ -export const TemplateComponentsPropInnerButtonsInnerTypeEnum = { - PhoneNumber: 'PHONE_NUMBER', - Url: 'URL', - QuickReply: 'QUICK_REPLY' -} as const; -export type TemplateComponentsPropInnerButtonsInnerTypeEnum = typeof TemplateComponentsPropInnerButtonsInnerTypeEnum[keyof typeof TemplateComponentsPropInnerButtonsInnerTypeEnum]; - - -/** - * Check if a given object implements the TemplateComponentsPropInnerButtonsInner interface. - */ -export function instanceOfTemplateComponentsPropInnerButtonsInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function TemplateComponentsPropInnerButtonsInnerFromJSON(json: any): TemplateComponentsPropInnerButtonsInner { - return TemplateComponentsPropInnerButtonsInnerFromJSONTyped(json, false); -} - -export function TemplateComponentsPropInnerButtonsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateComponentsPropInnerButtonsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'type': !exists(json, 'type') ? undefined : json['type'], - 'text': !exists(json, 'text') ? undefined : json['text'], - 'url': !exists(json, 'url') ? undefined : json['url'], - 'phoneNumber': !exists(json, 'phone_number') ? undefined : json['phone_number'], - 'example': !exists(json, 'example') ? undefined : json['example'], - }; -} - -export function TemplateComponentsPropInnerButtonsInnerToJSON(value?: TemplateComponentsPropInnerButtonsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'type': value.type, - 'text': value.text, - 'url': value.url, - 'phone_number': value.phoneNumber, - 'example': value.example, - }; -} - diff --git a/typescript-fetch/src/models/TemplateLanguageProp.ts b/typescript-fetch/src/models/TemplateLanguageProp.ts deleted file mode 100644 index 80a142a..0000000 --- a/typescript-fetch/src/models/TemplateLanguageProp.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * Template language - * @export - */ -export const TemplateLanguageProp = { - Af: 'af', - Sq: 'sq', - Ar: 'ar', - Az: 'az', - Bn: 'bn', - Bg: 'bg', - Ca: 'ca', - ZhCn: 'zh_CN', - ZhHk: 'zh_HK', - ZhTw: 'zh_TW', - Hr: 'hr', - Cs: 'cs', - Da: 'da', - Nl: 'nl', - En: 'en', - EnGb: 'en_GB', - EnUs: 'en_US', - Et: 'et', - Fil: 'fil', - Fi: 'fi', - Fr: 'fr', - De: 'de', - El: 'el', - Gu: 'gu', - He: 'he', - Hi: 'hi', - Hu: 'hu', - Id: 'id', - Ga: 'ga', - It: 'it', - Ja: 'ja', - Kn: 'kn', - Kk: 'kk', - Ko: 'ko', - Lo: 'lo', - Lv: 'lv', - Lt: 'lt', - Mk: 'mk', - Ms: 'ms', - Mr: 'mr', - Nb: 'nb', - Fa: 'fa', - Pl: 'pl', - PtBr: 'pt_BR', - PtPt: 'pt_PT', - Pa: 'pa', - Ro: 'ro', - Ru: 'ru', - Sr: 'sr', - Sk: 'sk', - Sl: 'sl', - Es: 'es', - EsAr: 'es_AR', - EsEs: 'es_ES', - EsMx: 'es_MX', - Sw: 'sw', - Sv: 'sv', - Ta: 'ta', - Te: 'te', - Th: 'th', - Tr: 'tr', - Uk: 'uk', - Ur: 'ur', - Uz: 'uz', - Vi: 'vi' -} as const; -export type TemplateLanguageProp = typeof TemplateLanguageProp[keyof typeof TemplateLanguageProp]; - - -export function TemplateLanguagePropFromJSON(json: any): TemplateLanguageProp { - return TemplateLanguagePropFromJSONTyped(json, false); -} - -export function TemplateLanguagePropFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateLanguageProp { - return json as TemplateLanguageProp; -} - -export function TemplateLanguagePropToJSON(value?: TemplateLanguageProp | null): any { - return value as any; -} - diff --git a/typescript-fetch/src/models/UploadMedia.ts b/typescript-fetch/src/models/UploadMedia.ts deleted file mode 100644 index c09250b..0000000 --- a/typescript-fetch/src/models/UploadMedia.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface UploadMedia - */ -export interface UploadMedia { - /** - * HTTP link - * *https://...* - * - * Or base64-encoded file with mime data, for example - * *data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...* - * - * File in form-data input field - * @type {string} - * @memberof UploadMedia - */ - body: string; -} - -/** - * Check if a given object implements the UploadMedia interface. - */ -export function instanceOfUploadMedia(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "body" in value; - - return isInstance; -} - -export function UploadMediaFromJSON(json: any): UploadMedia { - return UploadMediaFromJSONTyped(json, false); -} - -export function UploadMediaFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadMedia { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'body': json['body'], - }; -} - -export function UploadMediaToJSON(value?: UploadMedia | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'body': value.body, - }; -} - diff --git a/typescript-fetch/src/models/WebhookUrl.ts b/typescript-fetch/src/models/WebhookUrl.ts deleted file mode 100644 index 8023fe8..0000000 --- a/typescript-fetch/src/models/WebhookUrl.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail - * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface WebhookUrl - */ -export interface WebhookUrl { - /** - * Http or https URL for receiving notifications. For testing, we recommend using [our RequestBin](http://bin.1msg.io). - * @type {string} - * @memberof WebhookUrl - */ - webhookUrl: string; -} - -/** - * Check if a given object implements the WebhookUrl interface. - */ -export function instanceOfWebhookUrl(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "webhookUrl" in value; - - return isInstance; -} - -export function WebhookUrlFromJSON(json: any): WebhookUrl { - return WebhookUrlFromJSONTyped(json, false); -} - -export function WebhookUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookUrl { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'webhookUrl': json['webhookUrl'], - }; -} - -export function WebhookUrlToJSON(value?: WebhookUrl | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'webhookUrl': value.webhookUrl, - }; -} - diff --git a/typescript-fetch/src/models/index.ts b/typescript-fetch/src/models/index.ts deleted file mode 100644 index b6c9a76..0000000 --- a/typescript-fetch/src/models/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Ack'; -export * from './AddTemplateRequest'; -export * from './ChannelExtendedStatisticsInner'; -export * from './ChannelStatistics'; -export * from './ChannelStatus'; -export * from './ChatIdProp'; -export * from './Commerce'; -export * from './CommerceParams'; -export * from './Contacts'; -export * from './ContactsContactsInner'; -export * from './ContactsRequest'; -export * from './GetAckInfo'; -export * from './GetAckInfoHooksInner'; -export * from './GetCommerceInner'; -export * from './GetIP'; -export * from './GetMe'; -export * from './GetMe401Response'; -export * from './GetMessages'; -export * from './GetMessagesMessagesInner'; -export * from './GetTemplates'; -export * from './GetTemplatesTemplatesInner'; -export * from './MeComponents'; -export * from './MediaId'; -export * from './Message'; -export * from './MessageIdProp'; -export * from './PhoneProp'; -export * from './ReadMessageRequest'; -export * from './RemoveTemplateRequest'; -export * from './SendContactRequest'; -export * from './SendFileRequest'; -export * from './SendListRequest'; -export * from './SendListRequestAllOfRows'; -export * from './SendListRequestAllOfSections'; -export * from './SendLocationRequest'; -export * from './SendMessageRequest'; -export * from './SendMessageStatus'; -export * from './SendProductRequest'; -export * from './SendProductRequestAllOfAction'; -export * from './SendProductRequestAllOfActionProductItems'; -export * from './SendProductRequestAllOfActionSections'; -export * from './SendTemplateRequest'; -export * from './SendTemplateRequestAllOfCurrency'; -export * from './SendTemplateRequestAllOfDateTime'; -export * from './SendTemplateRequestAllOfDateTimeComponent'; -export * from './SendTemplateRequestAllOfDateTimeUnixEpoch'; -export * from './SendTemplateRequestAllOfLanguage'; -export * from './SendTemplateRequestAllOfParams'; -export * from './SetCommerce'; -export * from './SetMe'; -export * from './SetMeRequest'; -export * from './SetSettings200Response'; -export * from './SetSettings200ResponseAllOfUpdate'; -export * from './SetWebhookStatus'; -export * from './Settings'; -export * from './TemplateCategoryProp'; -export * from './TemplateComponentsPropInner'; -export * from './TemplateComponentsPropInnerButtonsInner'; -export * from './TemplateLanguageProp'; -export * from './TemplateNamespaceField'; -export * from './UploadMedia'; -export * from './WebhookUrl'; diff --git a/typescript/.openapi-generator-ignore b/typescript/.openapi-generator-ignore new file mode 100644 index 0000000..d664d1d --- /dev/null +++ b/typescript/.openapi-generator-ignore @@ -0,0 +1,6 @@ +# Hand-written SDK wrapper files — never overwrite on regeneration +src/chat-api-config.ts +src/chat-api-client.ts +../chat-api-config.ts +../chat-api-client.ts +../index.ts diff --git a/typescript/LICENSE b/typescript/LICENSE new file mode 100644 index 0000000..b9fe06c --- /dev/null +++ b/typescript/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 1MSG + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/typescript/README.md b/typescript/README.md new file mode 100644 index 0000000..4f5afdd --- /dev/null +++ b/typescript/README.md @@ -0,0 +1,40 @@ +# @1msg/sdk + +TypeScript SDK for the **1msg WhatsApp API** (public operations). + +> **Source:** [github.com/1msg/1msg-sdk](https://github.com/1msg/1msg-sdk) + +## Install + +```bash +npm install @1msg/sdk +``` + +## Quick start + +```typescript +import { createClient } from '@1msg/sdk'; + +const client = createClient({ + baseUrl: 'https://api.1msg.io', + instanceId: 'YOUR_INSTANCE_ID', + token: process.env.MSG_API_TOKEN!, +}); + +await client.sendMessage({ body: 'Hello', chatId: '12020721369@c.us' }); +const profile = await client.profile.getMe(client.config.token); +``` + +## Auth pattern + +```text +https://{baseUrl}/{instanceId}/{path}?token={token} +``` + +## API groups + +`messaging` · `profile` · `groups` · `flows` · `templates` — plus `sendMessage()` helper. + +## License + +MIT diff --git a/typescript/jest.config.js b/typescript/jest.config.js new file mode 100644 index 0000000..27c4d8a --- /dev/null +++ b/typescript/jest.config.js @@ -0,0 +1,8 @@ +/** @type {import('jest').Config} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + roots: ['/src'], + testMatch: ['**/__tests__/**/*.test.ts'], + clearMocks: true, +}; diff --git a/typescript/package.json b/typescript/package.json new file mode 100644 index 0000000..dc454fe --- /dev/null +++ b/typescript/package.json @@ -0,0 +1,47 @@ +{ + "name": "@1msg/sdk", + "version": "1.0.0", + "description": "TypeScript SDK for the 1msg WhatsApp API", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/1msg/1msg-sdk.git", + "directory": "typescript" + }, + "homepage": "https://github.com/1msg/1msg-sdk/tree/main/typescript#readme", + "bugs": { + "url": "https://github.com/1msg/1msg-sdk/issues" + }, + "publishConfig": { + "access": "public" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "README.md", + "LICENSE" + ], + "scripts": { + "build": "tsc -p tsconfig.build.json", + "clean": "rm -rf dist", + "test": "jest", + "prepublishOnly": "npm run build" + }, + "keywords": [ + "1msg", + "whatsapp", + "whatsapp-api", + "sdk", + "typescript" + ], + "devDependencies": { + "@types/jest": "^29.5.14", + "jest": "^29.5.0", + "ts-jest": "^29.1.0", + "typescript": "^5.1.3" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/typescript/src/__tests__/chat-api-client.test.ts b/typescript/src/__tests__/chat-api-client.test.ts new file mode 100644 index 0000000..4a98095 --- /dev/null +++ b/typescript/src/__tests__/chat-api-client.test.ts @@ -0,0 +1,67 @@ +import { createClient } from '../chat-api-client'; +import type { MessageSentResponse } from '../generated/src/models/MessageSentResponse'; + +describe('ChatApiClient', () => { + const options = { + baseUrl: 'https://api.stage.1msg.io', + instanceId: 'ODI371267300', + token: 'test-api-token', + }; + + it('delegates sendMessage to MessagingApi with token and body fields', async () => { + const client = createClient(options); + const response: MessageSentResponse = { + sent: true, + message: 'msg-id', + id: 'msg-id', + }; + + const spy = jest + .spyOn(client.messaging, 'sendMessage') + .mockResolvedValue(response); + + const result = await client.sendMessage({ + body: 'Hello from SDK', + chatId: '12020721369@c.us', + }); + + expect(spy).toHaveBeenCalledWith( + 'test-api-token', + 'Hello from SDK', + undefined, + '12020721369@c.us', + undefined, + ); + expect(result).toEqual(response); + }); + + it('passes optional quotedMsgId and phone to sendMessage', async () => { + const client = createClient(options); + const spy = jest.spyOn(client.messaging, 'sendMessage').mockResolvedValue({ + sent: true, + message: 'msg-id', + id: 'msg-id', + }); + + await client.sendMessage({ + body: 'Reply', + quotedMsgId: 'wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA', + phone: 12020721369, + }); + + expect(spy).toHaveBeenCalledWith( + 'test-api-token', + 'Reply', + 'wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA', + undefined, + 12020721369, + ); + }); + + it('uses instance-scoped basePath from config', () => { + const client = createClient(options); + expect(client.config.basePath).toBe( + 'https://api.stage.1msg.io/ODI371267300', + ); + }); +}); diff --git a/typescript/src/__tests__/chat-api-config.test.ts b/typescript/src/__tests__/chat-api-config.test.ts new file mode 100644 index 0000000..a2644aa --- /dev/null +++ b/typescript/src/__tests__/chat-api-config.test.ts @@ -0,0 +1,48 @@ +import { ChatApiConfig } from '../chat-api-config'; + +describe('ChatApiConfig', () => { + const baseOptions = { + baseUrl: 'https://api.stage.1msg.io', + instanceId: 'ODI371267300', + token: 'test-api-token', + }; + + it('builds basePath with instance id', () => { + const config = new ChatApiConfig(baseOptions); + expect(config.basePath).toBe('https://api.stage.1msg.io/ODI371267300'); + }); + + it('builds request URL with token query param', () => { + const config = new ChatApiConfig(baseOptions); + const url = config.buildRequestUrl('/sendMessage'); + expect(url).toBe( + 'https://api.stage.1msg.io/ODI371267300/sendMessage?token=test-api-token', + ); + }); + + it('normalizes trailing slash on baseUrl', () => { + const config = new ChatApiConfig({ + ...baseOptions, + baseUrl: 'https://api.stage.1msg.io/', + }); + expect(config.basePath).toBe('https://api.stage.1msg.io/ODI371267300'); + }); + + it('accepts paths without leading slash', () => { + const config = new ChatApiConfig(baseOptions); + const url = config.buildRequestUrl('sendMessage'); + expect(url).toContain('/ODI371267300/sendMessage?token='); + }); + + it('throws when required fields are missing', () => { + expect(() => new ChatApiConfig({ ...baseOptions, token: '' })).toThrow( + 'ChatApiConfig.token is required', + ); + expect(() => new ChatApiConfig({ ...baseOptions, instanceId: '' })).toThrow( + 'ChatApiConfig.instanceId is required', + ); + expect(() => new ChatApiConfig({ ...baseOptions, baseUrl: '' })).toThrow( + 'ChatApiConfig.baseUrl is required', + ); + }); +}); diff --git a/typescript/src/__tests__/fixtures/send-message.ts b/typescript/src/__tests__/fixtures/send-message.ts new file mode 100644 index 0000000..bc2373d --- /dev/null +++ b/typescript/src/__tests__/fixtures/send-message.ts @@ -0,0 +1,13 @@ +import type { SendMessageRequest } from '../../generated/src/models/SendMessageRequest'; + +/** Valid SendMessageRequest fixture for client unit tests. */ +export const sendMessageFixture: SendMessageRequest = { + body: 'Hello from SDK test', + chatId: '79001234567@c.us', + quotedMsgId: 'wamid.HBgL79001234567', +}; + +export const sendMessagePhoneFixture: SendMessageRequest = { + body: 'Hello via phone', + phone: 79001234567, +}; diff --git a/typescript/src/chat-api-client.ts b/typescript/src/chat-api-client.ts new file mode 100644 index 0000000..02a568b --- /dev/null +++ b/typescript/src/chat-api-client.ts @@ -0,0 +1,62 @@ +import { ChatApiConfig, type ChatApiConfigOptions } from './chat-api-config'; +import { Configuration } from './generated/src/runtime'; +import { + FlowsApi, + GroupsApi, + MessagingApi, + ProfileApi, + TemplatesApi, +} from './generated/src/apis'; +import type { SendMessageRequest } from './generated/src/models/SendMessageRequest'; +import type { MessageSentResponse } from './generated/src/models/MessageSentResponse'; + +export type { ChatApiConfigOptions }; +export { ChatApiConfig }; + +/** + * High-level client for the 1msg Chat API. + * Configures generated API classes with instance path prefix and injects token auth. + */ +export class ChatApiClient { + readonly config: ChatApiConfig; + readonly messaging: MessagingApi; + readonly flows: FlowsApi; + readonly groups: GroupsApi; + readonly profile: ProfileApi; + readonly templates: TemplatesApi; + + constructor(config: ChatApiConfig) { + this.config = config; + const configuration = new Configuration({ + basePath: config.basePath, + }); + + this.messaging = new MessagingApi(configuration); + this.flows = new FlowsApi(configuration); + this.groups = new GroupsApi(configuration); + this.profile = new ProfileApi(configuration); + this.templates = new TemplatesApi(configuration); + } + + /** + * Send a text message (operationId: sendMessage). + * Token and instance path prefix are applied from ChatApiConfig. + */ + async sendMessage(request: SendMessageRequest): Promise { + return this.messaging.sendMessage( + this.config.token, + request.body, + request.quotedMsgId, + request.chatId, + request.phone, + ); + } +} + +/** Factory: create a configured 1msg API client from connection options. */ +export function createClient(options: ChatApiConfigOptions): ChatApiClient { + return new ChatApiClient(new ChatApiConfig(options)); +} + +/** @deprecated Use `createClient` instead. */ +export const createChatApiClient = createClient; diff --git a/typescript/src/chat-api-config.ts b/typescript/src/chat-api-config.ts new file mode 100644 index 0000000..499c1f0 --- /dev/null +++ b/typescript/src/chat-api-config.ts @@ -0,0 +1,56 @@ +export const SDK_VERSION = '1.0.0'; + +export interface ChatApiConfigOptions { + /** API root without instance segment, e.g. https://api.stage.1msg.io */ + baseUrl: string; + /** Channel instance id, e.g. ODI371267300 */ + instanceId: string; + /** Channel API token (appended as ?token= query param) */ + token: string; +} + +/** + * Normalizes URL segments for Chat API requests. + * Pattern: {baseUrl}/{instanceId}{path}?token={token} + */ +export class ChatApiConfig { + readonly baseUrl: string; + readonly instanceId: string; + readonly token: string; + + constructor(options: ChatApiConfigOptions) { + if (!options.baseUrl?.trim()) { + throw new Error('ChatApiConfig.baseUrl is required'); + } + if (!options.instanceId?.trim()) { + throw new Error('ChatApiConfig.instanceId is required'); + } + if (!options.token?.trim()) { + throw new Error('ChatApiConfig.token is required'); + } + + this.baseUrl = ChatApiConfig.stripTrailingSlash(options.baseUrl.trim()); + this.instanceId = options.instanceId.trim(); + this.token = options.token.trim(); + } + + /** Base path including instance id: https://api.stage.1msg.io/ODI371267300 */ + get basePath(): string { + return `${this.baseUrl}/${this.instanceId}`; + } + + /** + * Builds a fully qualified request URL with token query param. + * @param path API path starting with /, e.g. /sendMessage + */ + buildRequestUrl(path: string): string { + const normalizedPath = path.startsWith('/') ? path : `/${path}`; + const url = new URL(`${this.basePath}${normalizedPath}`); + url.searchParams.set('token', this.token); + return url.toString(); + } + + private static stripTrailingSlash(value: string): string { + return value.replace(/\/+$/, ''); + } +} diff --git a/typescript-fetch/.gitignore b/typescript/src/generated/.gitignore similarity index 100% rename from typescript-fetch/.gitignore rename to typescript/src/generated/.gitignore diff --git a/typescript-fetch/.npmignore b/typescript/src/generated/.npmignore similarity index 100% rename from typescript-fetch/.npmignore rename to typescript/src/generated/.npmignore diff --git a/c/.openapi-generator-ignore b/typescript/src/generated/.openapi-generator-ignore similarity index 100% rename from c/.openapi-generator-ignore rename to typescript/src/generated/.openapi-generator-ignore diff --git a/typescript/src/generated/README.md b/typescript/src/generated/README.md new file mode 100644 index 0000000..12544f4 --- /dev/null +++ b/typescript/src/generated/README.md @@ -0,0 +1,193 @@ +# @1msg/chat-api-generated@1.0.0 + +A TypeScript SDK client for the api.1msg.io API. + +## Usage + +First, install the SDK from npm. + +```bash +npm install @1msg/chat-api-generated --save +``` + +Next, try it out. + + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { CreateFlowsRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies CreateFlowsRequest; + + try { + const data = await api.createFlows(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + + +## Documentation + +### API Endpoints + +All URIs are relative to *https://api.1msg.io* + +| Class | Method | HTTP request | Description +| ----- | ------ | ------------ | ------------- +*FlowsApi* | [**createFlows**](docs/FlowsApi.md#createflows) | **POST** /flows | Create Flow +*FlowsApi* | [**createFlowsFlowIdDeprecate**](docs/FlowsApi.md#createflowsflowiddeprecate) | **POST** /flows/{flowId}/deprecate | Deprecate Flow +*FlowsApi* | [**createFlowsFlowIdPublish**](docs/FlowsApi.md#createflowsflowidpublish) | **POST** /flows/{flowId}/publish | Publish Flow +*FlowsApi* | [**deleteFlowsFlowId**](docs/FlowsApi.md#deleteflowsflowid) | **DELETE** /flows/{flowId} | Delete Flow +*FlowsApi* | [**getFlowsFlowId**](docs/FlowsApi.md#getflowsflowid) | **GET** /flows/{flowId} | Get Flow Details +*FlowsApi* | [**getFlowsFlowIdPreview**](docs/FlowsApi.md#getflowsflowidpreview) | **GET** /flows/{flowId}/preview | Preview Flow +*FlowsApi* | [**listFlows**](docs/FlowsApi.md#listflows) | **GET** /flows | List Flows +*FlowsApi* | [**patchFlowsFlowIdAssets**](docs/FlowsApi.md#patchflowsflowidassets) | **PATCH** /flows/{flowId}/assets | Update Flow Structure +*FlowsApi* | [**patchFlowsFlowIdMetadata**](docs/FlowsApi.md#patchflowsflowidmetadata) | **PATCH** /flows/{flowId}/metadata | Update Flow Metadata +*GroupsApi* | [**createGroups**](docs/GroupsApi.md#creategroups) | **POST** /groups | Create Group +*GroupsApi* | [**createGroupsGroupId**](docs/GroupsApi.md#creategroupsgroupid) | **POST** /groups/{groupId} | Update Group Info +*GroupsApi* | [**createGroupsGroupIdInvitelink**](docs/GroupsApi.md#creategroupsgroupidinvitelink) | **POST** /groups/{groupId}/inviteLink | Reset Invite Link +*GroupsApi* | [**deleteGroupsGroupId**](docs/GroupsApi.md#deletegroupsgroupid) | **DELETE** /groups/{groupId} | Delete Group +*GroupsApi* | [**getGroupsGroupId**](docs/GroupsApi.md#getgroupsgroupid) | **GET** /groups/{groupId} | Get Group Info +*GroupsApi* | [**getGroupsGroupIdInvitelink**](docs/GroupsApi.md#getgroupsgroupidinvitelink) | **GET** /groups/{groupId}/inviteLink | Get Invite Link +*GroupsApi* | [**listGroups**](docs/GroupsApi.md#listgroups) | **GET** /groups | Get Groups List +*MessagingApi* | [**createReadMessage**](docs/MessagingApi.md#createreadmessage) | **POST** /readMessage | Mark message as read +*MessagingApi* | [**createUploadMedia**](docs/MessagingApi.md#createuploadmedia) | **POST** /uploadMedia | Upload media +*MessagingApi* | [**listMessages**](docs/MessagingApi.md#listmessages) | **GET** /messages | Get messages list +*MessagingApi* | [**sendButton**](docs/MessagingApi.md#sendbuttonoperation) | **POST** /sendButton | Send Reply Buttons Message +*MessagingApi* | [**sendCarousel**](docs/MessagingApi.md#sendcarousel) | **POST** /sendCarousel | Send Carousel +*MessagingApi* | [**sendContact**](docs/MessagingApi.md#sendcontactoperation) | **POST** /sendContact | Send a Contact +*MessagingApi* | [**sendFile**](docs/MessagingApi.md#sendfile) | **POST** /sendFile | Send a File +*MessagingApi* | [**sendFlow**](docs/MessagingApi.md#sendflow) | **POST** /sendFlow | Send WhatsApp Flow Message +*MessagingApi* | [**sendList**](docs/MessagingApi.md#sendlistoperation) | **POST** /sendList | Send List Message +*MessagingApi* | [**sendLocation**](docs/MessagingApi.md#sendlocation) | **POST** /sendLocation | Send a Location +*MessagingApi* | [**sendLocationRequest**](docs/MessagingApi.md#sendlocationrequestoperation) | **POST** /sendLocationRequest | Send Location Request Message +*MessagingApi* | [**sendMessage**](docs/MessagingApi.md#sendmessage) | **POST** /sendMessage | Send a Message +*MessagingApi* | [**sendProduct**](docs/MessagingApi.md#sendproduct) | **POST** /sendProduct | Send a Product +*MessagingApi* | [**sendReaction**](docs/MessagingApi.md#sendreactionoperation) | **POST** /sendReaction | Send Reaction +*ProfileApi* | [**getMe**](docs/ProfileApi.md#getme) | **GET** /me | Get Profile Info +*TemplatesApi* | [**listTemplates**](docs/TemplatesApi.md#listtemplates) | **GET** /templates | Get templates list +*TemplatesApi* | [**sendTemplate**](docs/TemplatesApi.md#sendtemplateoperation) | **POST** /sendTemplate | Send Template Message + + +### Models + +- [CreateGroups200Response](docs/CreateGroups200Response.md) +- [CreateReadMessage200Response](docs/CreateReadMessage200Response.md) +- [CreateReadMessage401Response](docs/CreateReadMessage401Response.md) +- [CreateReadMessageRequest](docs/CreateReadMessageRequest.md) +- [DeleteFlowsFlowId200Response](docs/DeleteFlowsFlowId200Response.md) +- [DeleteGroupsGroupId200Response](docs/DeleteGroupsGroupId200Response.md) +- [ErrorResponse](docs/ErrorResponse.md) +- [ListFlows200Response](docs/ListFlows200Response.md) +- [ListMessages200Response](docs/ListMessages200Response.md) +- [ListTemplates200Response](docs/ListTemplates200Response.md) +- [MessageSentResponse](docs/MessageSentResponse.md) +- [PatchFlowsFlowIdAssets200Response](docs/PatchFlowsFlowIdAssets200Response.md) +- [ProfileInfo](docs/ProfileInfo.md) +- [SendButtonRequest](docs/SendButtonRequest.md) +- [SendButtonRequestSectionsInner](docs/SendButtonRequestSectionsInner.md) +- [SendButtonRequestSectionsInnerReply](docs/SendButtonRequestSectionsInnerReply.md) +- [SendCarouselRequest1](docs/SendCarouselRequest1.md) +- [SendContactRequest](docs/SendContactRequest.md) +- [SendContactRequestContactsInner](docs/SendContactRequestContactsInner.md) +- [SendContactRequestContactsInnerName](docs/SendContactRequestContactsInnerName.md) +- [SendContactRequestContactsInnerOrg](docs/SendContactRequestContactsInnerOrg.md) +- [SendContactRequestContactsInnerPhonesInner](docs/SendContactRequestContactsInnerPhonesInner.md) +- [SendFileRequest](docs/SendFileRequest.md) +- [SendFlowRequest1](docs/SendFlowRequest1.md) +- [SendFlowRequest1Header](docs/SendFlowRequest1Header.md) +- [SendFlowRequestHeader](docs/SendFlowRequestHeader.md) +- [SendListRequest](docs/SendListRequest.md) +- [SendListRequestSectionsInner](docs/SendListRequestSectionsInner.md) +- [SendListRequestSectionsInnerRowsInner](docs/SendListRequestSectionsInnerRowsInner.md) +- [SendLocationRequest1](docs/SendLocationRequest1.md) +- [SendLocationRequestRequest](docs/SendLocationRequestRequest.md) +- [SendMessageRequest](docs/SendMessageRequest.md) +- [SendReactionRequest](docs/SendReactionRequest.md) +- [SendTemplateRequest](docs/SendTemplateRequest.md) +- [SendTemplateRequestLanguage](docs/SendTemplateRequestLanguage.md) +- [SuccessResponse](docs/SuccessResponse.md) + +### Authorization + + +Authentication schemes defined for the API: + +#### tokenAuth + + +- **Type**: API key +- **API key parameter name**: `token` +- **Location**: URL query string + +## About + +This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/) +and is automatically generated by the +[OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: `1.0.0` +- Package version: `1.0.0` +- Generator version: `7.22.0` +- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen` + +The generated npm module supports the following: + +- Environments + * Node.js + * Webpack + * Browserify +- Language levels + * ES5 - you must have a Promises/A+ library installed + * ES6 +- Module systems + * CommonJS + * ES6 module system + +For more information, please visit [https://help.1msg.io](https://help.1msg.io) + +## Development + +### Building + +To build the TypeScript source code, you need to have Node.js and npm installed. +After cloning the repository, navigate to the project directory and run: + +```bash +npm install +npm run build +``` + +### Publishing + +Once you've built the package, you can publish it to npm: + +```bash +npm publish +``` + +## License + +[]() diff --git a/typescript/src/generated/docs/CreateGroups200Response.md b/typescript/src/generated/docs/CreateGroups200Response.md new file mode 100644 index 0000000..de340cf --- /dev/null +++ b/typescript/src/generated/docs/CreateGroups200Response.md @@ -0,0 +1,34 @@ + +# CreateGroups200Response + + +## Properties + +Name | Type +------------ | ------------- +`error` | any + +## Example + +```typescript +import type { CreateGroups200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "error": null, +} satisfies CreateGroups200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CreateGroups200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/CreateReadMessage200Response.md b/typescript/src/generated/docs/CreateReadMessage200Response.md new file mode 100644 index 0000000..69b5445 --- /dev/null +++ b/typescript/src/generated/docs/CreateReadMessage200Response.md @@ -0,0 +1,34 @@ + +# CreateReadMessage200Response + + +## Properties + +Name | Type +------------ | ------------- +`result` | string + +## Example + +```typescript +import type { CreateReadMessage200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "result": null, +} satisfies CreateReadMessage200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CreateReadMessage200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/CreateReadMessage401Response.md b/typescript/src/generated/docs/CreateReadMessage401Response.md new file mode 100644 index 0000000..8d192d2 --- /dev/null +++ b/typescript/src/generated/docs/CreateReadMessage401Response.md @@ -0,0 +1,34 @@ + +# CreateReadMessage401Response + + +## Properties + +Name | Type +------------ | ------------- +`error` | string + +## Example + +```typescript +import type { CreateReadMessage401Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "error": null, +} satisfies CreateReadMessage401Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CreateReadMessage401Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/CreateReadMessageRequest.md b/typescript/src/generated/docs/CreateReadMessageRequest.md new file mode 100644 index 0000000..2c8ebc4 --- /dev/null +++ b/typescript/src/generated/docs/CreateReadMessageRequest.md @@ -0,0 +1,34 @@ + +# CreateReadMessageRequest + + +## Properties + +Name | Type +------------ | ------------- +`messageId` | string + +## Example + +```typescript +import type { CreateReadMessageRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "messageId": null, +} satisfies CreateReadMessageRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CreateReadMessageRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/DeleteFlowsFlowId200Response.md b/typescript/src/generated/docs/DeleteFlowsFlowId200Response.md new file mode 100644 index 0000000..2840d66 --- /dev/null +++ b/typescript/src/generated/docs/DeleteFlowsFlowId200Response.md @@ -0,0 +1,36 @@ + +# DeleteFlowsFlowId200Response + + +## Properties + +Name | Type +------------ | ------------- +`success` | boolean +`error` | any + +## Example + +```typescript +import type { DeleteFlowsFlowId200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "success": null, + "error": null, +} satisfies DeleteFlowsFlowId200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeleteFlowsFlowId200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/DeleteGroupsGroupId200Response.md b/typescript/src/generated/docs/DeleteGroupsGroupId200Response.md new file mode 100644 index 0000000..b574622 --- /dev/null +++ b/typescript/src/generated/docs/DeleteGroupsGroupId200Response.md @@ -0,0 +1,36 @@ + +# DeleteGroupsGroupId200Response + + +## Properties + +Name | Type +------------ | ------------- +`success` | boolean +`response` | { [key: string]: any; } + +## Example + +```typescript +import type { DeleteGroupsGroupId200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "success": null, + "response": null, +} satisfies DeleteGroupsGroupId200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeleteGroupsGroupId200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/ErrorResponse.md b/typescript/src/generated/docs/ErrorResponse.md new file mode 100644 index 0000000..0383ebb --- /dev/null +++ b/typescript/src/generated/docs/ErrorResponse.md @@ -0,0 +1,35 @@ + +# ErrorResponse + +Standard error response + +## Properties + +Name | Type +------------ | ------------- +`error` | string + +## Example + +```typescript +import type { ErrorResponse } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "error": null, +} satisfies ErrorResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ErrorResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/FlowsApi.md b/typescript/src/generated/docs/FlowsApi.md new file mode 100644 index 0000000..72b2893 --- /dev/null +++ b/typescript/src/generated/docs/FlowsApi.md @@ -0,0 +1,686 @@ +# FlowsApi + +All URIs are relative to *https://api.1msg.io* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createFlows**](FlowsApi.md#createflows) | **POST** /flows | Create Flow | +| [**createFlowsFlowIdDeprecate**](FlowsApi.md#createflowsflowiddeprecate) | **POST** /flows/{flowId}/deprecate | Deprecate Flow | +| [**createFlowsFlowIdPublish**](FlowsApi.md#createflowsflowidpublish) | **POST** /flows/{flowId}/publish | Publish Flow | +| [**deleteFlowsFlowId**](FlowsApi.md#deleteflowsflowid) | **DELETE** /flows/{flowId} | Delete Flow | +| [**getFlowsFlowId**](FlowsApi.md#getflowsflowid) | **GET** /flows/{flowId} | Get Flow Details | +| [**getFlowsFlowIdPreview**](FlowsApi.md#getflowsflowidpreview) | **GET** /flows/{flowId}/preview | Preview Flow | +| [**listFlows**](FlowsApi.md#listflows) | **GET** /flows | List Flows | +| [**patchFlowsFlowIdAssets**](FlowsApi.md#patchflowsflowidassets) | **PATCH** /flows/{flowId}/assets | Update Flow Structure | +| [**patchFlowsFlowIdMetadata**](FlowsApi.md#patchflowsflowidmetadata) | **PATCH** /flows/{flowId}/metadata | Update Flow Metadata | + + + +## createFlows + +> CreateGroups200Response createFlows(token, wabaAccountId) + +Create Flow + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { CreateFlowsRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies CreateFlowsRequest; + + try { + const data = await api.createFlows(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CreateGroups200Response**](CreateGroups200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createFlowsFlowIdDeprecate + +> { [key: string]: any; } createFlowsFlowIdDeprecate(flowId, token, wabaAccountId) + +Deprecate Flow + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { CreateFlowsFlowIdDeprecateRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies CreateFlowsFlowIdDeprecateRequest; + + try { + const data = await api.createFlowsFlowIdDeprecate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createFlowsFlowIdPublish + +> { [key: string]: any; } createFlowsFlowIdPublish(flowId, token, wabaAccountId) + +Publish Flow + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { CreateFlowsFlowIdPublishRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies CreateFlowsFlowIdPublishRequest; + + try { + const data = await api.createFlowsFlowIdPublish(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## deleteFlowsFlowId + +> DeleteFlowsFlowId200Response deleteFlowsFlowId(flowId, token, wabaAccountId) + +Delete Flow + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { DeleteFlowsFlowIdRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies DeleteFlowsFlowIdRequest; + + try { + const data = await api.deleteFlowsFlowId(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**DeleteFlowsFlowId200Response**](DeleteFlowsFlowId200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getFlowsFlowId + +> CreateGroups200Response getFlowsFlowId(flowId, token, wabaAccountId) + +Get Flow Details + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { GetFlowsFlowIdRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies GetFlowsFlowIdRequest; + + try { + const data = await api.getFlowsFlowId(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CreateGroups200Response**](CreateGroups200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getFlowsFlowIdPreview + +> { [key: string]: any; } getFlowsFlowIdPreview(flowId, token, wabaAccountId) + +Preview Flow + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { GetFlowsFlowIdPreviewRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies GetFlowsFlowIdPreviewRequest; + + try { + const data = await api.getFlowsFlowIdPreview(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## listFlows + +> ListFlows200Response listFlows(token, wabaAccountId) + +List Flows + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { ListFlowsRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies ListFlowsRequest; + + try { + const data = await api.listFlows(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ListFlows200Response**](ListFlows200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## patchFlowsFlowIdAssets + +> PatchFlowsFlowIdAssets200Response patchFlowsFlowIdAssets(flowId, token, wabaAccountId) + +Update Flow Structure + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { PatchFlowsFlowIdAssetsRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies PatchFlowsFlowIdAssetsRequest; + + try { + const data = await api.patchFlowsFlowIdAssets(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**PatchFlowsFlowIdAssets200Response**](PatchFlowsFlowIdAssets200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## patchFlowsFlowIdMetadata + +> { [key: string]: any; } patchFlowsFlowIdMetadata(flowId, token, wabaAccountId) + +Update Flow Metadata + +### Example + +```ts +import { + Configuration, + FlowsApi, +} from '@1msg/chat-api-generated'; +import type { PatchFlowsFlowIdMetadataRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new FlowsApi(config); + + const body = { + // string | Flow ID + flowId: flowId_example, + // string | JWT token or API key for authorization + token: token_example, + // string (optional) + wabaAccountId: {{wabaAccountId}}, + } satisfies PatchFlowsFlowIdMetadataRequest; + + try { + const data = await api.patchFlowsFlowIdMetadata(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **flowId** | `string` | Flow ID | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **wabaAccountId** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/typescript/src/generated/docs/GroupsApi.md b/typescript/src/generated/docs/GroupsApi.md new file mode 100644 index 0000000..3f6d319 --- /dev/null +++ b/typescript/src/generated/docs/GroupsApi.md @@ -0,0 +1,513 @@ +# GroupsApi + +All URIs are relative to *https://api.1msg.io* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createGroups**](GroupsApi.md#creategroups) | **POST** /groups | Create Group | +| [**createGroupsGroupId**](GroupsApi.md#creategroupsgroupid) | **POST** /groups/{groupId} | Update Group Info | +| [**createGroupsGroupIdInvitelink**](GroupsApi.md#creategroupsgroupidinvitelink) | **POST** /groups/{groupId}/inviteLink | Reset Invite Link | +| [**deleteGroupsGroupId**](GroupsApi.md#deletegroupsgroupid) | **DELETE** /groups/{groupId} | Delete Group | +| [**getGroupsGroupId**](GroupsApi.md#getgroupsgroupid) | **GET** /groups/{groupId} | Get Group Info | +| [**getGroupsGroupIdInvitelink**](GroupsApi.md#getgroupsgroupidinvitelink) | **GET** /groups/{groupId}/inviteLink | Get Invite Link | +| [**listGroups**](GroupsApi.md#listgroups) | **GET** /groups | Get Groups List | + + + +## createGroups + +> CreateGroups200Response createGroups(token) + +Create Group + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { CreateGroupsRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + } satisfies CreateGroupsRequest; + + try { + const data = await api.createGroups(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +[**CreateGroups200Response**](CreateGroups200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createGroupsGroupId + +> { [key: string]: any; } createGroupsGroupId(groupId, token) + +Update Group Info + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { CreateGroupsGroupIdRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string + groupId: {{createdGroupId}}, + // string | JWT token or API key for authorization + token: token_example, + } satisfies CreateGroupsGroupIdRequest; + + try { + const data = await api.createGroupsGroupId(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **groupId** | `string` | | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createGroupsGroupIdInvitelink + +> { [key: string]: any; } createGroupsGroupIdInvitelink(groupId, token) + +Reset Invite Link + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { CreateGroupsGroupIdInvitelinkRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string + groupId: {{createdGroupId}}, + // string | JWT token or API key for authorization + token: token_example, + } satisfies CreateGroupsGroupIdInvitelinkRequest; + + try { + const data = await api.createGroupsGroupIdInvitelink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **groupId** | `string` | | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## deleteGroupsGroupId + +> DeleteGroupsGroupId200Response deleteGroupsGroupId(groupId, token) + +Delete Group + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { DeleteGroupsGroupIdRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string + groupId: {{createdGroupId}}, + // string | JWT token or API key for authorization + token: token_example, + } satisfies DeleteGroupsGroupIdRequest; + + try { + const data = await api.deleteGroupsGroupId(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **groupId** | `string` | | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +[**DeleteGroupsGroupId200Response**](DeleteGroupsGroupId200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupsGroupId + +> { [key: string]: any; } getGroupsGroupId(groupId, token) + +Get Group Info + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { GetGroupsGroupIdRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string + groupId: {{createdGroupId}}, + // string | JWT token or API key for authorization + token: token_example, + } satisfies GetGroupsGroupIdRequest; + + try { + const data = await api.getGroupsGroupId(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **groupId** | `string` | | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupsGroupIdInvitelink + +> { [key: string]: any; } getGroupsGroupIdInvitelink(groupId, token) + +Get Invite Link + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { GetGroupsGroupIdInvitelinkRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string + groupId: {{createdGroupId}}, + // string | JWT token or API key for authorization + token: token_example, + } satisfies GetGroupsGroupIdInvitelinkRequest; + + try { + const data = await api.getGroupsGroupIdInvitelink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **groupId** | `string` | | [Defaults to `undefined`] | +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## listGroups + +> { [key: string]: any; } listGroups(token) + +Get Groups List + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from '@1msg/chat-api-generated'; +import type { ListGroupsRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new GroupsApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + } satisfies ListGroupsRequest; + + try { + const data = await api.listGroups(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/typescript/src/generated/docs/ListFlows200Response.md b/typescript/src/generated/docs/ListFlows200Response.md new file mode 100644 index 0000000..870a230 --- /dev/null +++ b/typescript/src/generated/docs/ListFlows200Response.md @@ -0,0 +1,42 @@ + +# ListFlows200Response + + +## Properties + +Name | Type +------------ | ------------- +`items` | Array<{ [key: string]: any; }> +`paging` | { [key: string]: any; } +`count` | number +`total` | number +`error` | any + +## Example + +```typescript +import type { ListFlows200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "paging": null, + "count": null, + "total": null, + "error": null, +} satisfies ListFlows200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ListFlows200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/ListMessages200Response.md b/typescript/src/generated/docs/ListMessages200Response.md new file mode 100644 index 0000000..add517f --- /dev/null +++ b/typescript/src/generated/docs/ListMessages200Response.md @@ -0,0 +1,36 @@ + +# ListMessages200Response + + +## Properties + +Name | Type +------------ | ------------- +`notice` | string +`messages` | Array<{ [key: string]: any; }> + +## Example + +```typescript +import type { ListMessages200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "notice": null, + "messages": null, +} satisfies ListMessages200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ListMessages200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/ListTemplates200Response.md b/typescript/src/generated/docs/ListTemplates200Response.md new file mode 100644 index 0000000..91dbff1 --- /dev/null +++ b/typescript/src/generated/docs/ListTemplates200Response.md @@ -0,0 +1,38 @@ + +# ListTemplates200Response + + +## Properties + +Name | Type +------------ | ------------- +`total` | number +`templates` | Array<{ [key: string]: any; }> +`error` | { [key: string]: any; } + +## Example + +```typescript +import type { ListTemplates200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "total": null, + "templates": null, + "error": null, +} satisfies ListTemplates200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ListTemplates200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/MessageSentResponse.md b/typescript/src/generated/docs/MessageSentResponse.md new file mode 100644 index 0000000..da59caf --- /dev/null +++ b/typescript/src/generated/docs/MessageSentResponse.md @@ -0,0 +1,41 @@ + +# MessageSentResponse + +Response for successfully sent message + +## Properties + +Name | Type +------------ | ------------- +`sent` | boolean +`id` | string +`message` | string +`description` | string + +## Example + +```typescript +import type { MessageSentResponse } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "sent": null, + "id": null, + "message": null, + "description": null, +} satisfies MessageSentResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as MessageSentResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/MessagingApi.md b/typescript/src/generated/docs/MessagingApi.md new file mode 100644 index 0000000..19d5c28 --- /dev/null +++ b/typescript/src/generated/docs/MessagingApi.md @@ -0,0 +1,1178 @@ +# MessagingApi + +All URIs are relative to *https://api.1msg.io* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createReadMessage**](MessagingApi.md#createreadmessage) | **POST** /readMessage | Mark message as read | +| [**createUploadMedia**](MessagingApi.md#createuploadmedia) | **POST** /uploadMedia | Upload media | +| [**listMessages**](MessagingApi.md#listmessages) | **GET** /messages | Get messages list | +| [**sendButton**](MessagingApi.md#sendbuttonoperation) | **POST** /sendButton | Send Reply Buttons Message | +| [**sendCarousel**](MessagingApi.md#sendcarousel) | **POST** /sendCarousel | Send Carousel | +| [**sendContact**](MessagingApi.md#sendcontactoperation) | **POST** /sendContact | Send a Contact | +| [**sendFile**](MessagingApi.md#sendfile) | **POST** /sendFile | Send a File | +| [**sendFlow**](MessagingApi.md#sendflow) | **POST** /sendFlow | Send WhatsApp Flow Message | +| [**sendList**](MessagingApi.md#sendlistoperation) | **POST** /sendList | Send List Message | +| [**sendLocation**](MessagingApi.md#sendlocation) | **POST** /sendLocation | Send a Location | +| [**sendLocationRequest**](MessagingApi.md#sendlocationrequestoperation) | **POST** /sendLocationRequest | Send Location Request Message | +| [**sendMessage**](MessagingApi.md#sendmessage) | **POST** /sendMessage | Send a Message | +| [**sendProduct**](MessagingApi.md#sendproduct) | **POST** /sendProduct | Send a Product | +| [**sendReaction**](MessagingApi.md#sendreactionoperation) | **POST** /sendReaction | Send Reaction | + + + +## createReadMessage + +> CreateReadMessage200Response createReadMessage(token, messageId) + +Mark message as read + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { CreateReadMessageRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U (optional) + messageId: messageId_example, + } satisfies CreateReadMessageRequest; + + try { + const data = await api.createReadMessage(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **messageId** | `string` | Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CreateReadMessage200Response**](CreateReadMessage200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded`, `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Server response example | - | +| **401** | Invalid token | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createUploadMedia + +> createUploadMedia(token, requestBody) + +Upload media + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { CreateUploadMediaRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // { [key: string]: any; } (optional) + requestBody: Object, + } satisfies CreateUploadMediaRequest; + + try { + const data = await api.createUploadMedia(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **requestBody** | `{ [key: string]: any; }` | | [Optional] | + +### Return type + +`void` (Empty response body) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## listMessages + +> ListMessages200Response listMessages(token) + +Get messages list + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { ListMessagesRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + } satisfies ListMessagesRequest; + + try { + const data = await api.listMessages(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +[**ListMessages200Response**](ListMessages200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendButton + +> MessageSentResponse sendButton(token, sendButtonRequest) + +Send Reply Buttons Message + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendButtonOperationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // SendButtonRequest (optional) + sendButtonRequest: {"phone":"{{testPhone}}","body":"This is a buttons message","footer":"Footer","sections":[{"type":"reply","reply":{"id":"1","title":"Button 1"}}]}, + } satisfies SendButtonOperationRequest; + + try { + const data = await api.sendButton(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **sendButtonRequest** | [SendButtonRequest](SendButtonRequest.md) | | [Optional] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendCarousel + +> MessageSentResponse sendCarousel(token, params, body, quotedMsgId, chatId, phone) + +Send Carousel + +You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendCarouselRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // Array | Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards. Structure: - params[] item with type CAROUSEL and cards (2..10) - cards[] item: - components[] items: - header: parameters[0] with type image/video/product - image: {\\\"image\\\": {\\\"link\\\": \\\"https://...\\\"}} - video: {\\\"video\\\": {\\\"link\\\": \\\"https://...\\\"}} - product: {\\\"product\\\": {\\\"catalog_id\\\": \\\"...\\\", \\\"product_retailer_id\\\": \\\"...\\\"}} - button: sub_type url or quick_reply - url: parameters {\\\"text\\\": \\\"Button\\\", \\\"url\\\": \\\"https://...\\\"} - quick_reply: parameters[] of {\\\"id\\\": \\\"...\\\", \\\"text\\\": \\\"...\\\"} + params: ..., + // string | Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params. (optional) + body: body_example, + // string | Quoted message ID (Cloud API) (optional) + quotedMsgId: quotedMsgId_example, + // string | Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) (optional) + chatId: chatId_example, + // number | Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. (optional) + phone: 56, + } satisfies SendCarouselRequest; + + try { + const data = await api.sendCarousel(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **params** | `Array` | Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards. Structure: - params[] item with type CAROUSEL and cards (2..10) - cards[] item: - components[] items: - header: parameters[0] with type image/video/product - image: {\\\"image\\\": {\\\"link\\\": \\\"https://...\\\"}} - video: {\\\"video\\\": {\\\"link\\\": \\\"https://...\\\"}} - product: {\\\"product\\\": {\\\"catalog_id\\\": \\\"...\\\", \\\"product_retailer_id\\\": \\\"...\\\"}} - button: sub_type url or quick_reply - url: parameters {\\\"text\\\": \\\"Button\\\", \\\"url\\\": \\\"https://...\\\"} - quick_reply: parameters[] of {\\\"id\\\": \\\"...\\\", \\\"text\\\": \\\"...\\\"} | | +| **body** | `string` | Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params. | [Optional] [Defaults to `undefined`] | +| **quotedMsgId** | `string` | Quoted message ID (Cloud API) | [Optional] [Defaults to `undefined`] | +| **chatId** | `string` | Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) | [Optional] [Defaults to `undefined`] | +| **phone** | `number` | Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded`, `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendContact + +> MessageSentResponse sendContact(token, sendContactRequest) + +Send a Contact + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendContactOperationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // SendContactRequest (optional) + sendContactRequest: {"phone":"{{testPhone}}","contacts":[{"name":{"formatted_name":"John Doe","first_name":"John","last_name":"Doe","middle_name":"","suffix":"","prefix":""},"birthday":"","addresses":[],"emails":[],"org":{"company":"","department":"","title":""},"phones":[{"phone":"+1234567890","type":"HOME","wa_id":""}],"urls":[]}]}, + } satisfies SendContactOperationRequest; + + try { + const data = await api.sendContact(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **sendContactRequest** | [SendContactRequest](SendContactRequest.md) | | [Optional] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendFile + +> MessageSentResponse sendFile(token, body, filename, caption, quotedMsgId, chatId, phone) + +Send a File + +Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendFileRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string | File source: - HTTP/HTTPS URL (https://example.com/file.pdf) - Base64-encoded file with MIME (data:image/jpeg;base64,/9j/4AAQ...) - Form-data field + body: body_example, + // string | File name with extension (required for mime type detection) + filename: filename_example, + // string | Text caption under the file (optional) + caption: caption_example, + // string | Message ID to quote/reply to (optional) + quotedMsgId: quotedMsgId_example, + // string | Chat ID in format: phone@c.us or phone@g.us (optional) + chatId: chatId_example, + // number | Phone number starting with country code (optional) + phone: 56, + } satisfies SendFileRequest; + + try { + const data = await api.sendFile(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **body** | `string` | File source: - HTTP/HTTPS URL (https://example.com/file.pdf) - Base64-encoded file with MIME (data:image/jpeg;base64,/9j/4AAQ...) - Form-data field | [Defaults to `undefined`] | +| **filename** | `string` | File name with extension (required for mime type detection) | [Defaults to `undefined`] | +| **caption** | `string` | Text caption under the file | [Optional] [Defaults to `undefined`] | +| **quotedMsgId** | `string` | Message ID to quote/reply to | [Optional] [Defaults to `undefined`] | +| **chatId** | `string` | Chat ID in format: phone@c.us or phone@g.us | [Optional] [Defaults to `undefined`] | +| **phone** | `number` | Phone number starting with country code | [Optional] [Defaults to `undefined`] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded`, `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendFlow + +> MessageSentResponse sendFlow(token, body, flowId, flowToken, flowCta, header, footer, flowAction, flowActionPayload, flowMessageVersion, mode, flowActionData, flowActionScreen, quotedMsgId, chatId, phone) + +Send WhatsApp Flow Message + +Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate. + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendFlowRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string | Flow message body text + body: body_example, + // string | Published Flow ID + flowId: flowId_example, + // string | Flow token generated by the business + flowToken: flowToken_example, + // string | CTA button text + flowCta: flowCta_example, + // SendFlowRequestHeader (optional) + header: ..., + // string | Footer text (optional) + footer: footer_example, + // string | Flow action type (optional) + flowAction: flowAction_example, + // object | Required for flowAction=navigate (screen is required). Ignored for data_exchange. If data is provided, it must be a non-empty object. (optional) + flowActionPayload: Object, + // string | Flow message version (default \\\"3\\\") (optional) + flowMessageVersion: flowMessageVersion_example, + // string | Flow mode (draft or published). If omitted, provider default applies (optional) + mode: mode_example, + // object | Shortcut for flowActionPayload.data (optional) (optional) + flowActionData: Object, + // string | Shortcut for flowActionPayload.screen (optional) (optional) + flowActionScreen: flowActionScreen_example, + // string | Quoted message ID (Cloud API) (optional) + quotedMsgId: quotedMsgId_example, + // string | Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) (optional) + chatId: chatId_example, + // number | Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. (optional) + phone: 56, + } satisfies SendFlowRequest; + + try { + const data = await api.sendFlow(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **body** | `string` | Flow message body text | [Defaults to `undefined`] | +| **flowId** | `string` | Published Flow ID | [Defaults to `undefined`] | +| **flowToken** | `string` | Flow token generated by the business | [Defaults to `undefined`] | +| **flowCta** | `string` | CTA button text | [Defaults to `undefined`] | +| **header** | [SendFlowRequestHeader](SendFlowRequestHeader.md) | | [Optional] [Defaults to `undefined`] | +| **footer** | `string` | Footer text | [Optional] [Defaults to `undefined`] | +| **flowAction** | `navigate`, `data_exchange` | Flow action type | [Optional] [Defaults to `undefined`] [Enum: navigate, data_exchange] | +| **flowActionPayload** | `object` | Required for flowAction=navigate (screen is required). Ignored for data_exchange. If data is provided, it must be a non-empty object. | [Optional] [Defaults to `undefined`] | +| **flowMessageVersion** | `string` | Flow message version (default \\\"3\\\") | [Optional] [Defaults to `undefined`] | +| **mode** | `draft`, `published` | Flow mode (draft or published). If omitted, provider default applies | [Optional] [Defaults to `undefined`] [Enum: draft, published] | +| **flowActionData** | `object` | Shortcut for flowActionPayload.data (optional) | [Optional] [Defaults to `undefined`] | +| **flowActionScreen** | `string` | Shortcut for flowActionPayload.screen (optional) | [Optional] [Defaults to `undefined`] | +| **quotedMsgId** | `string` | Quoted message ID (Cloud API) | [Optional] [Defaults to `undefined`] | +| **chatId** | `string` | Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) | [Optional] [Defaults to `undefined`] | +| **phone** | `number` | Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded`, `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendList + +> MessageSentResponse sendList(token, sendListRequest) + +Send List Message + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendListOperationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // SendListRequest (optional) + sendListRequest: {"phone":"{{testPhone}}","body":"This is a list message","buttonText":"Click me","action":"Action","sections":[{"title":"Section 1","rows":[{"id":"1","title":"Row 1","description":"Description for Row 1"}]}]}, + } satisfies SendListOperationRequest; + + try { + const data = await api.sendList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **sendListRequest** | [SendListRequest](SendListRequest.md) | | [Optional] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendLocation + +> MessageSentResponse sendLocation(token, lat, lng, address, name, quotedMsgId, chatId, phone) + +Send a Location + +Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendLocationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string | Latitude of the location. Example: 45.018337 + lat: lat_example, + // string | Longitude of the location. Example: -73.968285 + lng: lng_example, + // string | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 (optional) + address: address_example, + // string | Name of the location. Example: Facebook HQ (optional) + name: name_example, + // string | Quoted message ID (Cloud API) (optional) + quotedMsgId: quotedMsgId_example, + // string | Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) (optional) + chatId: chatId_example, + // number | Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. (optional) + phone: 56, + } satisfies SendLocationRequest; + + try { + const data = await api.sendLocation(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **lat** | `string` | Latitude of the location. Example: 45.018337 | [Defaults to `undefined`] | +| **lng** | `string` | Longitude of the location. Example: -73.968285 | [Defaults to `undefined`] | +| **address** | `string` | Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 | [Optional] [Defaults to `undefined`] | +| **name** | `string` | Name of the location. Example: Facebook HQ | [Optional] [Defaults to `undefined`] | +| **quotedMsgId** | `string` | Quoted message ID (Cloud API) | [Optional] [Defaults to `undefined`] | +| **chatId** | `string` | Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) | [Optional] [Defaults to `undefined`] | +| **phone** | `number` | Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded`, `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendLocationRequest + +> MessageSentResponse sendLocationRequest(token, sendLocationRequestRequest) + +Send Location Request Message + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendLocationRequestOperationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // SendLocationRequestRequest (optional) + sendLocationRequestRequest: {"phone":"{{testPhone}}","body":"Text"}, + } satisfies SendLocationRequestOperationRequest; + + try { + const data = await api.sendLocationRequest(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **sendLocationRequestRequest** | [SendLocationRequestRequest](SendLocationRequestRequest.md) | | [Optional] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendMessage + +> MessageSentResponse sendMessage(token, body, quotedMsgId, chatId, phone) + +Send a Message + +Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendMessageRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // string | Message text, UTF-8 or UTF-16 string with emoji + body: body_example, + // string | Message ID to quote/reply to (Cloud API wamid) (optional) + quotedMsgId: quotedMsgId_example, + // string | Chat ID in format: phone@c.us (individual) or phone@g.us (group) (optional) + chatId: chatId_example, + // number | Phone number starting with country code (alternative to chatId) (optional) + phone: 56, + } satisfies SendMessageRequest; + + try { + const data = await api.sendMessage(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **body** | `string` | Message text, UTF-8 or UTF-16 string with emoji | [Defaults to `undefined`] | +| **quotedMsgId** | `string` | Message ID to quote/reply to (Cloud API wamid) | [Optional] [Defaults to `undefined`] | +| **chatId** | `string` | Chat ID in format: phone@c.us (individual) or phone@g.us (group) | [Optional] [Defaults to `undefined`] | +| **phone** | `number` | Phone number starting with country code (alternative to chatId) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded`, `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendProduct + +> MessageSentResponse sendProduct(token, requestBody) + +Send a Product + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendProductRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // { [key: string]: any; } (optional) + requestBody: Object, + } satisfies SendProductRequest; + + try { + const data = await api.sendProduct(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **requestBody** | `{ [key: string]: any; }` | | [Optional] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendReaction + +> MessageSentResponse sendReaction(token, sendReactionRequest) + +Send Reaction + +### Example + +```ts +import { + Configuration, + MessagingApi, +} from '@1msg/chat-api-generated'; +import type { SendReactionOperationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new MessagingApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // SendReactionRequest (optional) + sendReactionRequest: {"phone":"{{testPhone}}","body":"😀","quotedMsgId":"{{lastMessageId}}"}, + } satisfies SendReactionOperationRequest; + + try { + const data = await api.sendReaction(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **sendReactionRequest** | [SendReactionRequest](SendReactionRequest.md) | | [Optional] | + +### Return type + +[**MessageSentResponse**](MessageSentResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Message sent successfully | - | +| **400** | Invalid request parameters | - | +| **401** | Invalid or missing authentication token | - | +| **429** | Rate limit exceeded | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/typescript/src/generated/docs/PatchFlowsFlowIdAssets200Response.md b/typescript/src/generated/docs/PatchFlowsFlowIdAssets200Response.md new file mode 100644 index 0000000..bbe3a5c --- /dev/null +++ b/typescript/src/generated/docs/PatchFlowsFlowIdAssets200Response.md @@ -0,0 +1,38 @@ + +# PatchFlowsFlowIdAssets200Response + + +## Properties + +Name | Type +------------ | ------------- +`success` | boolean +`validationErrors` | Array<{ [key: string]: any; }> +`error` | any + +## Example + +```typescript +import type { PatchFlowsFlowIdAssets200Response } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "success": null, + "validationErrors": null, + "error": null, +} satisfies PatchFlowsFlowIdAssets200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PatchFlowsFlowIdAssets200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/ProfileApi.md b/typescript/src/generated/docs/ProfileApi.md new file mode 100644 index 0000000..e8c2e8f --- /dev/null +++ b/typescript/src/generated/docs/ProfileApi.md @@ -0,0 +1,82 @@ +# ProfileApi + +All URIs are relative to *https://api.1msg.io* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getMe**](ProfileApi.md#getme) | **GET** /me | Get Profile Info | + + + +## getMe + +> ProfileInfo getMe(token) + +Get Profile Info + +Get WhatsApp Business Account profile information + +### Example + +```ts +import { + Configuration, + ProfileApi, +} from '@1msg/chat-api-generated'; +import type { GetMeRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new ProfileApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + } satisfies GetMeRequest; + + try { + const data = await api.getMe(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +[**ProfileInfo**](ProfileInfo.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Profile information | - | +| **401** | Invalid or missing authentication token | - | +| **500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/typescript/src/generated/docs/ProfileInfo.md b/typescript/src/generated/docs/ProfileInfo.md new file mode 100644 index 0000000..7bdc144 --- /dev/null +++ b/typescript/src/generated/docs/ProfileInfo.md @@ -0,0 +1,49 @@ + +# ProfileInfo + +WhatsApp Business profile information + +## Properties + +Name | Type +------------ | ------------- +`about` | string +`address` | string +`description` | string +`email` | string +`phone` | string +`vertical` | string +`photo` | string +`websites` | Array<string> + +## Example + +```typescript +import type { ProfileInfo } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "about": null, + "address": null, + "description": null, + "email": null, + "phone": null, + "vertical": null, + "photo": null, + "websites": null, +} satisfies ProfileInfo + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ProfileInfo +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendButtonRequest.md b/typescript/src/generated/docs/SendButtonRequest.md new file mode 100644 index 0000000..1e56195 --- /dev/null +++ b/typescript/src/generated/docs/SendButtonRequest.md @@ -0,0 +1,40 @@ + +# SendButtonRequest + + +## Properties + +Name | Type +------------ | ------------- +`phone` | string +`body` | string +`footer` | string +`sections` | [Array<SendButtonRequestSectionsInner>](SendButtonRequestSectionsInner.md) + +## Example + +```typescript +import type { SendButtonRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "phone": null, + "body": null, + "footer": null, + "sections": null, +} satisfies SendButtonRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendButtonRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendButtonRequestSectionsInner.md b/typescript/src/generated/docs/SendButtonRequestSectionsInner.md new file mode 100644 index 0000000..d610318 --- /dev/null +++ b/typescript/src/generated/docs/SendButtonRequestSectionsInner.md @@ -0,0 +1,36 @@ + +# SendButtonRequestSectionsInner + + +## Properties + +Name | Type +------------ | ------------- +`type` | string +`reply` | [SendButtonRequestSectionsInnerReply](SendButtonRequestSectionsInnerReply.md) + +## Example + +```typescript +import type { SendButtonRequestSectionsInner } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "type": null, + "reply": null, +} satisfies SendButtonRequestSectionsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendButtonRequestSectionsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendButtonRequestSectionsInnerReply.md b/typescript/src/generated/docs/SendButtonRequestSectionsInnerReply.md new file mode 100644 index 0000000..944f0ef --- /dev/null +++ b/typescript/src/generated/docs/SendButtonRequestSectionsInnerReply.md @@ -0,0 +1,36 @@ + +# SendButtonRequestSectionsInnerReply + + +## Properties + +Name | Type +------------ | ------------- +`id` | string +`title` | string + +## Example + +```typescript +import type { SendButtonRequestSectionsInnerReply } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "id": null, + "title": null, +} satisfies SendButtonRequestSectionsInnerReply + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendButtonRequestSectionsInnerReply +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendCarouselRequest1.md b/typescript/src/generated/docs/SendCarouselRequest1.md new file mode 100644 index 0000000..58cb45f --- /dev/null +++ b/typescript/src/generated/docs/SendCarouselRequest1.md @@ -0,0 +1,42 @@ + +# SendCarouselRequest1 + + +## Properties + +Name | Type +------------ | ------------- +`body` | string +`params` | Array<object> +`quotedMsgId` | string +`chatId` | string +`phone` | number + +## Example + +```typescript +import type { SendCarouselRequest1 } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "body": null, + "params": null, + "quotedMsgId": null, + "chatId": null, + "phone": null, +} satisfies SendCarouselRequest1 + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendCarouselRequest1 +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendContactRequest.md b/typescript/src/generated/docs/SendContactRequest.md new file mode 100644 index 0000000..9b75bfa --- /dev/null +++ b/typescript/src/generated/docs/SendContactRequest.md @@ -0,0 +1,36 @@ + +# SendContactRequest + + +## Properties + +Name | Type +------------ | ------------- +`phone` | string +`contacts` | [Array<SendContactRequestContactsInner>](SendContactRequestContactsInner.md) + +## Example + +```typescript +import type { SendContactRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "phone": null, + "contacts": null, +} satisfies SendContactRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendContactRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendContactRequestContactsInner.md b/typescript/src/generated/docs/SendContactRequestContactsInner.md new file mode 100644 index 0000000..14582f8 --- /dev/null +++ b/typescript/src/generated/docs/SendContactRequestContactsInner.md @@ -0,0 +1,46 @@ + +# SendContactRequestContactsInner + + +## Properties + +Name | Type +------------ | ------------- +`name` | [SendContactRequestContactsInnerName](SendContactRequestContactsInnerName.md) +`birthday` | string +`addresses` | Array<any> +`emails` | Array<any> +`org` | [SendContactRequestContactsInnerOrg](SendContactRequestContactsInnerOrg.md) +`phones` | [Array<SendContactRequestContactsInnerPhonesInner>](SendContactRequestContactsInnerPhonesInner.md) +`urls` | Array<any> + +## Example + +```typescript +import type { SendContactRequestContactsInner } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "birthday": null, + "addresses": null, + "emails": null, + "org": null, + "phones": null, + "urls": null, +} satisfies SendContactRequestContactsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendContactRequestContactsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendContactRequestContactsInnerName.md b/typescript/src/generated/docs/SendContactRequestContactsInnerName.md new file mode 100644 index 0000000..484bbac --- /dev/null +++ b/typescript/src/generated/docs/SendContactRequestContactsInnerName.md @@ -0,0 +1,44 @@ + +# SendContactRequestContactsInnerName + + +## Properties + +Name | Type +------------ | ------------- +`formattedName` | string +`firstName` | string +`lastName` | string +`middleName` | string +`suffix` | string +`prefix` | string + +## Example + +```typescript +import type { SendContactRequestContactsInnerName } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "formattedName": null, + "firstName": null, + "lastName": null, + "middleName": null, + "suffix": null, + "prefix": null, +} satisfies SendContactRequestContactsInnerName + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendContactRequestContactsInnerName +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendContactRequestContactsInnerOrg.md b/typescript/src/generated/docs/SendContactRequestContactsInnerOrg.md new file mode 100644 index 0000000..80407e6 --- /dev/null +++ b/typescript/src/generated/docs/SendContactRequestContactsInnerOrg.md @@ -0,0 +1,38 @@ + +# SendContactRequestContactsInnerOrg + + +## Properties + +Name | Type +------------ | ------------- +`company` | string +`department` | string +`title` | string + +## Example + +```typescript +import type { SendContactRequestContactsInnerOrg } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "company": null, + "department": null, + "title": null, +} satisfies SendContactRequestContactsInnerOrg + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendContactRequestContactsInnerOrg +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendContactRequestContactsInnerPhonesInner.md b/typescript/src/generated/docs/SendContactRequestContactsInnerPhonesInner.md new file mode 100644 index 0000000..1b0b84d --- /dev/null +++ b/typescript/src/generated/docs/SendContactRequestContactsInnerPhonesInner.md @@ -0,0 +1,38 @@ + +# SendContactRequestContactsInnerPhonesInner + + +## Properties + +Name | Type +------------ | ------------- +`phone` | string +`type` | string +`waId` | string + +## Example + +```typescript +import type { SendContactRequestContactsInnerPhonesInner } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "phone": null, + "type": null, + "waId": null, +} satisfies SendContactRequestContactsInnerPhonesInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendContactRequestContactsInnerPhonesInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendFileRequest.md b/typescript/src/generated/docs/SendFileRequest.md new file mode 100644 index 0000000..d3762d2 --- /dev/null +++ b/typescript/src/generated/docs/SendFileRequest.md @@ -0,0 +1,45 @@ + +# SendFileRequest + +Request body for sending a file (image, video, document, audio) + +## Properties + +Name | Type +------------ | ------------- +`body` | string +`filename` | string +`caption` | string +`quotedMsgId` | string +`chatId` | string +`phone` | number + +## Example + +```typescript +import type { SendFileRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "body": https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf, + "filename": document.pdf, + "caption": Here is your document, + "quotedMsgId": wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA, + "chatId": 12020721369@c.us, + "phone": 12020721369, +} satisfies SendFileRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendFileRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendFlowRequest1.md b/typescript/src/generated/docs/SendFlowRequest1.md new file mode 100644 index 0000000..123f0a5 --- /dev/null +++ b/typescript/src/generated/docs/SendFlowRequest1.md @@ -0,0 +1,62 @@ + +# SendFlowRequest1 + + +## Properties + +Name | Type +------------ | ------------- +`body` | string +`header` | [SendFlowRequest1Header](SendFlowRequest1Header.md) +`footer` | string +`flowId` | string +`flowToken` | string +`flowCta` | string +`flowAction` | string +`flowActionPayload` | object +`flowMessageVersion` | string +`mode` | string +`flowActionData` | object +`flowActionScreen` | string +`quotedMsgId` | string +`chatId` | string +`phone` | number + +## Example + +```typescript +import type { SendFlowRequest1 } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "body": null, + "header": null, + "footer": null, + "flowId": null, + "flowToken": null, + "flowCta": null, + "flowAction": null, + "flowActionPayload": null, + "flowMessageVersion": null, + "mode": null, + "flowActionData": null, + "flowActionScreen": null, + "quotedMsgId": null, + "chatId": null, + "phone": null, +} satisfies SendFlowRequest1 + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendFlowRequest1 +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendFlowRequest1Header.md b/typescript/src/generated/docs/SendFlowRequest1Header.md new file mode 100644 index 0000000..8bec0b7 --- /dev/null +++ b/typescript/src/generated/docs/SendFlowRequest1Header.md @@ -0,0 +1,32 @@ + +# SendFlowRequest1Header + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SendFlowRequest1Header } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { +} satisfies SendFlowRequest1Header + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendFlowRequest1Header +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendFlowRequestHeader.md b/typescript/src/generated/docs/SendFlowRequestHeader.md new file mode 100644 index 0000000..c4f74b2 --- /dev/null +++ b/typescript/src/generated/docs/SendFlowRequestHeader.md @@ -0,0 +1,33 @@ + +# SendFlowRequestHeader + +Flow header (string or text header object) + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SendFlowRequestHeader } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { +} satisfies SendFlowRequestHeader + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendFlowRequestHeader +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendListRequest.md b/typescript/src/generated/docs/SendListRequest.md new file mode 100644 index 0000000..02ff116 --- /dev/null +++ b/typescript/src/generated/docs/SendListRequest.md @@ -0,0 +1,42 @@ + +# SendListRequest + + +## Properties + +Name | Type +------------ | ------------- +`phone` | string +`body` | string +`buttonText` | string +`action` | string +`sections` | [Array<SendListRequestSectionsInner>](SendListRequestSectionsInner.md) + +## Example + +```typescript +import type { SendListRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "phone": null, + "body": null, + "buttonText": null, + "action": null, + "sections": null, +} satisfies SendListRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendListRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendListRequestSectionsInner.md b/typescript/src/generated/docs/SendListRequestSectionsInner.md new file mode 100644 index 0000000..7652f41 --- /dev/null +++ b/typescript/src/generated/docs/SendListRequestSectionsInner.md @@ -0,0 +1,36 @@ + +# SendListRequestSectionsInner + + +## Properties + +Name | Type +------------ | ------------- +`title` | string +`rows` | [Array<SendListRequestSectionsInnerRowsInner>](SendListRequestSectionsInnerRowsInner.md) + +## Example + +```typescript +import type { SendListRequestSectionsInner } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "title": null, + "rows": null, +} satisfies SendListRequestSectionsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendListRequestSectionsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendListRequestSectionsInnerRowsInner.md b/typescript/src/generated/docs/SendListRequestSectionsInnerRowsInner.md new file mode 100644 index 0000000..4855525 --- /dev/null +++ b/typescript/src/generated/docs/SendListRequestSectionsInnerRowsInner.md @@ -0,0 +1,38 @@ + +# SendListRequestSectionsInnerRowsInner + + +## Properties + +Name | Type +------------ | ------------- +`id` | string +`title` | string +`description` | string + +## Example + +```typescript +import type { SendListRequestSectionsInnerRowsInner } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "id": null, + "title": null, + "description": null, +} satisfies SendListRequestSectionsInnerRowsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendListRequestSectionsInnerRowsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendLocationRequest1.md b/typescript/src/generated/docs/SendLocationRequest1.md new file mode 100644 index 0000000..cc3a41d --- /dev/null +++ b/typescript/src/generated/docs/SendLocationRequest1.md @@ -0,0 +1,46 @@ + +# SendLocationRequest1 + + +## Properties + +Name | Type +------------ | ------------- +`lat` | string +`lng` | string +`address` | string +`name` | string +`quotedMsgId` | string +`chatId` | string +`phone` | number + +## Example + +```typescript +import type { SendLocationRequest1 } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "lat": null, + "lng": null, + "address": null, + "name": null, + "quotedMsgId": null, + "chatId": null, + "phone": null, +} satisfies SendLocationRequest1 + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendLocationRequest1 +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendLocationRequestRequest.md b/typescript/src/generated/docs/SendLocationRequestRequest.md new file mode 100644 index 0000000..a6a00fc --- /dev/null +++ b/typescript/src/generated/docs/SendLocationRequestRequest.md @@ -0,0 +1,36 @@ + +# SendLocationRequestRequest + + +## Properties + +Name | Type +------------ | ------------- +`phone` | string +`body` | string + +## Example + +```typescript +import type { SendLocationRequestRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "phone": null, + "body": null, +} satisfies SendLocationRequestRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendLocationRequestRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendMessageRequest.md b/typescript/src/generated/docs/SendMessageRequest.md new file mode 100644 index 0000000..5030dd5 --- /dev/null +++ b/typescript/src/generated/docs/SendMessageRequest.md @@ -0,0 +1,41 @@ + +# SendMessageRequest + +Request body for sending a text message + +## Properties + +Name | Type +------------ | ------------- +`body` | string +`quotedMsgId` | string +`chatId` | string +`phone` | number + +## Example + +```typescript +import type { SendMessageRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "body": Hello World 🌍, + "quotedMsgId": wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA, + "chatId": 12020721369@c.us, + "phone": 12020721369, +} satisfies SendMessageRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendMessageRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendReactionRequest.md b/typescript/src/generated/docs/SendReactionRequest.md new file mode 100644 index 0000000..e705dc9 --- /dev/null +++ b/typescript/src/generated/docs/SendReactionRequest.md @@ -0,0 +1,38 @@ + +# SendReactionRequest + + +## Properties + +Name | Type +------------ | ------------- +`phone` | string +`body` | string +`quotedMsgId` | string + +## Example + +```typescript +import type { SendReactionRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "phone": null, + "body": null, + "quotedMsgId": null, +} satisfies SendReactionRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendReactionRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendTemplateRequest.md b/typescript/src/generated/docs/SendTemplateRequest.md new file mode 100644 index 0000000..8e9996c --- /dev/null +++ b/typescript/src/generated/docs/SendTemplateRequest.md @@ -0,0 +1,42 @@ + +# SendTemplateRequest + + +## Properties + +Name | Type +------------ | ------------- +`template` | string +`language` | [SendTemplateRequestLanguage](SendTemplateRequestLanguage.md) +`namespace` | string +`params` | Array<any> +`phone` | string + +## Example + +```typescript +import type { SendTemplateRequest } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "template": null, + "language": null, + "namespace": null, + "params": null, + "phone": null, +} satisfies SendTemplateRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendTemplateRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SendTemplateRequestLanguage.md b/typescript/src/generated/docs/SendTemplateRequestLanguage.md new file mode 100644 index 0000000..338f790 --- /dev/null +++ b/typescript/src/generated/docs/SendTemplateRequestLanguage.md @@ -0,0 +1,36 @@ + +# SendTemplateRequestLanguage + + +## Properties + +Name | Type +------------ | ------------- +`policy` | string +`code` | string + +## Example + +```typescript +import type { SendTemplateRequestLanguage } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "policy": null, + "code": null, +} satisfies SendTemplateRequestLanguage + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SendTemplateRequestLanguage +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/SuccessResponse.md b/typescript/src/generated/docs/SuccessResponse.md new file mode 100644 index 0000000..e684011 --- /dev/null +++ b/typescript/src/generated/docs/SuccessResponse.md @@ -0,0 +1,35 @@ + +# SuccessResponse + +Generic success response + +## Properties + +Name | Type +------------ | ------------- +`result` | string + +## Example + +```typescript +import type { SuccessResponse } from '@1msg/chat-api-generated' + +// TODO: Update the object below with actual values +const example = { + "result": null, +} satisfies SuccessResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SuccessResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/typescript/src/generated/docs/TemplatesApi.md b/typescript/src/generated/docs/TemplatesApi.md new file mode 100644 index 0000000..d5f98a9 --- /dev/null +++ b/typescript/src/generated/docs/TemplatesApi.md @@ -0,0 +1,151 @@ +# TemplatesApi + +All URIs are relative to *https://api.1msg.io* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**listTemplates**](TemplatesApi.md#listtemplates) | **GET** /templates | Get templates list | +| [**sendTemplate**](TemplatesApi.md#sendtemplateoperation) | **POST** /sendTemplate | Send Template Message | + + + +## listTemplates + +> ListTemplates200Response listTemplates(token) + +Get templates list + +### Example + +```ts +import { + Configuration, + TemplatesApi, +} from '@1msg/chat-api-generated'; +import type { ListTemplatesRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new TemplatesApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + } satisfies ListTemplatesRequest; + + try { + const data = await api.listTemplates(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | + +### Return type + +[**ListTemplates200Response**](ListTemplates200Response.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sendTemplate + +> { [key: string]: any; } sendTemplate(token, sendTemplateRequest) + +Send Template Message + +### Example + +```ts +import { + Configuration, + TemplatesApi, +} from '@1msg/chat-api-generated'; +import type { SendTemplateOperationRequest } from '@1msg/chat-api-generated'; + +async function example() { + console.log("🚀 Testing @1msg/chat-api-generated SDK..."); + const config = new Configuration({ + // To configure API key authorization: tokenAuth + apiKey: "YOUR API KEY", + }); + const api = new TemplatesApi(config); + + const body = { + // string | JWT token or API key for authorization + token: token_example, + // SendTemplateRequest (optional) + sendTemplateRequest: {"template":"test_buttons_2","language":{"policy":"deterministic","code":"ru"},"namespace":"41123797_e45e_4f06_a2fa_443b27c6f5ec","params":[],"phone":"{{testPhone}}"}, + } satisfies SendTemplateOperationRequest; + + try { + const data = await api.sendTemplate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | `string` | JWT token or API key for authorization | [Defaults to `undefined`] | +| **sendTemplateRequest** | [SendTemplateRequest](SendTemplateRequest.md) | | [Optional] | + +### Return type + +**{ [key: string]: any; }** + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/typescript/src/generated/package.json b/typescript/src/generated/package.json new file mode 100644 index 0000000..cb2b299 --- /dev/null +++ b/typescript/src/generated/package.json @@ -0,0 +1,21 @@ +{ + "name": "@1msg/chat-api-generated", + "version": "1.0.0", + "description": "OpenAPI client for @1msg/chat-api-generated", + "author": "OpenAPI-Generator", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json", + "prepare": "npm run build" + }, + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } +} diff --git a/typescript/src/generated/src/apis/FlowsApi.ts b/typescript/src/generated/src/apis/FlowsApi.ts new file mode 100644 index 0000000..a6dc40d --- /dev/null +++ b/typescript/src/generated/src/apis/FlowsApi.ts @@ -0,0 +1,902 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type CreateGroups200Response, + CreateGroups200ResponseFromJSON, + CreateGroups200ResponseToJSON, +} from '../models/CreateGroups200Response'; +import { + type DeleteFlowsFlowId200Response, + DeleteFlowsFlowId200ResponseFromJSON, + DeleteFlowsFlowId200ResponseToJSON, +} from '../models/DeleteFlowsFlowId200Response'; +import { + type ListFlows200Response, + ListFlows200ResponseFromJSON, + ListFlows200ResponseToJSON, +} from '../models/ListFlows200Response'; +import { + type PatchFlowsFlowIdAssets200Response, + PatchFlowsFlowIdAssets200ResponseFromJSON, + PatchFlowsFlowIdAssets200ResponseToJSON, +} from '../models/PatchFlowsFlowIdAssets200Response'; + +export interface CreateFlowsRequest { + token: string; + wabaAccountId?: string; +} + +export interface CreateFlowsFlowIdDeprecateRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +export interface CreateFlowsFlowIdPublishRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +export interface DeleteFlowsFlowIdRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +export interface GetFlowsFlowIdRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +export interface GetFlowsFlowIdPreviewRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +export interface ListFlowsRequest { + token: string; + wabaAccountId?: string; +} + +export interface PatchFlowsFlowIdAssetsRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +export interface PatchFlowsFlowIdMetadataRequest { + flowId: string; + token: string; + wabaAccountId?: string; +} + +/** + * FlowsApi - interface + * + * @export + * @interface FlowsApiInterface + */ +export interface FlowsApiInterface { + /** + * Creates request options for createFlows without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + createFlowsRequestOpts(requestParameters: CreateFlowsRequest): Promise; + + /** + * + * @summary Create Flow + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + createFlowsRaw(requestParameters: CreateFlowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create Flow + */ + createFlows(token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for createFlowsFlowIdDeprecate without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + createFlowsFlowIdDeprecateRequestOpts(requestParameters: CreateFlowsFlowIdDeprecateRequest): Promise; + + /** + * + * @summary Deprecate Flow + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + createFlowsFlowIdDeprecateRaw(requestParameters: CreateFlowsFlowIdDeprecateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Deprecate Flow + */ + createFlowsFlowIdDeprecate(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for createFlowsFlowIdPublish without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + createFlowsFlowIdPublishRequestOpts(requestParameters: CreateFlowsFlowIdPublishRequest): Promise; + + /** + * + * @summary Publish Flow + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + createFlowsFlowIdPublishRaw(requestParameters: CreateFlowsFlowIdPublishRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Publish Flow + */ + createFlowsFlowIdPublish(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for deleteFlowsFlowId without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + deleteFlowsFlowIdRequestOpts(requestParameters: DeleteFlowsFlowIdRequest): Promise; + + /** + * + * @summary Delete Flow + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + deleteFlowsFlowIdRaw(requestParameters: DeleteFlowsFlowIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete Flow + */ + deleteFlowsFlowId(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for getFlowsFlowId without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + getFlowsFlowIdRequestOpts(requestParameters: GetFlowsFlowIdRequest): Promise; + + /** + * + * @summary Get Flow Details + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + getFlowsFlowIdRaw(requestParameters: GetFlowsFlowIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get Flow Details + */ + getFlowsFlowId(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for getFlowsFlowIdPreview without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + getFlowsFlowIdPreviewRequestOpts(requestParameters: GetFlowsFlowIdPreviewRequest): Promise; + + /** + * + * @summary Preview Flow + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + getFlowsFlowIdPreviewRaw(requestParameters: GetFlowsFlowIdPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Preview Flow + */ + getFlowsFlowIdPreview(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for listFlows without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + listFlowsRequestOpts(requestParameters: ListFlowsRequest): Promise; + + /** + * + * @summary List Flows + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + listFlowsRaw(requestParameters: ListFlowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * List Flows + */ + listFlows(token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for patchFlowsFlowIdAssets without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + patchFlowsFlowIdAssetsRequestOpts(requestParameters: PatchFlowsFlowIdAssetsRequest): Promise; + + /** + * + * @summary Update Flow Structure + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + patchFlowsFlowIdAssetsRaw(requestParameters: PatchFlowsFlowIdAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update Flow Structure + */ + patchFlowsFlowIdAssets(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for patchFlowsFlowIdMetadata without sending the request + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + patchFlowsFlowIdMetadataRequestOpts(requestParameters: PatchFlowsFlowIdMetadataRequest): Promise; + + /** + * + * @summary Update Flow Metadata + * @param {string} flowId Flow ID + * @param {string} token JWT token or API key for authorization + * @param {string} [wabaAccountId] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FlowsApiInterface + */ + patchFlowsFlowIdMetadataRaw(requestParameters: PatchFlowsFlowIdMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update Flow Metadata + */ + patchFlowsFlowIdMetadata(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + +} + +/** + * + */ +export class FlowsApi extends runtime.BaseAPI implements FlowsApiInterface { + + /** + * Creates request options for createFlows without sending the request + */ + async createFlowsRequestOpts(requestParameters: CreateFlowsRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createFlows().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Create Flow + */ + async createFlowsRaw(requestParameters: CreateFlowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createFlowsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateGroups200ResponseFromJSON(jsonValue)); + } + + /** + * Create Flow + */ + async createFlows(token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createFlowsRaw({ token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createFlowsFlowIdDeprecate without sending the request + */ + async createFlowsFlowIdDeprecateRequestOpts(requestParameters: CreateFlowsFlowIdDeprecateRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling createFlowsFlowIdDeprecate().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createFlowsFlowIdDeprecate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}/deprecate`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Deprecate Flow + */ + async createFlowsFlowIdDeprecateRaw(requestParameters: CreateFlowsFlowIdDeprecateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createFlowsFlowIdDeprecateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deprecate Flow + */ + async createFlowsFlowIdDeprecate(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.createFlowsFlowIdDeprecateRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createFlowsFlowIdPublish without sending the request + */ + async createFlowsFlowIdPublishRequestOpts(requestParameters: CreateFlowsFlowIdPublishRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling createFlowsFlowIdPublish().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createFlowsFlowIdPublish().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}/publish`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Publish Flow + */ + async createFlowsFlowIdPublishRaw(requestParameters: CreateFlowsFlowIdPublishRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createFlowsFlowIdPublishRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Publish Flow + */ + async createFlowsFlowIdPublish(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.createFlowsFlowIdPublishRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for deleteFlowsFlowId without sending the request + */ + async deleteFlowsFlowIdRequestOpts(requestParameters: DeleteFlowsFlowIdRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling deleteFlowsFlowId().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling deleteFlowsFlowId().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Delete Flow + */ + async deleteFlowsFlowIdRaw(requestParameters: DeleteFlowsFlowIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteFlowsFlowIdRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeleteFlowsFlowId200ResponseFromJSON(jsonValue)); + } + + /** + * Delete Flow + */ + async deleteFlowsFlowId(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteFlowsFlowIdRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getFlowsFlowId without sending the request + */ + async getFlowsFlowIdRequestOpts(requestParameters: GetFlowsFlowIdRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling getFlowsFlowId().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling getFlowsFlowId().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get Flow Details + */ + async getFlowsFlowIdRaw(requestParameters: GetFlowsFlowIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getFlowsFlowIdRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateGroups200ResponseFromJSON(jsonValue)); + } + + /** + * Get Flow Details + */ + async getFlowsFlowId(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getFlowsFlowIdRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getFlowsFlowIdPreview without sending the request + */ + async getFlowsFlowIdPreviewRequestOpts(requestParameters: GetFlowsFlowIdPreviewRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling getFlowsFlowIdPreview().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling getFlowsFlowIdPreview().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}/preview`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Preview Flow + */ + async getFlowsFlowIdPreviewRaw(requestParameters: GetFlowsFlowIdPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getFlowsFlowIdPreviewRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Preview Flow + */ + async getFlowsFlowIdPreview(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.getFlowsFlowIdPreviewRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for listFlows without sending the request + */ + async listFlowsRequestOpts(requestParameters: ListFlowsRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling listFlows().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List Flows + */ + async listFlowsRaw(requestParameters: ListFlowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.listFlowsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListFlows200ResponseFromJSON(jsonValue)); + } + + /** + * List Flows + */ + async listFlows(token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listFlowsRaw({ token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for patchFlowsFlowIdAssets without sending the request + */ + async patchFlowsFlowIdAssetsRequestOpts(requestParameters: PatchFlowsFlowIdAssetsRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling patchFlowsFlowIdAssets().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling patchFlowsFlowIdAssets().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}/assets`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Update Flow Structure + */ + async patchFlowsFlowIdAssetsRaw(requestParameters: PatchFlowsFlowIdAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.patchFlowsFlowIdAssetsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PatchFlowsFlowIdAssets200ResponseFromJSON(jsonValue)); + } + + /** + * Update Flow Structure + */ + async patchFlowsFlowIdAssets(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.patchFlowsFlowIdAssetsRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for patchFlowsFlowIdMetadata without sending the request + */ + async patchFlowsFlowIdMetadataRequestOpts(requestParameters: PatchFlowsFlowIdMetadataRequest): Promise { + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling patchFlowsFlowIdMetadata().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling patchFlowsFlowIdMetadata().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + if (requestParameters['wabaAccountId'] != null) { + queryParameters['wabaAccountId'] = requestParameters['wabaAccountId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/flows/{flowId}/metadata`; + urlPath = urlPath.replace('{flowId}', encodeURIComponent(String(requestParameters['flowId']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Update Flow Metadata + */ + async patchFlowsFlowIdMetadataRaw(requestParameters: PatchFlowsFlowIdMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.patchFlowsFlowIdMetadataRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Update Flow Metadata + */ + async patchFlowsFlowIdMetadata(flowId: string, token: string, wabaAccountId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.patchFlowsFlowIdMetadataRaw({ flowId: flowId, token: token, wabaAccountId: wabaAccountId }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/generated/src/apis/GroupsApi.ts b/typescript/src/generated/src/apis/GroupsApi.ts new file mode 100644 index 0000000..fe6a8a4 --- /dev/null +++ b/typescript/src/generated/src/apis/GroupsApi.ts @@ -0,0 +1,649 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type CreateGroups200Response, + CreateGroups200ResponseFromJSON, + CreateGroups200ResponseToJSON, +} from '../models/CreateGroups200Response'; +import { + type DeleteGroupsGroupId200Response, + DeleteGroupsGroupId200ResponseFromJSON, + DeleteGroupsGroupId200ResponseToJSON, +} from '../models/DeleteGroupsGroupId200Response'; + +export interface CreateGroupsRequest { + token: string; +} + +export interface CreateGroupsGroupIdRequest { + groupId: string; + token: string; +} + +export interface CreateGroupsGroupIdInvitelinkRequest { + groupId: string; + token: string; +} + +export interface DeleteGroupsGroupIdRequest { + groupId: string; + token: string; +} + +export interface GetGroupsGroupIdRequest { + groupId: string; + token: string; +} + +export interface GetGroupsGroupIdInvitelinkRequest { + groupId: string; + token: string; +} + +export interface ListGroupsRequest { + token: string; +} + +/** + * GroupsApi - interface + * + * @export + * @interface GroupsApiInterface + */ +export interface GroupsApiInterface { + /** + * Creates request options for createGroups without sending the request + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + createGroupsRequestOpts(requestParameters: CreateGroupsRequest): Promise; + + /** + * + * @summary Create Group + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + createGroupsRaw(requestParameters: CreateGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create Group + */ + createGroups(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for createGroupsGroupId without sending the request + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + createGroupsGroupIdRequestOpts(requestParameters: CreateGroupsGroupIdRequest): Promise; + + /** + * + * @summary Update Group Info + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + createGroupsGroupIdRaw(requestParameters: CreateGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update Group Info + */ + createGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for createGroupsGroupIdInvitelink without sending the request + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + createGroupsGroupIdInvitelinkRequestOpts(requestParameters: CreateGroupsGroupIdInvitelinkRequest): Promise; + + /** + * + * @summary Reset Invite Link + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + createGroupsGroupIdInvitelinkRaw(requestParameters: CreateGroupsGroupIdInvitelinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Reset Invite Link + */ + createGroupsGroupIdInvitelink(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for deleteGroupsGroupId without sending the request + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + deleteGroupsGroupIdRequestOpts(requestParameters: DeleteGroupsGroupIdRequest): Promise; + + /** + * + * @summary Delete Group + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + deleteGroupsGroupIdRaw(requestParameters: DeleteGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete Group + */ + deleteGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for getGroupsGroupId without sending the request + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + getGroupsGroupIdRequestOpts(requestParameters: GetGroupsGroupIdRequest): Promise; + + /** + * + * @summary Get Group Info + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + getGroupsGroupIdRaw(requestParameters: GetGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get Group Info + */ + getGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for getGroupsGroupIdInvitelink without sending the request + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + getGroupsGroupIdInvitelinkRequestOpts(requestParameters: GetGroupsGroupIdInvitelinkRequest): Promise; + + /** + * + * @summary Get Invite Link + * @param {string} groupId + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + getGroupsGroupIdInvitelinkRaw(requestParameters: GetGroupsGroupIdInvitelinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get Invite Link + */ + getGroupsGroupIdInvitelink(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + + /** + * Creates request options for listGroups without sending the request + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + listGroupsRequestOpts(requestParameters: ListGroupsRequest): Promise; + + /** + * + * @summary Get Groups List + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApiInterface + */ + listGroupsRaw(requestParameters: ListGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get Groups List + */ + listGroups(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + +} + +/** + * + */ +export class GroupsApi extends runtime.BaseAPI implements GroupsApiInterface { + + /** + * Creates request options for createGroups without sending the request + */ + async createGroupsRequestOpts(requestParameters: CreateGroupsRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createGroups().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Create Group + */ + async createGroupsRaw(requestParameters: CreateGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createGroupsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateGroups200ResponseFromJSON(jsonValue)); + } + + /** + * Create Group + */ + async createGroups(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createGroupsRaw({ token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createGroupsGroupId without sending the request + */ + async createGroupsGroupIdRequestOpts(requestParameters: CreateGroupsGroupIdRequest): Promise { + if (requestParameters['groupId'] == null) { + throw new runtime.RequiredError( + 'groupId', + 'Required parameter "groupId" was null or undefined when calling createGroupsGroupId().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createGroupsGroupId().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups/{groupId}`; + urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Update Group Info + */ + async createGroupsGroupIdRaw(requestParameters: CreateGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createGroupsGroupIdRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Update Group Info + */ + async createGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.createGroupsGroupIdRaw({ groupId: groupId, token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createGroupsGroupIdInvitelink without sending the request + */ + async createGroupsGroupIdInvitelinkRequestOpts(requestParameters: CreateGroupsGroupIdInvitelinkRequest): Promise { + if (requestParameters['groupId'] == null) { + throw new runtime.RequiredError( + 'groupId', + 'Required parameter "groupId" was null or undefined when calling createGroupsGroupIdInvitelink().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createGroupsGroupIdInvitelink().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups/{groupId}/inviteLink`; + urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reset Invite Link + */ + async createGroupsGroupIdInvitelinkRaw(requestParameters: CreateGroupsGroupIdInvitelinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createGroupsGroupIdInvitelinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Reset Invite Link + */ + async createGroupsGroupIdInvitelink(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.createGroupsGroupIdInvitelinkRaw({ groupId: groupId, token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for deleteGroupsGroupId without sending the request + */ + async deleteGroupsGroupIdRequestOpts(requestParameters: DeleteGroupsGroupIdRequest): Promise { + if (requestParameters['groupId'] == null) { + throw new runtime.RequiredError( + 'groupId', + 'Required parameter "groupId" was null or undefined when calling deleteGroupsGroupId().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling deleteGroupsGroupId().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups/{groupId}`; + urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Delete Group + */ + async deleteGroupsGroupIdRaw(requestParameters: DeleteGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteGroupsGroupIdRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeleteGroupsGroupId200ResponseFromJSON(jsonValue)); + } + + /** + * Delete Group + */ + async deleteGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteGroupsGroupIdRaw({ groupId: groupId, token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getGroupsGroupId without sending the request + */ + async getGroupsGroupIdRequestOpts(requestParameters: GetGroupsGroupIdRequest): Promise { + if (requestParameters['groupId'] == null) { + throw new runtime.RequiredError( + 'groupId', + 'Required parameter "groupId" was null or undefined when calling getGroupsGroupId().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling getGroupsGroupId().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups/{groupId}`; + urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get Group Info + */ + async getGroupsGroupIdRaw(requestParameters: GetGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupsGroupIdRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get Group Info + */ + async getGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.getGroupsGroupIdRaw({ groupId: groupId, token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getGroupsGroupIdInvitelink without sending the request + */ + async getGroupsGroupIdInvitelinkRequestOpts(requestParameters: GetGroupsGroupIdInvitelinkRequest): Promise { + if (requestParameters['groupId'] == null) { + throw new runtime.RequiredError( + 'groupId', + 'Required parameter "groupId" was null or undefined when calling getGroupsGroupIdInvitelink().' + ); + } + + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling getGroupsGroupIdInvitelink().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups/{groupId}/inviteLink`; + urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get Invite Link + */ + async getGroupsGroupIdInvitelinkRaw(requestParameters: GetGroupsGroupIdInvitelinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupsGroupIdInvitelinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get Invite Link + */ + async getGroupsGroupIdInvitelink(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.getGroupsGroupIdInvitelinkRaw({ groupId: groupId, token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for listGroups without sending the request + */ + async listGroupsRequestOpts(requestParameters: ListGroupsRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling listGroups().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/groups`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get Groups List + */ + async listGroupsRaw(requestParameters: ListGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.listGroupsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get Groups List + */ + async listGroups(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.listGroupsRaw({ token: token }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/generated/src/apis/MessagingApi.ts b/typescript/src/generated/src/apis/MessagingApi.ts new file mode 100644 index 0000000..f7cc266 --- /dev/null +++ b/typescript/src/generated/src/apis/MessagingApi.ts @@ -0,0 +1,1698 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { objectToJSON } from '../runtime'; +import { + type CreateReadMessage200Response, + CreateReadMessage200ResponseFromJSON, + CreateReadMessage200ResponseToJSON, +} from '../models/CreateReadMessage200Response'; +import { + type CreateReadMessage401Response, + CreateReadMessage401ResponseFromJSON, + CreateReadMessage401ResponseToJSON, +} from '../models/CreateReadMessage401Response'; +import { + type ErrorResponse, + ErrorResponseFromJSON, + ErrorResponseToJSON, +} from '../models/ErrorResponse'; +import { + type ListMessages200Response, + ListMessages200ResponseFromJSON, + ListMessages200ResponseToJSON, +} from '../models/ListMessages200Response'; +import { + type MessageSentResponse, + MessageSentResponseFromJSON, + MessageSentResponseToJSON, +} from '../models/MessageSentResponse'; +import { + type SendButtonRequest, + SendButtonRequestFromJSON, + SendButtonRequestToJSON, +} from '../models/SendButtonRequest'; +import { + type SendContactRequest, + SendContactRequestFromJSON, + SendContactRequestToJSON, +} from '../models/SendContactRequest'; +import { + type SendFlowRequestHeader, + SendFlowRequestHeaderFromJSON, + SendFlowRequestHeaderToJSON, +} from '../models/SendFlowRequestHeader'; +import { + type SendListRequest, + SendListRequestFromJSON, + SendListRequestToJSON, +} from '../models/SendListRequest'; +import { + type SendLocationRequestRequest, + SendLocationRequestRequestFromJSON, + SendLocationRequestRequestToJSON, +} from '../models/SendLocationRequestRequest'; +import { + type SendReactionRequest, + SendReactionRequestFromJSON, + SendReactionRequestToJSON, +} from '../models/SendReactionRequest'; + +export interface CreateReadMessageRequest { + token: string; + messageId?: string; +} + +export interface CreateUploadMediaRequest { + token: string; + requestBody?: { [key: string]: any; }; +} + +export interface ListMessagesRequest { + token: string; +} + +export interface SendButtonOperationRequest { + token: string; + sendButtonRequest?: SendButtonRequest; +} + +export interface SendCarouselRequest { + token: string; + params: Array; + body?: string; + quotedMsgId?: string; + chatId?: string; + phone?: number; +} + +export interface SendContactOperationRequest { + token: string; + sendContactRequest?: SendContactRequest; +} + +export interface SendFileRequest { + token: string; + body: string; + filename: string; + caption?: string; + quotedMsgId?: string; + chatId?: string; + phone?: number; +} + +export interface SendFlowRequest { + token: string; + body: string; + flowId: string; + flowToken: string; + flowCta: string; + header?: SendFlowRequestHeader; + footer?: string; + flowAction?: SendFlowFlowActionEnum; + flowActionPayload?: object; + flowMessageVersion?: string; + mode?: SendFlowModeEnum; + flowActionData?: object; + flowActionScreen?: string; + quotedMsgId?: string; + chatId?: string; + phone?: number; +} + +export interface SendListOperationRequest { + token: string; + sendListRequest?: SendListRequest; +} + +export interface SendLocationRequest { + token: string; + lat: string; + lng: string; + address?: string; + name?: string; + quotedMsgId?: string; + chatId?: string; + phone?: number; +} + +export interface SendLocationRequestOperationRequest { + token: string; + sendLocationRequestRequest?: SendLocationRequestRequest; +} + +export interface SendMessageRequest { + token: string; + body: string; + quotedMsgId?: string; + chatId?: string; + phone?: number; +} + +export interface SendProductRequest { + token: string; + requestBody?: { [key: string]: any; }; +} + +export interface SendReactionOperationRequest { + token: string; + sendReactionRequest?: SendReactionRequest; +} + +/** + * MessagingApi - interface + * + * @export + * @interface MessagingApiInterface + */ +export interface MessagingApiInterface { + /** + * Creates request options for createReadMessage without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} [messageId] Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + createReadMessageRequestOpts(requestParameters: CreateReadMessageRequest): Promise; + + /** + * + * @summary Mark message as read + * @param {string} token JWT token or API key for authorization + * @param {string} [messageId] Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + createReadMessageRaw(requestParameters: CreateReadMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Mark message as read + */ + createReadMessage(token: string, messageId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for createUploadMedia without sending the request + * @param {string} token JWT token or API key for authorization + * @param {{ [key: string]: any; }} [requestBody] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + createUploadMediaRequestOpts(requestParameters: CreateUploadMediaRequest): Promise; + + /** + * + * @summary Upload media + * @param {string} token JWT token or API key for authorization + * @param {{ [key: string]: any; }} [requestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + createUploadMediaRaw(requestParameters: CreateUploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Upload media + */ + createUploadMedia(token: string, requestBody?: { [key: string]: any; }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for listMessages without sending the request + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + listMessagesRequestOpts(requestParameters: ListMessagesRequest): Promise; + + /** + * + * @summary Get messages list + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + listMessagesRaw(requestParameters: ListMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get messages list + */ + listMessages(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendButton without sending the request + * @param {string} token JWT token or API key for authorization + * @param {SendButtonRequest} [sendButtonRequest] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendButtonRequestOpts(requestParameters: SendButtonOperationRequest): Promise; + + /** + * + * @summary Send Reply Buttons Message + * @param {string} token JWT token or API key for authorization + * @param {SendButtonRequest} [sendButtonRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendButtonRaw(requestParameters: SendButtonOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send Reply Buttons Message + */ + sendButton(token: string, sendButtonRequest?: SendButtonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendCarousel without sending the request + * @param {string} token JWT token or API key for authorization + * @param {Array} params Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards. Structure: - params[] item with type CAROUSEL and cards (2..10) - cards[] item: - components[] items: - header: parameters[0] with type image/video/product - image: {\\\"image\\\": {\\\"link\\\": \\\"https://...\\\"}} - video: {\\\"video\\\": {\\\"link\\\": \\\"https://...\\\"}} - product: {\\\"product\\\": {\\\"catalog_id\\\": \\\"...\\\", \\\"product_retailer_id\\\": \\\"...\\\"}} - button: sub_type url or quick_reply - url: parameters {\\\"text\\\": \\\"Button\\\", \\\"url\\\": \\\"https://...\\\"} - quick_reply: parameters[] of {\\\"id\\\": \\\"...\\\", \\\"text\\\": \\\"...\\\"} + * @param {string} [body] Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params. + * @param {string} [quotedMsgId] Quoted message ID (Cloud API) + * @param {string} [chatId] Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) + * @param {number} [phone] Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendCarouselRequestOpts(requestParameters: SendCarouselRequest): Promise; + + /** + * You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. + * @summary Send Carousel + * @param {string} token JWT token or API key for authorization + * @param {Array} params Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards. Structure: - params[] item with type CAROUSEL and cards (2..10) - cards[] item: - components[] items: - header: parameters[0] with type image/video/product - image: {\\\"image\\\": {\\\"link\\\": \\\"https://...\\\"}} - video: {\\\"video\\\": {\\\"link\\\": \\\"https://...\\\"}} - product: {\\\"product\\\": {\\\"catalog_id\\\": \\\"...\\\", \\\"product_retailer_id\\\": \\\"...\\\"}} - button: sub_type url or quick_reply - url: parameters {\\\"text\\\": \\\"Button\\\", \\\"url\\\": \\\"https://...\\\"} - quick_reply: parameters[] of {\\\"id\\\": \\\"...\\\", \\\"text\\\": \\\"...\\\"} + * @param {string} [body] Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params. + * @param {string} [quotedMsgId] Quoted message ID (Cloud API) + * @param {string} [chatId] Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) + * @param {number} [phone] Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendCarouselRaw(requestParameters: SendCarouselRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. + * Send Carousel + */ + sendCarousel(token: string, params: Array, body?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendContact without sending the request + * @param {string} token JWT token or API key for authorization + * @param {SendContactRequest} [sendContactRequest] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendContactRequestOpts(requestParameters: SendContactOperationRequest): Promise; + + /** + * + * @summary Send a Contact + * @param {string} token JWT token or API key for authorization + * @param {SendContactRequest} [sendContactRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendContactRaw(requestParameters: SendContactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send a Contact + */ + sendContact(token: string, sendContactRequest?: SendContactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendFile without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} body File source: - HTTP/HTTPS URL (https://example.com/file.pdf) - Base64-encoded file with MIME (data:image/jpeg;base64,/9j/4AAQ...) - Form-data field + * @param {string} filename File name with extension (required for mime type detection) + * @param {string} [caption] Text caption under the file + * @param {string} [quotedMsgId] Message ID to quote/reply to + * @param {string} [chatId] Chat ID in format: phone@c.us or phone@g.us + * @param {number} [phone] Phone number starting with country code + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendFileRequestOpts(requestParameters: SendFileRequest): Promise; + + /** + * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * @summary Send a File + * @param {string} token JWT token or API key for authorization + * @param {string} body File source: - HTTP/HTTPS URL (https://example.com/file.pdf) - Base64-encoded file with MIME (data:image/jpeg;base64,/9j/4AAQ...) - Form-data field + * @param {string} filename File name with extension (required for mime type detection) + * @param {string} [caption] Text caption under the file + * @param {string} [quotedMsgId] Message ID to quote/reply to + * @param {string} [chatId] Chat ID in format: phone@c.us or phone@g.us + * @param {number} [phone] Phone number starting with country code + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendFileRaw(requestParameters: SendFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a File + */ + sendFile(token: string, body: string, filename: string, caption?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendFlow without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} body Flow message body text + * @param {string} flowId Published Flow ID + * @param {string} flowToken Flow token generated by the business + * @param {string} flowCta CTA button text + * @param {SendFlowRequestHeader} [header] + * @param {string} [footer] Footer text + * @param {string} [flowAction] Flow action type + * @param {object} [flowActionPayload] Required for flowAction=navigate (screen is required). Ignored for data_exchange. If data is provided, it must be a non-empty object. + * @param {string} [flowMessageVersion] Flow message version (default \\\"3\\\") + * @param {string} [mode] Flow mode (draft or published). If omitted, provider default applies + * @param {object} [flowActionData] Shortcut for flowActionPayload.data (optional) + * @param {string} [flowActionScreen] Shortcut for flowActionPayload.screen (optional) + * @param {string} [quotedMsgId] Quoted message ID (Cloud API) + * @param {string} [chatId] Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) + * @param {number} [phone] Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendFlowRequestOpts(requestParameters: SendFlowRequest): Promise; + + /** + * Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate. + * @summary Send WhatsApp Flow Message + * @param {string} token JWT token or API key for authorization + * @param {string} body Flow message body text + * @param {string} flowId Published Flow ID + * @param {string} flowToken Flow token generated by the business + * @param {string} flowCta CTA button text + * @param {SendFlowRequestHeader} [header] + * @param {string} [footer] Footer text + * @param {string} [flowAction] Flow action type + * @param {object} [flowActionPayload] Required for flowAction=navigate (screen is required). Ignored for data_exchange. If data is provided, it must be a non-empty object. + * @param {string} [flowMessageVersion] Flow message version (default \\\"3\\\") + * @param {string} [mode] Flow mode (draft or published). If omitted, provider default applies + * @param {object} [flowActionData] Shortcut for flowActionPayload.data (optional) + * @param {string} [flowActionScreen] Shortcut for flowActionPayload.screen (optional) + * @param {string} [quotedMsgId] Quoted message ID (Cloud API) + * @param {string} [chatId] Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) + * @param {number} [phone] Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendFlowRaw(requestParameters: SendFlowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate. + * Send WhatsApp Flow Message + */ + sendFlow(token: string, body: string, flowId: string, flowToken: string, flowCta: string, header?: SendFlowRequestHeader, footer?: string, flowAction?: SendFlowFlowActionEnum, flowActionPayload?: object, flowMessageVersion?: string, mode?: SendFlowModeEnum, flowActionData?: object, flowActionScreen?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendList without sending the request + * @param {string} token JWT token or API key for authorization + * @param {SendListRequest} [sendListRequest] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendListRequestOpts(requestParameters: SendListOperationRequest): Promise; + + /** + * + * @summary Send List Message + * @param {string} token JWT token or API key for authorization + * @param {SendListRequest} [sendListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendListRaw(requestParameters: SendListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send List Message + */ + sendList(token: string, sendListRequest?: SendListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendLocation without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} lat Latitude of the location. Example: 45.018337 + * @param {string} lng Longitude of the location. Example: -73.968285 + * @param {string} [address] Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 + * @param {string} [name] Name of the location. Example: Facebook HQ + * @param {string} [quotedMsgId] Quoted message ID (Cloud API) + * @param {string} [chatId] Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) + * @param {number} [phone] Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendLocationRequestOpts(requestParameters: SendLocationRequest): Promise; + + /** + * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * @summary Send a Location + * @param {string} token JWT token or API key for authorization + * @param {string} lat Latitude of the location. Example: 45.018337 + * @param {string} lng Longitude of the location. Example: -73.968285 + * @param {string} [address] Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024 + * @param {string} [name] Name of the location. Example: Facebook HQ + * @param {string} [quotedMsgId] Quoted message ID (Cloud API) + * @param {string} [chatId] Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group) + * @param {number} [phone] Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendLocationRaw(requestParameters: SendLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a Location + */ + sendLocation(token: string, lat: string, lng: string, address?: string, name?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendLocationRequest without sending the request + * @param {string} token JWT token or API key for authorization + * @param {SendLocationRequestRequest} [sendLocationRequestRequest] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendLocationRequestRequestOpts(requestParameters: SendLocationRequestOperationRequest): Promise; + + /** + * + * @summary Send Location Request Message + * @param {string} token JWT token or API key for authorization + * @param {SendLocationRequestRequest} [sendLocationRequestRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendLocationRequestRaw(requestParameters: SendLocationRequestOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send Location Request Message + */ + sendLocationRequest(token: string, sendLocationRequestRequest?: SendLocationRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendMessage without sending the request + * @param {string} token JWT token or API key for authorization + * @param {string} body Message text, UTF-8 or UTF-16 string with emoji + * @param {string} [quotedMsgId] Message ID to quote/reply to (Cloud API wamid) + * @param {string} [chatId] Chat ID in format: phone@c.us (individual) or phone@g.us (group) + * @param {number} [phone] Phone number starting with country code (alternative to chatId) + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendMessageRequestOpts(requestParameters: SendMessageRequest): Promise; + + /** + * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. + * @summary Send a Message + * @param {string} token JWT token or API key for authorization + * @param {string} body Message text, UTF-8 or UTF-16 string with emoji + * @param {string} [quotedMsgId] Message ID to quote/reply to (Cloud API wamid) + * @param {string} [chatId] Chat ID in format: phone@c.us (individual) or phone@g.us (group) + * @param {number} [phone] Phone number starting with country code (alternative to chatId) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendMessageRaw(requestParameters: SendMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a Message + */ + sendMessage(token: string, body: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendProduct without sending the request + * @param {string} token JWT token or API key for authorization + * @param {{ [key: string]: any; }} [requestBody] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendProductRequestOpts(requestParameters: SendProductRequest): Promise; + + /** + * + * @summary Send a Product + * @param {string} token JWT token or API key for authorization + * @param {{ [key: string]: any; }} [requestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendProductRaw(requestParameters: SendProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send a Product + */ + sendProduct(token: string, requestBody?: { [key: string]: any; }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendReaction without sending the request + * @param {string} token JWT token or API key for authorization + * @param {SendReactionRequest} [sendReactionRequest] + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendReactionRequestOpts(requestParameters: SendReactionOperationRequest): Promise; + + /** + * + * @summary Send Reaction + * @param {string} token JWT token or API key for authorization + * @param {SendReactionRequest} [sendReactionRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApiInterface + */ + sendReactionRaw(requestParameters: SendReactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send Reaction + */ + sendReaction(token: string, sendReactionRequest?: SendReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class MessagingApi extends runtime.BaseAPI implements MessagingApiInterface { + + /** + * Creates request options for createReadMessage without sending the request + */ + async createReadMessageRequestOpts(requestParameters: CreateReadMessageRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createReadMessage().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + { contentType: 'application/json' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['messageId'] != null) { + formParams.append('messageId', requestParameters['messageId'] as any); + } + + + let urlPath = `/readMessage`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Mark message as read + */ + async createReadMessageRaw(requestParameters: CreateReadMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createReadMessageRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateReadMessage200ResponseFromJSON(jsonValue)); + } + + /** + * Mark message as read + */ + async createReadMessage(token: string, messageId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createReadMessageRaw({ token: token, messageId: messageId }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createUploadMedia without sending the request + */ + async createUploadMediaRequestOpts(requestParameters: CreateUploadMediaRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling createUploadMedia().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/uploadMedia`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['requestBody'], + }; + } + + /** + * Upload media + */ + async createUploadMediaRaw(requestParameters: CreateUploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createUploadMediaRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Upload media + */ + async createUploadMedia(token: string, requestBody?: { [key: string]: any; }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.createUploadMediaRaw({ token: token, requestBody: requestBody }, initOverrides); + } + + /** + * Creates request options for listMessages without sending the request + */ + async listMessagesRequestOpts(requestParameters: ListMessagesRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling listMessages().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/messages`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get messages list + */ + async listMessagesRaw(requestParameters: ListMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.listMessagesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListMessages200ResponseFromJSON(jsonValue)); + } + + /** + * Get messages list + */ + async listMessages(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listMessagesRaw({ token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendButton without sending the request + */ + async sendButtonRequestOpts(requestParameters: SendButtonOperationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendButton().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendButton`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SendButtonRequestToJSON(requestParameters['sendButtonRequest']), + }; + } + + /** + * Send Reply Buttons Message + */ + async sendButtonRaw(requestParameters: SendButtonOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendButtonRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send Reply Buttons Message + */ + async sendButton(token: string, sendButtonRequest?: SendButtonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendButtonRaw({ token: token, sendButtonRequest: sendButtonRequest }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendCarousel without sending the request + */ + async sendCarouselRequestOpts(requestParameters: SendCarouselRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendCarousel().' + ); + } + + if (requestParameters['params'] == null) { + throw new runtime.RequiredError( + 'params', + 'Required parameter "params" was null or undefined when calling sendCarousel().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + { contentType: 'application/json' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['body'] != null) { + formParams.append('body', requestParameters['body'] as any); + } + + if (requestParameters['params'] != null) { + formParams.append('params', requestParameters['params']!.join(runtime.COLLECTION_FORMATS["csv"])); + } + + if (requestParameters['quotedMsgId'] != null) { + formParams.append('quotedMsgId', requestParameters['quotedMsgId'] as any); + } + + if (requestParameters['chatId'] != null) { + formParams.append('chatId', requestParameters['chatId'] as any); + } + + if (requestParameters['phone'] != null) { + formParams.append('phone', requestParameters['phone'] as any); + } + + + let urlPath = `/sendCarousel`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. + * Send Carousel + */ + async sendCarouselRaw(requestParameters: SendCarouselRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendCarouselRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. + * Send Carousel + */ + async sendCarousel(token: string, params: Array, body?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendCarouselRaw({ token: token, params: params, body: body, quotedMsgId: quotedMsgId, chatId: chatId, phone: phone }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendContact without sending the request + */ + async sendContactRequestOpts(requestParameters: SendContactOperationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendContact().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendContact`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SendContactRequestToJSON(requestParameters['sendContactRequest']), + }; + } + + /** + * Send a Contact + */ + async sendContactRaw(requestParameters: SendContactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendContactRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send a Contact + */ + async sendContact(token: string, sendContactRequest?: SendContactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendContactRaw({ token: token, sendContactRequest: sendContactRequest }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendFile without sending the request + */ + async sendFileRequestOpts(requestParameters: SendFileRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendFile().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling sendFile().' + ); + } + + if (requestParameters['filename'] == null) { + throw new runtime.RequiredError( + 'filename', + 'Required parameter "filename" was null or undefined when calling sendFile().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + { contentType: 'application/json' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['body'] != null) { + formParams.append('body', requestParameters['body'] as any); + } + + if (requestParameters['filename'] != null) { + formParams.append('filename', requestParameters['filename'] as any); + } + + if (requestParameters['caption'] != null) { + formParams.append('caption', requestParameters['caption'] as any); + } + + if (requestParameters['quotedMsgId'] != null) { + formParams.append('quotedMsgId', requestParameters['quotedMsgId'] as any); + } + + if (requestParameters['chatId'] != null) { + formParams.append('chatId', requestParameters['chatId'] as any); + } + + if (requestParameters['phone'] != null) { + formParams.append('phone', requestParameters['phone'] as any); + } + + + let urlPath = `/sendFile`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a File + */ + async sendFileRaw(requestParameters: SendFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendFileRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a File + */ + async sendFile(token: string, body: string, filename: string, caption?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendFileRaw({ token: token, body: body, filename: filename, caption: caption, quotedMsgId: quotedMsgId, chatId: chatId, phone: phone }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendFlow without sending the request + */ + async sendFlowRequestOpts(requestParameters: SendFlowRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendFlow().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling sendFlow().' + ); + } + + if (requestParameters['flowId'] == null) { + throw new runtime.RequiredError( + 'flowId', + 'Required parameter "flowId" was null or undefined when calling sendFlow().' + ); + } + + if (requestParameters['flowToken'] == null) { + throw new runtime.RequiredError( + 'flowToken', + 'Required parameter "flowToken" was null or undefined when calling sendFlow().' + ); + } + + if (requestParameters['flowCta'] == null) { + throw new runtime.RequiredError( + 'flowCta', + 'Required parameter "flowCta" was null or undefined when calling sendFlow().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + { contentType: 'application/json' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['body'] != null) { + formParams.append('body', requestParameters['body'] as any); + } + + if (requestParameters['header'] != null) { + formParams.append('header', new Blob([JSON.stringify(SendFlowRequestHeaderToJSON(requestParameters['header']))], { type: "application/json", })); + } + + if (requestParameters['footer'] != null) { + formParams.append('footer', requestParameters['footer'] as any); + } + + if (requestParameters['flowId'] != null) { + formParams.append('flowId', requestParameters['flowId'] as any); + } + + if (requestParameters['flowToken'] != null) { + formParams.append('flowToken', requestParameters['flowToken'] as any); + } + + if (requestParameters['flowCta'] != null) { + formParams.append('flowCta', requestParameters['flowCta'] as any); + } + + if (requestParameters['flowAction'] != null) { + formParams.append('flowAction', requestParameters['flowAction'] as any); + } + + if (requestParameters['flowActionPayload'] != null) { + formParams.append('flowActionPayload', new Blob([JSON.stringify(objectToJSON(requestParameters['flowActionPayload']))], { type: "application/json", })); + } + + if (requestParameters['flowMessageVersion'] != null) { + formParams.append('flowMessageVersion', requestParameters['flowMessageVersion'] as any); + } + + if (requestParameters['mode'] != null) { + formParams.append('mode', requestParameters['mode'] as any); + } + + if (requestParameters['flowActionData'] != null) { + formParams.append('flowActionData', new Blob([JSON.stringify(objectToJSON(requestParameters['flowActionData']))], { type: "application/json", })); + } + + if (requestParameters['flowActionScreen'] != null) { + formParams.append('flowActionScreen', requestParameters['flowActionScreen'] as any); + } + + if (requestParameters['quotedMsgId'] != null) { + formParams.append('quotedMsgId', requestParameters['quotedMsgId'] as any); + } + + if (requestParameters['chatId'] != null) { + formParams.append('chatId', requestParameters['chatId'] as any); + } + + if (requestParameters['phone'] != null) { + formParams.append('phone', requestParameters['phone'] as any); + } + + + let urlPath = `/sendFlow`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate. + * Send WhatsApp Flow Message + */ + async sendFlowRaw(requestParameters: SendFlowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendFlowRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate. + * Send WhatsApp Flow Message + */ + async sendFlow(token: string, body: string, flowId: string, flowToken: string, flowCta: string, header?: SendFlowRequestHeader, footer?: string, flowAction?: SendFlowFlowActionEnum, flowActionPayload?: object, flowMessageVersion?: string, mode?: SendFlowModeEnum, flowActionData?: object, flowActionScreen?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendFlowRaw({ token: token, body: body, flowId: flowId, flowToken: flowToken, flowCta: flowCta, header: header, footer: footer, flowAction: flowAction, flowActionPayload: flowActionPayload, flowMessageVersion: flowMessageVersion, mode: mode, flowActionData: flowActionData, flowActionScreen: flowActionScreen, quotedMsgId: quotedMsgId, chatId: chatId, phone: phone }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendList without sending the request + */ + async sendListRequestOpts(requestParameters: SendListOperationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendList`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SendListRequestToJSON(requestParameters['sendListRequest']), + }; + } + + /** + * Send List Message + */ + async sendListRaw(requestParameters: SendListOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send List Message + */ + async sendList(token: string, sendListRequest?: SendListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendListRaw({ token: token, sendListRequest: sendListRequest }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendLocation without sending the request + */ + async sendLocationRequestOpts(requestParameters: SendLocationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendLocation().' + ); + } + + if (requestParameters['lat'] == null) { + throw new runtime.RequiredError( + 'lat', + 'Required parameter "lat" was null or undefined when calling sendLocation().' + ); + } + + if (requestParameters['lng'] == null) { + throw new runtime.RequiredError( + 'lng', + 'Required parameter "lng" was null or undefined when calling sendLocation().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + { contentType: 'application/json' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['lat'] != null) { + formParams.append('lat', requestParameters['lat'] as any); + } + + if (requestParameters['lng'] != null) { + formParams.append('lng', requestParameters['lng'] as any); + } + + if (requestParameters['address'] != null) { + formParams.append('address', requestParameters['address'] as any); + } + + if (requestParameters['name'] != null) { + formParams.append('name', requestParameters['name'] as any); + } + + if (requestParameters['quotedMsgId'] != null) { + formParams.append('quotedMsgId', requestParameters['quotedMsgId'] as any); + } + + if (requestParameters['chatId'] != null) { + formParams.append('chatId', requestParameters['chatId'] as any); + } + + if (requestParameters['phone'] != null) { + formParams.append('phone', requestParameters['phone'] as any); + } + + + let urlPath = `/sendLocation`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a Location + */ + async sendLocationRaw(requestParameters: SendLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendLocationRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a Location + */ + async sendLocation(token: string, lat: string, lng: string, address?: string, name?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendLocationRaw({ token: token, lat: lat, lng: lng, address: address, name: name, quotedMsgId: quotedMsgId, chatId: chatId, phone: phone }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendLocationRequest without sending the request + */ + async sendLocationRequestRequestOpts(requestParameters: SendLocationRequestOperationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendLocationRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendLocationRequest`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SendLocationRequestRequestToJSON(requestParameters['sendLocationRequestRequest']), + }; + } + + /** + * Send Location Request Message + */ + async sendLocationRequestRaw(requestParameters: SendLocationRequestOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendLocationRequestRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send Location Request Message + */ + async sendLocationRequest(token: string, sendLocationRequestRequest?: SendLocationRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendLocationRequestRaw({ token: token, sendLocationRequestRequest: sendLocationRequestRequest }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendMessage without sending the request + */ + async sendMessageRequestOpts(requestParameters: SendMessageRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendMessage().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling sendMessage().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + { contentType: 'application/json' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['body'] != null) { + formParams.append('body', requestParameters['body'] as any); + } + + if (requestParameters['quotedMsgId'] != null) { + formParams.append('quotedMsgId', requestParameters['quotedMsgId'] as any); + } + + if (requestParameters['chatId'] != null) { + formParams.append('chatId', requestParameters['chatId'] as any); + } + + if (requestParameters['phone'] != null) { + formParams.append('phone', requestParameters['phone'] as any); + } + + + let urlPath = `/sendMessage`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a Message + */ + async sendMessageRaw(requestParameters: SendMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendMessageRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. + * Send a Message + */ + async sendMessage(token: string, body: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendMessageRaw({ token: token, body: body, quotedMsgId: quotedMsgId, chatId: chatId, phone: phone }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendProduct without sending the request + */ + async sendProductRequestOpts(requestParameters: SendProductRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendProduct().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendProduct`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['requestBody'], + }; + } + + /** + * Send a Product + */ + async sendProductRaw(requestParameters: SendProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendProductRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send a Product + */ + async sendProduct(token: string, requestBody?: { [key: string]: any; }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendProductRaw({ token: token, requestBody: requestBody }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendReaction without sending the request + */ + async sendReactionRequestOpts(requestParameters: SendReactionOperationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendReaction().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendReaction`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SendReactionRequestToJSON(requestParameters['sendReactionRequest']), + }; + } + + /** + * Send Reaction + */ + async sendReactionRaw(requestParameters: SendReactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendReactionRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MessageSentResponseFromJSON(jsonValue)); + } + + /** + * Send Reaction + */ + async sendReaction(token: string, sendReactionRequest?: SendReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sendReactionRaw({ token: token, sendReactionRequest: sendReactionRequest }, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const SendFlowFlowActionEnum = { + Navigate: 'navigate', + DataExchange: 'data_exchange' +} as const; +export type SendFlowFlowActionEnum = typeof SendFlowFlowActionEnum[keyof typeof SendFlowFlowActionEnum]; +/** + * @export + */ +export const SendFlowModeEnum = { + Draft: 'draft', + Published: 'published' +} as const; +export type SendFlowModeEnum = typeof SendFlowModeEnum[keyof typeof SendFlowModeEnum]; diff --git a/typescript/src/generated/src/apis/ProfileApi.ts b/typescript/src/generated/src/apis/ProfileApi.ts new file mode 100644 index 0000000..f4a4202 --- /dev/null +++ b/typescript/src/generated/src/apis/ProfileApi.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type ErrorResponse, + ErrorResponseFromJSON, + ErrorResponseToJSON, +} from '../models/ErrorResponse'; +import { + type ProfileInfo, + ProfileInfoFromJSON, + ProfileInfoToJSON, +} from '../models/ProfileInfo'; + +export interface GetMeRequest { + token: string; +} + +/** + * ProfileApi - interface + * + * @export + * @interface ProfileApiInterface + */ +export interface ProfileApiInterface { + /** + * Creates request options for getMe without sending the request + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof ProfileApiInterface + */ + getMeRequestOpts(requestParameters: GetMeRequest): Promise; + + /** + * Get WhatsApp Business Account profile information + * @summary Get Profile Info + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfileApiInterface + */ + getMeRaw(requestParameters: GetMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get WhatsApp Business Account profile information + * Get Profile Info + */ + getMe(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class ProfileApi extends runtime.BaseAPI implements ProfileApiInterface { + + /** + * Creates request options for getMe without sending the request + */ + async getMeRequestOpts(requestParameters: GetMeRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling getMe().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/me`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get WhatsApp Business Account profile information + * Get Profile Info + */ + async getMeRaw(requestParameters: GetMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProfileInfoFromJSON(jsonValue)); + } + + /** + * Get WhatsApp Business Account profile information + * Get Profile Info + */ + async getMe(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMeRaw({ token: token }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/generated/src/apis/TemplatesApi.ts b/typescript/src/generated/src/apis/TemplatesApi.ts new file mode 100644 index 0000000..ccda0c6 --- /dev/null +++ b/typescript/src/generated/src/apis/TemplatesApi.ts @@ -0,0 +1,205 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type ListTemplates200Response, + ListTemplates200ResponseFromJSON, + ListTemplates200ResponseToJSON, +} from '../models/ListTemplates200Response'; +import { + type SendTemplateRequest, + SendTemplateRequestFromJSON, + SendTemplateRequestToJSON, +} from '../models/SendTemplateRequest'; + +export interface ListTemplatesRequest { + token: string; +} + +export interface SendTemplateOperationRequest { + token: string; + sendTemplateRequest?: SendTemplateRequest; +} + +/** + * TemplatesApi - interface + * + * @export + * @interface TemplatesApiInterface + */ +export interface TemplatesApiInterface { + /** + * Creates request options for listTemplates without sending the request + * @param {string} token JWT token or API key for authorization + * @throws {RequiredError} + * @memberof TemplatesApiInterface + */ + listTemplatesRequestOpts(requestParameters: ListTemplatesRequest): Promise; + + /** + * + * @summary Get templates list + * @param {string} token JWT token or API key for authorization + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TemplatesApiInterface + */ + listTemplatesRaw(requestParameters: ListTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get templates list + */ + listTemplates(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Creates request options for sendTemplate without sending the request + * @param {string} token JWT token or API key for authorization + * @param {SendTemplateRequest} [sendTemplateRequest] + * @throws {RequiredError} + * @memberof TemplatesApiInterface + */ + sendTemplateRequestOpts(requestParameters: SendTemplateOperationRequest): Promise; + + /** + * + * @summary Send Template Message + * @param {string} token JWT token or API key for authorization + * @param {SendTemplateRequest} [sendTemplateRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TemplatesApiInterface + */ + sendTemplateRaw(requestParameters: SendTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Send Template Message + */ + sendTemplate(token: string, sendTemplateRequest?: SendTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>; + +} + +/** + * + */ +export class TemplatesApi extends runtime.BaseAPI implements TemplatesApiInterface { + + /** + * Creates request options for listTemplates without sending the request + */ + async listTemplatesRequestOpts(requestParameters: ListTemplatesRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling listTemplates().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/templates`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get templates list + */ + async listTemplatesRaw(requestParameters: ListTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.listTemplatesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListTemplates200ResponseFromJSON(jsonValue)); + } + + /** + * Get templates list + */ + async listTemplates(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listTemplatesRaw({ token: token }, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sendTemplate without sending the request + */ + async sendTemplateRequestOpts(requestParameters: SendTemplateOperationRequest): Promise { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling sendTemplate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['token'] != null) { + queryParameters['token'] = requestParameters['token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + queryParameters["token"] = await this.configuration.apiKey("token"); // tokenAuth authentication + } + + + let urlPath = `/sendTemplate`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SendTemplateRequestToJSON(requestParameters['sendTemplateRequest']), + }; + } + + /** + * Send Template Message + */ + async sendTemplateRaw(requestParameters: SendTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sendTemplateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Send Template Message + */ + async sendTemplate(token: string, sendTemplateRequest?: SendTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.sendTemplateRaw({ token: token, sendTemplateRequest: sendTemplateRequest }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/generated/src/apis/index.ts b/typescript/src/generated/src/apis/index.ts new file mode 100644 index 0000000..5a1230d --- /dev/null +++ b/typescript/src/generated/src/apis/index.ts @@ -0,0 +1,7 @@ +/* tslint:disable */ +/* eslint-disable */ +export { FlowsApi } from './FlowsApi'; +export { GroupsApi } from './GroupsApi'; +export { MessagingApi } from './MessagingApi'; +export { ProfileApi } from './ProfileApi'; +export { TemplatesApi } from './TemplatesApi'; diff --git a/typescript-fetch/index.ts b/typescript/src/generated/src/index.ts similarity index 100% rename from typescript-fetch/index.ts rename to typescript/src/generated/src/index.ts diff --git a/typescript/src/generated/src/models/CreateGroups200Response.ts b/typescript/src/generated/src/models/CreateGroups200Response.ts new file mode 100644 index 0000000..76c24be --- /dev/null +++ b/typescript/src/generated/src/models/CreateGroups200Response.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateGroups200Response + */ +export interface CreateGroups200Response { + [key: string]: any | any; + /** + * Error details returned by the provider. May be a string or a JSON object. + * @type {any} + * @memberof CreateGroups200Response + */ + error?: any | null; +} + +/** + * Check if a given object implements the CreateGroups200Response interface. + */ +export function instanceOfCreateGroups200Response(value: object): value is CreateGroups200Response { + return true; +} + +export function CreateGroups200ResponseFromJSON(json: any): CreateGroups200Response { + return CreateGroups200ResponseFromJSONTyped(json, false); +} + +export function CreateGroups200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateGroups200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function CreateGroups200ResponseToJSON(json: any): CreateGroups200Response { + return CreateGroups200ResponseToJSONTyped(json, false); +} + +export function CreateGroups200ResponseToJSONTyped(value?: CreateGroups200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/CreateReadMessage200Response.ts b/typescript/src/generated/src/models/CreateReadMessage200Response.ts new file mode 100644 index 0000000..f22d331 --- /dev/null +++ b/typescript/src/generated/src/models/CreateReadMessage200Response.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateReadMessage200Response + */ +export interface CreateReadMessage200Response { + [key: string]: any | any; + /** + * + * @type {string} + * @memberof CreateReadMessage200Response + */ + result?: string; +} + +/** + * Check if a given object implements the CreateReadMessage200Response interface. + */ +export function instanceOfCreateReadMessage200Response(value: object): value is CreateReadMessage200Response { + return true; +} + +export function CreateReadMessage200ResponseFromJSON(json: any): CreateReadMessage200Response { + return CreateReadMessage200ResponseFromJSONTyped(json, false); +} + +export function CreateReadMessage200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateReadMessage200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'result': json['result'] == null ? undefined : json['result'], + }; +} + +export function CreateReadMessage200ResponseToJSON(json: any): CreateReadMessage200Response { + return CreateReadMessage200ResponseToJSONTyped(json, false); +} + +export function CreateReadMessage200ResponseToJSONTyped(value?: CreateReadMessage200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'result': value['result'], + }; +} + diff --git a/typescript/src/generated/src/models/CreateReadMessage401Response.ts b/typescript/src/generated/src/models/CreateReadMessage401Response.ts new file mode 100644 index 0000000..c5d7538 --- /dev/null +++ b/typescript/src/generated/src/models/CreateReadMessage401Response.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateReadMessage401Response + */ +export interface CreateReadMessage401Response { + /** + * + * @type {string} + * @memberof CreateReadMessage401Response + */ + error?: string; +} + +/** + * Check if a given object implements the CreateReadMessage401Response interface. + */ +export function instanceOfCreateReadMessage401Response(value: object): value is CreateReadMessage401Response { + return true; +} + +export function CreateReadMessage401ResponseFromJSON(json: any): CreateReadMessage401Response { + return CreateReadMessage401ResponseFromJSONTyped(json, false); +} + +export function CreateReadMessage401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateReadMessage401Response { + if (json == null) { + return json; + } + return { + + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function CreateReadMessage401ResponseToJSON(json: any): CreateReadMessage401Response { + return CreateReadMessage401ResponseToJSONTyped(json, false); +} + +export function CreateReadMessage401ResponseToJSONTyped(value?: CreateReadMessage401Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/CreateReadMessageRequest.ts b/typescript/src/generated/src/models/CreateReadMessageRequest.ts new file mode 100644 index 0000000..721fc47 --- /dev/null +++ b/typescript/src/generated/src/models/CreateReadMessageRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateReadMessageRequest + */ +export interface CreateReadMessageRequest { + /** + * Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U + * @type {string} + * @memberof CreateReadMessageRequest + */ + messageId?: string; +} + +/** + * Check if a given object implements the CreateReadMessageRequest interface. + */ +export function instanceOfCreateReadMessageRequest(value: object): value is CreateReadMessageRequest { + return true; +} + +export function CreateReadMessageRequestFromJSON(json: any): CreateReadMessageRequest { + return CreateReadMessageRequestFromJSONTyped(json, false); +} + +export function CreateReadMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateReadMessageRequest { + if (json == null) { + return json; + } + return { + + 'messageId': json['messageId'] == null ? undefined : json['messageId'], + }; +} + +export function CreateReadMessageRequestToJSON(json: any): CreateReadMessageRequest { + return CreateReadMessageRequestToJSONTyped(json, false); +} + +export function CreateReadMessageRequestToJSONTyped(value?: CreateReadMessageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'messageId': value['messageId'], + }; +} + diff --git a/typescript/src/generated/src/models/DeleteFlowsFlowId200Response.ts b/typescript/src/generated/src/models/DeleteFlowsFlowId200Response.ts new file mode 100644 index 0000000..8c3b577 --- /dev/null +++ b/typescript/src/generated/src/models/DeleteFlowsFlowId200Response.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeleteFlowsFlowId200Response + */ +export interface DeleteFlowsFlowId200Response { + [key: string]: any | any; + /** + * + * @type {boolean} + * @memberof DeleteFlowsFlowId200Response + */ + success?: boolean; + /** + * Error details returned by the provider. May be a string or a JSON object. + * @type {any} + * @memberof DeleteFlowsFlowId200Response + */ + error?: any | null; +} + +/** + * Check if a given object implements the DeleteFlowsFlowId200Response interface. + */ +export function instanceOfDeleteFlowsFlowId200Response(value: object): value is DeleteFlowsFlowId200Response { + return true; +} + +export function DeleteFlowsFlowId200ResponseFromJSON(json: any): DeleteFlowsFlowId200Response { + return DeleteFlowsFlowId200ResponseFromJSONTyped(json, false); +} + +export function DeleteFlowsFlowId200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteFlowsFlowId200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'success': json['success'] == null ? undefined : json['success'], + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function DeleteFlowsFlowId200ResponseToJSON(json: any): DeleteFlowsFlowId200Response { + return DeleteFlowsFlowId200ResponseToJSONTyped(json, false); +} + +export function DeleteFlowsFlowId200ResponseToJSONTyped(value?: DeleteFlowsFlowId200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'success': value['success'], + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/DeleteGroupsGroupId200Response.ts b/typescript/src/generated/src/models/DeleteGroupsGroupId200Response.ts new file mode 100644 index 0000000..0071874 --- /dev/null +++ b/typescript/src/generated/src/models/DeleteGroupsGroupId200Response.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeleteGroupsGroupId200Response + */ +export interface DeleteGroupsGroupId200Response { + [key: string]: any | any; + /** + * + * @type {boolean} + * @memberof DeleteGroupsGroupId200Response + */ + success?: boolean; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeleteGroupsGroupId200Response + */ + response?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the DeleteGroupsGroupId200Response interface. + */ +export function instanceOfDeleteGroupsGroupId200Response(value: object): value is DeleteGroupsGroupId200Response { + return true; +} + +export function DeleteGroupsGroupId200ResponseFromJSON(json: any): DeleteGroupsGroupId200Response { + return DeleteGroupsGroupId200ResponseFromJSONTyped(json, false); +} + +export function DeleteGroupsGroupId200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteGroupsGroupId200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'success': json['success'] == null ? undefined : json['success'], + 'response': json['response'] == null ? undefined : json['response'], + }; +} + +export function DeleteGroupsGroupId200ResponseToJSON(json: any): DeleteGroupsGroupId200Response { + return DeleteGroupsGroupId200ResponseToJSONTyped(json, false); +} + +export function DeleteGroupsGroupId200ResponseToJSONTyped(value?: DeleteGroupsGroupId200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'success': value['success'], + 'response': value['response'], + }; +} + diff --git a/typescript/src/generated/src/models/ErrorResponse.ts b/typescript/src/generated/src/models/ErrorResponse.ts new file mode 100644 index 0000000..bf537b8 --- /dev/null +++ b/typescript/src/generated/src/models/ErrorResponse.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Standard error response + * @export + * @interface ErrorResponse + */ +export interface ErrorResponse { + /** + * Error message + * @type {string} + * @memberof ErrorResponse + */ + error?: string; +} + +/** + * Check if a given object implements the ErrorResponse interface. + */ +export function instanceOfErrorResponse(value: object): value is ErrorResponse { + return true; +} + +export function ErrorResponseFromJSON(json: any): ErrorResponse { + return ErrorResponseFromJSONTyped(json, false); +} + +export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse { + if (json == null) { + return json; + } + return { + + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function ErrorResponseToJSON(json: any): ErrorResponse { + return ErrorResponseToJSONTyped(json, false); +} + +export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/ListFlows200Response.ts b/typescript/src/generated/src/models/ListFlows200Response.ts new file mode 100644 index 0000000..72d4280 --- /dev/null +++ b/typescript/src/generated/src/models/ListFlows200Response.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ListFlows200Response + */ +export interface ListFlows200Response { + [key: string]: any | any; + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof ListFlows200Response + */ + items?: Array<{ [key: string]: any; }>; + /** + * + * @type {{ [key: string]: any; }} + * @memberof ListFlows200Response + */ + paging?: { [key: string]: any; }; + /** + * + * @type {number} + * @memberof ListFlows200Response + */ + count?: number; + /** + * + * @type {number} + * @memberof ListFlows200Response + */ + total?: number; + /** + * Error details returned by the provider. May be a string or a JSON object. + * @type {any} + * @memberof ListFlows200Response + */ + error?: any | null; +} + +/** + * Check if a given object implements the ListFlows200Response interface. + */ +export function instanceOfListFlows200Response(value: object): value is ListFlows200Response { + return true; +} + +export function ListFlows200ResponseFromJSON(json: any): ListFlows200Response { + return ListFlows200ResponseFromJSONTyped(json, false); +} + +export function ListFlows200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFlows200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'items': json['items'] == null ? undefined : json['items'], + 'paging': json['paging'] == null ? undefined : json['paging'], + 'count': json['count'] == null ? undefined : json['count'], + 'total': json['total'] == null ? undefined : json['total'], + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function ListFlows200ResponseToJSON(json: any): ListFlows200Response { + return ListFlows200ResponseToJSONTyped(json, false); +} + +export function ListFlows200ResponseToJSONTyped(value?: ListFlows200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'items': value['items'], + 'paging': value['paging'], + 'count': value['count'], + 'total': value['total'], + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/ListMessages200Response.ts b/typescript/src/generated/src/models/ListMessages200Response.ts new file mode 100644 index 0000000..afa5f7e --- /dev/null +++ b/typescript/src/generated/src/models/ListMessages200Response.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ListMessages200Response + */ +export interface ListMessages200Response { + [key: string]: any | any; + /** + * + * @type {string} + * @memberof ListMessages200Response + */ + notice?: string; + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof ListMessages200Response + */ + messages?: Array<{ [key: string]: any; }>; +} + +/** + * Check if a given object implements the ListMessages200Response interface. + */ +export function instanceOfListMessages200Response(value: object): value is ListMessages200Response { + return true; +} + +export function ListMessages200ResponseFromJSON(json: any): ListMessages200Response { + return ListMessages200ResponseFromJSONTyped(json, false); +} + +export function ListMessages200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMessages200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'notice': json['notice'] == null ? undefined : json['notice'], + 'messages': json['messages'] == null ? undefined : json['messages'], + }; +} + +export function ListMessages200ResponseToJSON(json: any): ListMessages200Response { + return ListMessages200ResponseToJSONTyped(json, false); +} + +export function ListMessages200ResponseToJSONTyped(value?: ListMessages200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'notice': value['notice'], + 'messages': value['messages'], + }; +} + diff --git a/typescript/src/generated/src/models/ListTemplates200Response.ts b/typescript/src/generated/src/models/ListTemplates200Response.ts new file mode 100644 index 0000000..a6c00a3 --- /dev/null +++ b/typescript/src/generated/src/models/ListTemplates200Response.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ListTemplates200Response + */ +export interface ListTemplates200Response { + [key: string]: any | any; + /** + * + * @type {number} + * @memberof ListTemplates200Response + */ + total?: number; + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof ListTemplates200Response + */ + templates?: Array<{ [key: string]: any; }>; + /** + * + * @type {{ [key: string]: any; }} + * @memberof ListTemplates200Response + */ + error?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the ListTemplates200Response interface. + */ +export function instanceOfListTemplates200Response(value: object): value is ListTemplates200Response { + return true; +} + +export function ListTemplates200ResponseFromJSON(json: any): ListTemplates200Response { + return ListTemplates200ResponseFromJSONTyped(json, false); +} + +export function ListTemplates200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListTemplates200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'total': json['total'] == null ? undefined : json['total'], + 'templates': json['templates'] == null ? undefined : json['templates'], + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function ListTemplates200ResponseToJSON(json: any): ListTemplates200Response { + return ListTemplates200ResponseToJSONTyped(json, false); +} + +export function ListTemplates200ResponseToJSONTyped(value?: ListTemplates200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'total': value['total'], + 'templates': value['templates'], + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/MessageSentResponse.ts b/typescript/src/generated/src/models/MessageSentResponse.ts new file mode 100644 index 0000000..b16f3d5 --- /dev/null +++ b/typescript/src/generated/src/models/MessageSentResponse.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response for successfully sent message + * @export + * @interface MessageSentResponse + */ +export interface MessageSentResponse { + [key: string]: any | any; + /** + * Whether the message was successfully queued for sending + * @type {boolean} + * @memberof MessageSentResponse + */ + sent?: boolean; + /** + * Message ID + * @type {string} + * @memberof MessageSentResponse + */ + id?: string; + /** + * Status message + * @type {string} + * @memberof MessageSentResponse + */ + message?: string; + /** + * Detailed description + * @type {string} + * @memberof MessageSentResponse + */ + description?: string; +} + +/** + * Check if a given object implements the MessageSentResponse interface. + */ +export function instanceOfMessageSentResponse(value: object): value is MessageSentResponse { + return true; +} + +export function MessageSentResponseFromJSON(json: any): MessageSentResponse { + return MessageSentResponseFromJSONTyped(json, false); +} + +export function MessageSentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MessageSentResponse { + if (json == null) { + return json; + } + return { + + ...json, + 'sent': json['sent'] == null ? undefined : json['sent'], + 'id': json['id'] == null ? undefined : json['id'], + 'message': json['message'] == null ? undefined : json['message'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function MessageSentResponseToJSON(json: any): MessageSentResponse { + return MessageSentResponseToJSONTyped(json, false); +} + +export function MessageSentResponseToJSONTyped(value?: MessageSentResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'sent': value['sent'], + 'id': value['id'], + 'message': value['message'], + 'description': value['description'], + }; +} + diff --git a/typescript/src/generated/src/models/PatchFlowsFlowIdAssets200Response.ts b/typescript/src/generated/src/models/PatchFlowsFlowIdAssets200Response.ts new file mode 100644 index 0000000..dd53a35 --- /dev/null +++ b/typescript/src/generated/src/models/PatchFlowsFlowIdAssets200Response.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PatchFlowsFlowIdAssets200Response + */ +export interface PatchFlowsFlowIdAssets200Response { + [key: string]: any | any; + /** + * + * @type {boolean} + * @memberof PatchFlowsFlowIdAssets200Response + */ + success?: boolean; + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof PatchFlowsFlowIdAssets200Response + */ + validationErrors?: Array<{ [key: string]: any; }>; + /** + * Error details returned by the provider. May be a string or a JSON object. + * @type {any} + * @memberof PatchFlowsFlowIdAssets200Response + */ + error?: any | null; +} + +/** + * Check if a given object implements the PatchFlowsFlowIdAssets200Response interface. + */ +export function instanceOfPatchFlowsFlowIdAssets200Response(value: object): value is PatchFlowsFlowIdAssets200Response { + return true; +} + +export function PatchFlowsFlowIdAssets200ResponseFromJSON(json: any): PatchFlowsFlowIdAssets200Response { + return PatchFlowsFlowIdAssets200ResponseFromJSONTyped(json, false); +} + +export function PatchFlowsFlowIdAssets200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchFlowsFlowIdAssets200Response { + if (json == null) { + return json; + } + return { + + ...json, + 'success': json['success'] == null ? undefined : json['success'], + 'validationErrors': json['validationErrors'] == null ? undefined : json['validationErrors'], + 'error': json['error'] == null ? undefined : json['error'], + }; +} + +export function PatchFlowsFlowIdAssets200ResponseToJSON(json: any): PatchFlowsFlowIdAssets200Response { + return PatchFlowsFlowIdAssets200ResponseToJSONTyped(json, false); +} + +export function PatchFlowsFlowIdAssets200ResponseToJSONTyped(value?: PatchFlowsFlowIdAssets200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'success': value['success'], + 'validationErrors': value['validationErrors'], + 'error': value['error'], + }; +} + diff --git a/typescript/src/generated/src/models/ProfileInfo.ts b/typescript/src/generated/src/models/ProfileInfo.ts new file mode 100644 index 0000000..2490430 --- /dev/null +++ b/typescript/src/generated/src/models/ProfileInfo.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * WhatsApp Business profile information + * @export + * @interface ProfileInfo + */ +export interface ProfileInfo { + [key: string]: any | any; + /** + * Profile's About section + * @type {string} + * @memberof ProfileInfo + */ + about?: string; + /** + * Address of the business + * @type {string} + * @memberof ProfileInfo + */ + address?: string; + /** + * Description of the business + * @type {string} + * @memberof ProfileInfo + */ + description?: string; + /** + * Business email + * @type {string} + * @memberof ProfileInfo + */ + email?: string; + /** + * Linked phone number + * @type {string} + * @memberof ProfileInfo + */ + phone?: string; + /** + * Industry of the business + * @type {ProfileInfoVerticalEnum} + * @memberof ProfileInfo + */ + vertical?: ProfileInfoVerticalEnum; + /** + * Profile photo URL + * @type {string} + * @memberof ProfileInfo + */ + photo?: string; + /** + * + * @type {Array} + * @memberof ProfileInfo + */ + websites?: Array; +} + + +/** + * @export + */ +export const ProfileInfoVerticalEnum = { + Automotive: 'Automotive', + BeautySpaAndSalon: 'Beauty, Spa and Salon', + ClothingAndApparel: 'Clothing and Apparel', + Education: 'Education', + Entertainment: 'Entertainment', + EventPlanningAndService: 'Event Planning and Service', + FinanceAndBanking: 'Finance and Banking', + FoodAndGrocery: 'Food and Grocery', + PublicService: 'Public Service', + HotelAndLodging: 'Hotel and Lodging', + MedicalAndHealth: 'Medical and Health', + NonProfit: 'Non-profit', + ProfessionalServices: 'Professional Services', + ShoppingAndRetail: 'Shopping and Retail', + TravelAndTransportation: 'Travel and Transportation', + Restaurant: 'Restaurant', + Other: 'Other' +} as const; +export type ProfileInfoVerticalEnum = typeof ProfileInfoVerticalEnum[keyof typeof ProfileInfoVerticalEnum]; + + +/** + * Check if a given object implements the ProfileInfo interface. + */ +export function instanceOfProfileInfo(value: object): value is ProfileInfo { + return true; +} + +export function ProfileInfoFromJSON(json: any): ProfileInfo { + return ProfileInfoFromJSONTyped(json, false); +} + +export function ProfileInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProfileInfo { + if (json == null) { + return json; + } + return { + + ...json, + 'about': json['about'] == null ? undefined : json['about'], + 'address': json['address'] == null ? undefined : json['address'], + 'description': json['description'] == null ? undefined : json['description'], + 'email': json['email'] == null ? undefined : json['email'], + 'phone': json['phone'] == null ? undefined : json['phone'], + 'vertical': json['vertical'] == null ? undefined : json['vertical'], + 'photo': json['photo'] == null ? undefined : json['photo'], + 'websites': json['websites'] == null ? undefined : json['websites'], + }; +} + +export function ProfileInfoToJSON(json: any): ProfileInfo { + return ProfileInfoToJSONTyped(json, false); +} + +export function ProfileInfoToJSONTyped(value?: ProfileInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'about': value['about'], + 'address': value['address'], + 'description': value['description'], + 'email': value['email'], + 'phone': value['phone'], + 'vertical': value['vertical'], + 'photo': value['photo'], + 'websites': value['websites'], + }; +} + diff --git a/typescript/src/generated/src/models/SendButtonRequest.ts b/typescript/src/generated/src/models/SendButtonRequest.ts new file mode 100644 index 0000000..7d4e399 --- /dev/null +++ b/typescript/src/generated/src/models/SendButtonRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendButtonRequestSectionsInner } from './SendButtonRequestSectionsInner'; +import { + SendButtonRequestSectionsInnerFromJSON, + SendButtonRequestSectionsInnerFromJSONTyped, + SendButtonRequestSectionsInnerToJSON, + SendButtonRequestSectionsInnerToJSONTyped, +} from './SendButtonRequestSectionsInner'; + +/** + * + * @export + * @interface SendButtonRequest + */ +export interface SendButtonRequest { + /** + * + * @type {string} + * @memberof SendButtonRequest + */ + phone?: string; + /** + * + * @type {string} + * @memberof SendButtonRequest + */ + body?: string; + /** + * + * @type {string} + * @memberof SendButtonRequest + */ + footer?: string; + /** + * + * @type {Array} + * @memberof SendButtonRequest + */ + sections?: Array; +} + +/** + * Check if a given object implements the SendButtonRequest interface. + */ +export function instanceOfSendButtonRequest(value: object): value is SendButtonRequest { + return true; +} + +export function SendButtonRequestFromJSON(json: any): SendButtonRequest { + return SendButtonRequestFromJSONTyped(json, false); +} + +export function SendButtonRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendButtonRequest { + if (json == null) { + return json; + } + return { + + 'phone': json['phone'] == null ? undefined : json['phone'], + 'body': json['body'] == null ? undefined : json['body'], + 'footer': json['footer'] == null ? undefined : json['footer'], + 'sections': json['sections'] == null ? undefined : ((json['sections'] as Array).map(SendButtonRequestSectionsInnerFromJSON)), + }; +} + +export function SendButtonRequestToJSON(json: any): SendButtonRequest { + return SendButtonRequestToJSONTyped(json, false); +} + +export function SendButtonRequestToJSONTyped(value?: SendButtonRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phone': value['phone'], + 'body': value['body'], + 'footer': value['footer'], + 'sections': value['sections'] == null ? undefined : ((value['sections'] as Array).map(SendButtonRequestSectionsInnerToJSON)), + }; +} + diff --git a/typescript/src/generated/src/models/SendButtonRequestSectionsInner.ts b/typescript/src/generated/src/models/SendButtonRequestSectionsInner.ts new file mode 100644 index 0000000..4f6a4ba --- /dev/null +++ b/typescript/src/generated/src/models/SendButtonRequestSectionsInner.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendButtonRequestSectionsInnerReply } from './SendButtonRequestSectionsInnerReply'; +import { + SendButtonRequestSectionsInnerReplyFromJSON, + SendButtonRequestSectionsInnerReplyFromJSONTyped, + SendButtonRequestSectionsInnerReplyToJSON, + SendButtonRequestSectionsInnerReplyToJSONTyped, +} from './SendButtonRequestSectionsInnerReply'; + +/** + * + * @export + * @interface SendButtonRequestSectionsInner + */ +export interface SendButtonRequestSectionsInner { + /** + * + * @type {string} + * @memberof SendButtonRequestSectionsInner + */ + type?: string; + /** + * + * @type {SendButtonRequestSectionsInnerReply} + * @memberof SendButtonRequestSectionsInner + */ + reply?: SendButtonRequestSectionsInnerReply; +} + +/** + * Check if a given object implements the SendButtonRequestSectionsInner interface. + */ +export function instanceOfSendButtonRequestSectionsInner(value: object): value is SendButtonRequestSectionsInner { + return true; +} + +export function SendButtonRequestSectionsInnerFromJSON(json: any): SendButtonRequestSectionsInner { + return SendButtonRequestSectionsInnerFromJSONTyped(json, false); +} + +export function SendButtonRequestSectionsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendButtonRequestSectionsInner { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'reply': json['reply'] == null ? undefined : SendButtonRequestSectionsInnerReplyFromJSON(json['reply']), + }; +} + +export function SendButtonRequestSectionsInnerToJSON(json: any): SendButtonRequestSectionsInner { + return SendButtonRequestSectionsInnerToJSONTyped(json, false); +} + +export function SendButtonRequestSectionsInnerToJSONTyped(value?: SendButtonRequestSectionsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + 'reply': SendButtonRequestSectionsInnerReplyToJSON(value['reply']), + }; +} + diff --git a/typescript/src/generated/src/models/SendButtonRequestSectionsInnerReply.ts b/typescript/src/generated/src/models/SendButtonRequestSectionsInnerReply.ts new file mode 100644 index 0000000..b714138 --- /dev/null +++ b/typescript/src/generated/src/models/SendButtonRequestSectionsInnerReply.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendButtonRequestSectionsInnerReply + */ +export interface SendButtonRequestSectionsInnerReply { + /** + * + * @type {string} + * @memberof SendButtonRequestSectionsInnerReply + */ + id?: string; + /** + * + * @type {string} + * @memberof SendButtonRequestSectionsInnerReply + */ + title?: string; +} + +/** + * Check if a given object implements the SendButtonRequestSectionsInnerReply interface. + */ +export function instanceOfSendButtonRequestSectionsInnerReply(value: object): value is SendButtonRequestSectionsInnerReply { + return true; +} + +export function SendButtonRequestSectionsInnerReplyFromJSON(json: any): SendButtonRequestSectionsInnerReply { + return SendButtonRequestSectionsInnerReplyFromJSONTyped(json, false); +} + +export function SendButtonRequestSectionsInnerReplyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendButtonRequestSectionsInnerReply { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'title': json['title'] == null ? undefined : json['title'], + }; +} + +export function SendButtonRequestSectionsInnerReplyToJSON(json: any): SendButtonRequestSectionsInnerReply { + return SendButtonRequestSectionsInnerReplyToJSONTyped(json, false); +} + +export function SendButtonRequestSectionsInnerReplyToJSONTyped(value?: SendButtonRequestSectionsInnerReply | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'title': value['title'], + }; +} + diff --git a/typescript/src/generated/src/models/SendCarouselRequest1.ts b/typescript/src/generated/src/models/SendCarouselRequest1.ts new file mode 100644 index 0000000..ad949f7 --- /dev/null +++ b/typescript/src/generated/src/models/SendCarouselRequest1.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendCarouselRequest1 + */ +export interface SendCarouselRequest1 { + /** + * + * @type {string} + * @memberof SendCarouselRequest1 + */ + body?: string; + /** + * + * @type {Array} + * @memberof SendCarouselRequest1 + */ + params: Array; + /** + * + * @type {string} + * @memberof SendCarouselRequest1 + */ + quotedMsgId?: string; + /** + * + * @type {string} + * @memberof SendCarouselRequest1 + */ + chatId?: string; + /** + * + * @type {number} + * @memberof SendCarouselRequest1 + */ + phone?: number; +} + +/** + * Check if a given object implements the SendCarouselRequest1 interface. + */ +export function instanceOfSendCarouselRequest1(value: object): value is SendCarouselRequest1 { + if (!('params' in value) || value['params'] === undefined) return false; + return true; +} + +export function SendCarouselRequest1FromJSON(json: any): SendCarouselRequest1 { + return SendCarouselRequest1FromJSONTyped(json, false); +} + +export function SendCarouselRequest1FromJSONTyped(json: any, ignoreDiscriminator: boolean): SendCarouselRequest1 { + if (json == null) { + return json; + } + return { + + 'body': json['body'] == null ? undefined : json['body'], + 'params': json['params'], + 'quotedMsgId': json['quotedMsgId'] == null ? undefined : json['quotedMsgId'], + 'chatId': json['chatId'] == null ? undefined : json['chatId'], + 'phone': json['phone'] == null ? undefined : json['phone'], + }; +} + +export function SendCarouselRequest1ToJSON(json: any): SendCarouselRequest1 { + return SendCarouselRequest1ToJSONTyped(json, false); +} + +export function SendCarouselRequest1ToJSONTyped(value?: SendCarouselRequest1 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'body': value['body'], + 'params': value['params'], + 'quotedMsgId': value['quotedMsgId'], + 'chatId': value['chatId'], + 'phone': value['phone'], + }; +} + diff --git a/typescript/src/generated/src/models/SendContactRequest.ts b/typescript/src/generated/src/models/SendContactRequest.ts new file mode 100644 index 0000000..2adaad7 --- /dev/null +++ b/typescript/src/generated/src/models/SendContactRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendContactRequestContactsInner } from './SendContactRequestContactsInner'; +import { + SendContactRequestContactsInnerFromJSON, + SendContactRequestContactsInnerFromJSONTyped, + SendContactRequestContactsInnerToJSON, + SendContactRequestContactsInnerToJSONTyped, +} from './SendContactRequestContactsInner'; + +/** + * + * @export + * @interface SendContactRequest + */ +export interface SendContactRequest { + /** + * + * @type {string} + * @memberof SendContactRequest + */ + phone?: string; + /** + * + * @type {Array} + * @memberof SendContactRequest + */ + contacts?: Array; +} + +/** + * Check if a given object implements the SendContactRequest interface. + */ +export function instanceOfSendContactRequest(value: object): value is SendContactRequest { + return true; +} + +export function SendContactRequestFromJSON(json: any): SendContactRequest { + return SendContactRequestFromJSONTyped(json, false); +} + +export function SendContactRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequest { + if (json == null) { + return json; + } + return { + + 'phone': json['phone'] == null ? undefined : json['phone'], + 'contacts': json['contacts'] == null ? undefined : ((json['contacts'] as Array).map(SendContactRequestContactsInnerFromJSON)), + }; +} + +export function SendContactRequestToJSON(json: any): SendContactRequest { + return SendContactRequestToJSONTyped(json, false); +} + +export function SendContactRequestToJSONTyped(value?: SendContactRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phone': value['phone'], + 'contacts': value['contacts'] == null ? undefined : ((value['contacts'] as Array).map(SendContactRequestContactsInnerToJSON)), + }; +} + diff --git a/typescript/src/generated/src/models/SendContactRequestContactsInner.ts b/typescript/src/generated/src/models/SendContactRequestContactsInner.ts new file mode 100644 index 0000000..57c8def --- /dev/null +++ b/typescript/src/generated/src/models/SendContactRequestContactsInner.ts @@ -0,0 +1,135 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendContactRequestContactsInnerOrg } from './SendContactRequestContactsInnerOrg'; +import { + SendContactRequestContactsInnerOrgFromJSON, + SendContactRequestContactsInnerOrgFromJSONTyped, + SendContactRequestContactsInnerOrgToJSON, + SendContactRequestContactsInnerOrgToJSONTyped, +} from './SendContactRequestContactsInnerOrg'; +import type { SendContactRequestContactsInnerPhonesInner } from './SendContactRequestContactsInnerPhonesInner'; +import { + SendContactRequestContactsInnerPhonesInnerFromJSON, + SendContactRequestContactsInnerPhonesInnerFromJSONTyped, + SendContactRequestContactsInnerPhonesInnerToJSON, + SendContactRequestContactsInnerPhonesInnerToJSONTyped, +} from './SendContactRequestContactsInnerPhonesInner'; +import type { SendContactRequestContactsInnerName } from './SendContactRequestContactsInnerName'; +import { + SendContactRequestContactsInnerNameFromJSON, + SendContactRequestContactsInnerNameFromJSONTyped, + SendContactRequestContactsInnerNameToJSON, + SendContactRequestContactsInnerNameToJSONTyped, +} from './SendContactRequestContactsInnerName'; + +/** + * + * @export + * @interface SendContactRequestContactsInner + */ +export interface SendContactRequestContactsInner { + /** + * + * @type {SendContactRequestContactsInnerName} + * @memberof SendContactRequestContactsInner + */ + name?: SendContactRequestContactsInnerName; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInner + */ + birthday?: string; + /** + * + * @type {Array} + * @memberof SendContactRequestContactsInner + */ + addresses?: Array; + /** + * + * @type {Array} + * @memberof SendContactRequestContactsInner + */ + emails?: Array; + /** + * + * @type {SendContactRequestContactsInnerOrg} + * @memberof SendContactRequestContactsInner + */ + org?: SendContactRequestContactsInnerOrg; + /** + * + * @type {Array} + * @memberof SendContactRequestContactsInner + */ + phones?: Array; + /** + * + * @type {Array} + * @memberof SendContactRequestContactsInner + */ + urls?: Array; +} + +/** + * Check if a given object implements the SendContactRequestContactsInner interface. + */ +export function instanceOfSendContactRequestContactsInner(value: object): value is SendContactRequestContactsInner { + return true; +} + +export function SendContactRequestContactsInnerFromJSON(json: any): SendContactRequestContactsInner { + return SendContactRequestContactsInnerFromJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequestContactsInner { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : SendContactRequestContactsInnerNameFromJSON(json['name']), + 'birthday': json['birthday'] == null ? undefined : json['birthday'], + 'addresses': json['addresses'] == null ? undefined : json['addresses'], + 'emails': json['emails'] == null ? undefined : json['emails'], + 'org': json['org'] == null ? undefined : SendContactRequestContactsInnerOrgFromJSON(json['org']), + 'phones': json['phones'] == null ? undefined : ((json['phones'] as Array).map(SendContactRequestContactsInnerPhonesInnerFromJSON)), + 'urls': json['urls'] == null ? undefined : json['urls'], + }; +} + +export function SendContactRequestContactsInnerToJSON(json: any): SendContactRequestContactsInner { + return SendContactRequestContactsInnerToJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerToJSONTyped(value?: SendContactRequestContactsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': SendContactRequestContactsInnerNameToJSON(value['name']), + 'birthday': value['birthday'], + 'addresses': value['addresses'], + 'emails': value['emails'], + 'org': SendContactRequestContactsInnerOrgToJSON(value['org']), + 'phones': value['phones'] == null ? undefined : ((value['phones'] as Array).map(SendContactRequestContactsInnerPhonesInnerToJSON)), + 'urls': value['urls'], + }; +} + diff --git a/typescript/src/generated/src/models/SendContactRequestContactsInnerName.ts b/typescript/src/generated/src/models/SendContactRequestContactsInnerName.ts new file mode 100644 index 0000000..8622fb9 --- /dev/null +++ b/typescript/src/generated/src/models/SendContactRequestContactsInnerName.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendContactRequestContactsInnerName + */ +export interface SendContactRequestContactsInnerName { + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerName + */ + formattedName?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerName + */ + firstName?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerName + */ + lastName?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerName + */ + middleName?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerName + */ + suffix?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerName + */ + prefix?: string; +} + +/** + * Check if a given object implements the SendContactRequestContactsInnerName interface. + */ +export function instanceOfSendContactRequestContactsInnerName(value: object): value is SendContactRequestContactsInnerName { + return true; +} + +export function SendContactRequestContactsInnerNameFromJSON(json: any): SendContactRequestContactsInnerName { + return SendContactRequestContactsInnerNameFromJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerNameFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequestContactsInnerName { + if (json == null) { + return json; + } + return { + + 'formattedName': json['formatted_name'] == null ? undefined : json['formatted_name'], + 'firstName': json['first_name'] == null ? undefined : json['first_name'], + 'lastName': json['last_name'] == null ? undefined : json['last_name'], + 'middleName': json['middle_name'] == null ? undefined : json['middle_name'], + 'suffix': json['suffix'] == null ? undefined : json['suffix'], + 'prefix': json['prefix'] == null ? undefined : json['prefix'], + }; +} + +export function SendContactRequestContactsInnerNameToJSON(json: any): SendContactRequestContactsInnerName { + return SendContactRequestContactsInnerNameToJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerNameToJSONTyped(value?: SendContactRequestContactsInnerName | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'formatted_name': value['formattedName'], + 'first_name': value['firstName'], + 'last_name': value['lastName'], + 'middle_name': value['middleName'], + 'suffix': value['suffix'], + 'prefix': value['prefix'], + }; +} + diff --git a/typescript/src/generated/src/models/SendContactRequestContactsInnerOrg.ts b/typescript/src/generated/src/models/SendContactRequestContactsInnerOrg.ts new file mode 100644 index 0000000..580aba2 --- /dev/null +++ b/typescript/src/generated/src/models/SendContactRequestContactsInnerOrg.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendContactRequestContactsInnerOrg + */ +export interface SendContactRequestContactsInnerOrg { + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerOrg + */ + company?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerOrg + */ + department?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerOrg + */ + title?: string; +} + +/** + * Check if a given object implements the SendContactRequestContactsInnerOrg interface. + */ +export function instanceOfSendContactRequestContactsInnerOrg(value: object): value is SendContactRequestContactsInnerOrg { + return true; +} + +export function SendContactRequestContactsInnerOrgFromJSON(json: any): SendContactRequestContactsInnerOrg { + return SendContactRequestContactsInnerOrgFromJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerOrgFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequestContactsInnerOrg { + if (json == null) { + return json; + } + return { + + 'company': json['company'] == null ? undefined : json['company'], + 'department': json['department'] == null ? undefined : json['department'], + 'title': json['title'] == null ? undefined : json['title'], + }; +} + +export function SendContactRequestContactsInnerOrgToJSON(json: any): SendContactRequestContactsInnerOrg { + return SendContactRequestContactsInnerOrgToJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerOrgToJSONTyped(value?: SendContactRequestContactsInnerOrg | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'company': value['company'], + 'department': value['department'], + 'title': value['title'], + }; +} + diff --git a/typescript/src/generated/src/models/SendContactRequestContactsInnerPhonesInner.ts b/typescript/src/generated/src/models/SendContactRequestContactsInnerPhonesInner.ts new file mode 100644 index 0000000..6ba03cb --- /dev/null +++ b/typescript/src/generated/src/models/SendContactRequestContactsInnerPhonesInner.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendContactRequestContactsInnerPhonesInner + */ +export interface SendContactRequestContactsInnerPhonesInner { + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerPhonesInner + */ + phone?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerPhonesInner + */ + type?: string; + /** + * + * @type {string} + * @memberof SendContactRequestContactsInnerPhonesInner + */ + waId?: string; +} + +/** + * Check if a given object implements the SendContactRequestContactsInnerPhonesInner interface. + */ +export function instanceOfSendContactRequestContactsInnerPhonesInner(value: object): value is SendContactRequestContactsInnerPhonesInner { + return true; +} + +export function SendContactRequestContactsInnerPhonesInnerFromJSON(json: any): SendContactRequestContactsInnerPhonesInner { + return SendContactRequestContactsInnerPhonesInnerFromJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerPhonesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendContactRequestContactsInnerPhonesInner { + if (json == null) { + return json; + } + return { + + 'phone': json['phone'] == null ? undefined : json['phone'], + 'type': json['type'] == null ? undefined : json['type'], + 'waId': json['wa_id'] == null ? undefined : json['wa_id'], + }; +} + +export function SendContactRequestContactsInnerPhonesInnerToJSON(json: any): SendContactRequestContactsInnerPhonesInner { + return SendContactRequestContactsInnerPhonesInnerToJSONTyped(json, false); +} + +export function SendContactRequestContactsInnerPhonesInnerToJSONTyped(value?: SendContactRequestContactsInnerPhonesInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phone': value['phone'], + 'type': value['type'], + 'wa_id': value['waId'], + }; +} + diff --git a/typescript/src/generated/src/models/SendFileRequest.ts b/typescript/src/generated/src/models/SendFileRequest.ts new file mode 100644 index 0000000..ef35969 --- /dev/null +++ b/typescript/src/generated/src/models/SendFileRequest.ts @@ -0,0 +1,111 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Request body for sending a file (image, video, document, audio) + * @export + * @interface SendFileRequest + */ +export interface SendFileRequest { + /** + * File source: + * - HTTP/HTTPS URL (https://example.com/file.pdf) + * - Base64-encoded file with MIME (data:image/jpeg;base64,/9j/4AAQ...) + * - Form-data field + * + * @type {string} + * @memberof SendFileRequest + */ + body: string; + /** + * File name with extension (required for mime type detection) + * @type {string} + * @memberof SendFileRequest + */ + filename: string; + /** + * Text caption under the file + * @type {string} + * @memberof SendFileRequest + */ + caption?: string; + /** + * Message ID to quote/reply to + * @type {string} + * @memberof SendFileRequest + */ + quotedMsgId?: string; + /** + * Chat ID in format: phone@c.us or phone@g.us + * @type {string} + * @memberof SendFileRequest + */ + chatId?: string; + /** + * Phone number starting with country code + * @type {number} + * @memberof SendFileRequest + */ + phone?: number; +} + +/** + * Check if a given object implements the SendFileRequest interface. + */ +export function instanceOfSendFileRequest(value: object): value is SendFileRequest { + if (!('body' in value) || value['body'] === undefined) return false; + if (!('filename' in value) || value['filename'] === undefined) return false; + return true; +} + +export function SendFileRequestFromJSON(json: any): SendFileRequest { + return SendFileRequestFromJSONTyped(json, false); +} + +export function SendFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendFileRequest { + if (json == null) { + return json; + } + return { + + 'body': json['body'], + 'filename': json['filename'], + 'caption': json['caption'] == null ? undefined : json['caption'], + 'quotedMsgId': json['quotedMsgId'] == null ? undefined : json['quotedMsgId'], + 'chatId': json['chatId'] == null ? undefined : json['chatId'], + 'phone': json['phone'] == null ? undefined : json['phone'], + }; +} + +export function SendFileRequestToJSON(json: any): SendFileRequest { + return SendFileRequestToJSONTyped(json, false); +} + +export function SendFileRequestToJSONTyped(value?: SendFileRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'body': value['body'], + 'filename': value['filename'], + 'caption': value['caption'], + 'quotedMsgId': value['quotedMsgId'], + 'chatId': value['chatId'], + 'phone': value['phone'], + }; +} + diff --git a/typescript/src/generated/src/models/SendFlowRequest1.ts b/typescript/src/generated/src/models/SendFlowRequest1.ts new file mode 100644 index 0000000..7afce3b --- /dev/null +++ b/typescript/src/generated/src/models/SendFlowRequest1.ts @@ -0,0 +1,209 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendFlowRequest1Header } from './SendFlowRequest1Header'; +import { + SendFlowRequest1HeaderFromJSON, + SendFlowRequest1HeaderFromJSONTyped, + SendFlowRequest1HeaderToJSON, + SendFlowRequest1HeaderToJSONTyped, +} from './SendFlowRequest1Header'; + +/** + * + * @export + * @interface SendFlowRequest1 + */ +export interface SendFlowRequest1 { + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + body: string; + /** + * + * @type {SendFlowRequest1Header} + * @memberof SendFlowRequest1 + */ + header?: SendFlowRequest1Header; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + footer?: string; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + flowId: string; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + flowToken: string; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + flowCta: string; + /** + * + * @type {SendFlowRequest1FlowActionEnum} + * @memberof SendFlowRequest1 + */ + flowAction?: SendFlowRequest1FlowActionEnum; + /** + * + * @type {object} + * @memberof SendFlowRequest1 + */ + flowActionPayload?: object; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + flowMessageVersion?: string; + /** + * + * @type {SendFlowRequest1ModeEnum} + * @memberof SendFlowRequest1 + */ + mode?: SendFlowRequest1ModeEnum; + /** + * + * @type {object} + * @memberof SendFlowRequest1 + */ + flowActionData?: object; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + flowActionScreen?: string; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + quotedMsgId?: string; + /** + * + * @type {string} + * @memberof SendFlowRequest1 + */ + chatId?: string; + /** + * + * @type {number} + * @memberof SendFlowRequest1 + */ + phone?: number; +} + + +/** + * @export + */ +export const SendFlowRequest1FlowActionEnum = { + Navigate: 'navigate', + DataExchange: 'data_exchange' +} as const; +export type SendFlowRequest1FlowActionEnum = typeof SendFlowRequest1FlowActionEnum[keyof typeof SendFlowRequest1FlowActionEnum]; + +/** + * @export + */ +export const SendFlowRequest1ModeEnum = { + Draft: 'draft', + Published: 'published' +} as const; +export type SendFlowRequest1ModeEnum = typeof SendFlowRequest1ModeEnum[keyof typeof SendFlowRequest1ModeEnum]; + + +/** + * Check if a given object implements the SendFlowRequest1 interface. + */ +export function instanceOfSendFlowRequest1(value: object): value is SendFlowRequest1 { + if (!('body' in value) || value['body'] === undefined) return false; + if (!('flowId' in value) || value['flowId'] === undefined) return false; + if (!('flowToken' in value) || value['flowToken'] === undefined) return false; + if (!('flowCta' in value) || value['flowCta'] === undefined) return false; + return true; +} + +export function SendFlowRequest1FromJSON(json: any): SendFlowRequest1 { + return SendFlowRequest1FromJSONTyped(json, false); +} + +export function SendFlowRequest1FromJSONTyped(json: any, ignoreDiscriminator: boolean): SendFlowRequest1 { + if (json == null) { + return json; + } + return { + + 'body': json['body'], + 'header': json['header'] == null ? undefined : SendFlowRequest1HeaderFromJSON(json['header']), + 'footer': json['footer'] == null ? undefined : json['footer'], + 'flowId': json['flowId'], + 'flowToken': json['flowToken'], + 'flowCta': json['flowCta'], + 'flowAction': json['flowAction'] == null ? undefined : json['flowAction'], + 'flowActionPayload': json['flowActionPayload'] == null ? undefined : json['flowActionPayload'], + 'flowMessageVersion': json['flowMessageVersion'] == null ? undefined : json['flowMessageVersion'], + 'mode': json['mode'] == null ? undefined : json['mode'], + 'flowActionData': json['flowActionData'] == null ? undefined : json['flowActionData'], + 'flowActionScreen': json['flowActionScreen'] == null ? undefined : json['flowActionScreen'], + 'quotedMsgId': json['quotedMsgId'] == null ? undefined : json['quotedMsgId'], + 'chatId': json['chatId'] == null ? undefined : json['chatId'], + 'phone': json['phone'] == null ? undefined : json['phone'], + }; +} + +export function SendFlowRequest1ToJSON(json: any): SendFlowRequest1 { + return SendFlowRequest1ToJSONTyped(json, false); +} + +export function SendFlowRequest1ToJSONTyped(value?: SendFlowRequest1 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'body': value['body'], + 'header': SendFlowRequest1HeaderToJSON(value['header']), + 'footer': value['footer'], + 'flowId': value['flowId'], + 'flowToken': value['flowToken'], + 'flowCta': value['flowCta'], + 'flowAction': value['flowAction'], + 'flowActionPayload': value['flowActionPayload'], + 'flowMessageVersion': value['flowMessageVersion'], + 'mode': value['mode'], + 'flowActionData': value['flowActionData'], + 'flowActionScreen': value['flowActionScreen'], + 'quotedMsgId': value['quotedMsgId'], + 'chatId': value['chatId'], + 'phone': value['phone'], + }; +} + diff --git a/typescript/src/generated/src/models/SendFlowRequest1Header.ts b/typescript/src/generated/src/models/SendFlowRequest1Header.ts new file mode 100644 index 0000000..9fc27b9 --- /dev/null +++ b/typescript/src/generated/src/models/SendFlowRequest1Header.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * @type SendFlowRequest1Header + * + * @export + */ +export type SendFlowRequest1Header = object | string; + +export function SendFlowRequest1HeaderFromJSON(json: any): SendFlowRequest1Header { + return SendFlowRequest1HeaderFromJSONTyped(json, false); +} + +export function SendFlowRequest1HeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendFlowRequest1Header { + if (json == null) { + return json; + } + if (typeof json === 'string') { + return json; + } + return {} as any; +} + +export function SendFlowRequest1HeaderToJSON(json: any): any { + return SendFlowRequest1HeaderToJSONTyped(json, false); +} + +export function SendFlowRequest1HeaderToJSONTyped(value?: SendFlowRequest1Header | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + if (typeof value === 'string') { + return value; + } + return {}; +} + diff --git a/typescript/src/generated/src/models/SendFlowRequestHeader.ts b/typescript/src/generated/src/models/SendFlowRequestHeader.ts new file mode 100644 index 0000000..77e058a --- /dev/null +++ b/typescript/src/generated/src/models/SendFlowRequestHeader.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * @type SendFlowRequestHeader + * Flow header (string or text header object) + * @export + */ +export type SendFlowRequestHeader = object | string; + +export function SendFlowRequestHeaderFromJSON(json: any): SendFlowRequestHeader { + return SendFlowRequestHeaderFromJSONTyped(json, false); +} + +export function SendFlowRequestHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendFlowRequestHeader { + if (json == null) { + return json; + } + if (typeof json === 'string') { + return json; + } + return {} as any; +} + +export function SendFlowRequestHeaderToJSON(json: any): any { + return SendFlowRequestHeaderToJSONTyped(json, false); +} + +export function SendFlowRequestHeaderToJSONTyped(value?: SendFlowRequestHeader | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + if (typeof value === 'string') { + return value; + } + return {}; +} + diff --git a/typescript/src/generated/src/models/SendListRequest.ts b/typescript/src/generated/src/models/SendListRequest.ts new file mode 100644 index 0000000..fd00d90 --- /dev/null +++ b/typescript/src/generated/src/models/SendListRequest.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendListRequestSectionsInner } from './SendListRequestSectionsInner'; +import { + SendListRequestSectionsInnerFromJSON, + SendListRequestSectionsInnerFromJSONTyped, + SendListRequestSectionsInnerToJSON, + SendListRequestSectionsInnerToJSONTyped, +} from './SendListRequestSectionsInner'; + +/** + * + * @export + * @interface SendListRequest + */ +export interface SendListRequest { + /** + * + * @type {string} + * @memberof SendListRequest + */ + phone?: string; + /** + * + * @type {string} + * @memberof SendListRequest + */ + body?: string; + /** + * + * @type {string} + * @memberof SendListRequest + */ + buttonText?: string; + /** + * + * @type {string} + * @memberof SendListRequest + */ + action?: string; + /** + * + * @type {Array} + * @memberof SendListRequest + */ + sections?: Array; +} + +/** + * Check if a given object implements the SendListRequest interface. + */ +export function instanceOfSendListRequest(value: object): value is SendListRequest { + return true; +} + +export function SendListRequestFromJSON(json: any): SendListRequest { + return SendListRequestFromJSONTyped(json, false); +} + +export function SendListRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequest { + if (json == null) { + return json; + } + return { + + 'phone': json['phone'] == null ? undefined : json['phone'], + 'body': json['body'] == null ? undefined : json['body'], + 'buttonText': json['buttonText'] == null ? undefined : json['buttonText'], + 'action': json['action'] == null ? undefined : json['action'], + 'sections': json['sections'] == null ? undefined : ((json['sections'] as Array).map(SendListRequestSectionsInnerFromJSON)), + }; +} + +export function SendListRequestToJSON(json: any): SendListRequest { + return SendListRequestToJSONTyped(json, false); +} + +export function SendListRequestToJSONTyped(value?: SendListRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phone': value['phone'], + 'body': value['body'], + 'buttonText': value['buttonText'], + 'action': value['action'], + 'sections': value['sections'] == null ? undefined : ((value['sections'] as Array).map(SendListRequestSectionsInnerToJSON)), + }; +} + diff --git a/typescript/src/generated/src/models/SendListRequestSectionsInner.ts b/typescript/src/generated/src/models/SendListRequestSectionsInner.ts new file mode 100644 index 0000000..4b14628 --- /dev/null +++ b/typescript/src/generated/src/models/SendListRequestSectionsInner.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendListRequestSectionsInnerRowsInner } from './SendListRequestSectionsInnerRowsInner'; +import { + SendListRequestSectionsInnerRowsInnerFromJSON, + SendListRequestSectionsInnerRowsInnerFromJSONTyped, + SendListRequestSectionsInnerRowsInnerToJSON, + SendListRequestSectionsInnerRowsInnerToJSONTyped, +} from './SendListRequestSectionsInnerRowsInner'; + +/** + * + * @export + * @interface SendListRequestSectionsInner + */ +export interface SendListRequestSectionsInner { + /** + * + * @type {string} + * @memberof SendListRequestSectionsInner + */ + title?: string; + /** + * + * @type {Array} + * @memberof SendListRequestSectionsInner + */ + rows?: Array; +} + +/** + * Check if a given object implements the SendListRequestSectionsInner interface. + */ +export function instanceOfSendListRequestSectionsInner(value: object): value is SendListRequestSectionsInner { + return true; +} + +export function SendListRequestSectionsInnerFromJSON(json: any): SendListRequestSectionsInner { + return SendListRequestSectionsInnerFromJSONTyped(json, false); +} + +export function SendListRequestSectionsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequestSectionsInner { + if (json == null) { + return json; + } + return { + + 'title': json['title'] == null ? undefined : json['title'], + 'rows': json['rows'] == null ? undefined : ((json['rows'] as Array).map(SendListRequestSectionsInnerRowsInnerFromJSON)), + }; +} + +export function SendListRequestSectionsInnerToJSON(json: any): SendListRequestSectionsInner { + return SendListRequestSectionsInnerToJSONTyped(json, false); +} + +export function SendListRequestSectionsInnerToJSONTyped(value?: SendListRequestSectionsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'title': value['title'], + 'rows': value['rows'] == null ? undefined : ((value['rows'] as Array).map(SendListRequestSectionsInnerRowsInnerToJSON)), + }; +} + diff --git a/typescript/src/generated/src/models/SendListRequestSectionsInnerRowsInner.ts b/typescript/src/generated/src/models/SendListRequestSectionsInnerRowsInner.ts new file mode 100644 index 0000000..9730c64 --- /dev/null +++ b/typescript/src/generated/src/models/SendListRequestSectionsInnerRowsInner.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendListRequestSectionsInnerRowsInner + */ +export interface SendListRequestSectionsInnerRowsInner { + /** + * + * @type {string} + * @memberof SendListRequestSectionsInnerRowsInner + */ + id?: string; + /** + * + * @type {string} + * @memberof SendListRequestSectionsInnerRowsInner + */ + title?: string; + /** + * + * @type {string} + * @memberof SendListRequestSectionsInnerRowsInner + */ + description?: string; +} + +/** + * Check if a given object implements the SendListRequestSectionsInnerRowsInner interface. + */ +export function instanceOfSendListRequestSectionsInnerRowsInner(value: object): value is SendListRequestSectionsInnerRowsInner { + return true; +} + +export function SendListRequestSectionsInnerRowsInnerFromJSON(json: any): SendListRequestSectionsInnerRowsInner { + return SendListRequestSectionsInnerRowsInnerFromJSONTyped(json, false); +} + +export function SendListRequestSectionsInnerRowsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendListRequestSectionsInnerRowsInner { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'title': json['title'] == null ? undefined : json['title'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function SendListRequestSectionsInnerRowsInnerToJSON(json: any): SendListRequestSectionsInnerRowsInner { + return SendListRequestSectionsInnerRowsInnerToJSONTyped(json, false); +} + +export function SendListRequestSectionsInnerRowsInnerToJSONTyped(value?: SendListRequestSectionsInnerRowsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'title': value['title'], + 'description': value['description'], + }; +} + diff --git a/typescript/src/generated/src/models/SendLocationRequest1.ts b/typescript/src/generated/src/models/SendLocationRequest1.ts new file mode 100644 index 0000000..1720972 --- /dev/null +++ b/typescript/src/generated/src/models/SendLocationRequest1.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendLocationRequest1 + */ +export interface SendLocationRequest1 { + /** + * + * @type {string} + * @memberof SendLocationRequest1 + */ + lat: string; + /** + * + * @type {string} + * @memberof SendLocationRequest1 + */ + lng: string; + /** + * + * @type {string} + * @memberof SendLocationRequest1 + */ + address?: string; + /** + * + * @type {string} + * @memberof SendLocationRequest1 + */ + name?: string; + /** + * + * @type {string} + * @memberof SendLocationRequest1 + */ + quotedMsgId?: string; + /** + * + * @type {string} + * @memberof SendLocationRequest1 + */ + chatId?: string; + /** + * + * @type {number} + * @memberof SendLocationRequest1 + */ + phone?: number; +} + +/** + * Check if a given object implements the SendLocationRequest1 interface. + */ +export function instanceOfSendLocationRequest1(value: object): value is SendLocationRequest1 { + if (!('lat' in value) || value['lat'] === undefined) return false; + if (!('lng' in value) || value['lng'] === undefined) return false; + return true; +} + +export function SendLocationRequest1FromJSON(json: any): SendLocationRequest1 { + return SendLocationRequest1FromJSONTyped(json, false); +} + +export function SendLocationRequest1FromJSONTyped(json: any, ignoreDiscriminator: boolean): SendLocationRequest1 { + if (json == null) { + return json; + } + return { + + 'lat': json['lat'], + 'lng': json['lng'], + 'address': json['address'] == null ? undefined : json['address'], + 'name': json['name'] == null ? undefined : json['name'], + 'quotedMsgId': json['quotedMsgId'] == null ? undefined : json['quotedMsgId'], + 'chatId': json['chatId'] == null ? undefined : json['chatId'], + 'phone': json['phone'] == null ? undefined : json['phone'], + }; +} + +export function SendLocationRequest1ToJSON(json: any): SendLocationRequest1 { + return SendLocationRequest1ToJSONTyped(json, false); +} + +export function SendLocationRequest1ToJSONTyped(value?: SendLocationRequest1 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'lat': value['lat'], + 'lng': value['lng'], + 'address': value['address'], + 'name': value['name'], + 'quotedMsgId': value['quotedMsgId'], + 'chatId': value['chatId'], + 'phone': value['phone'], + }; +} + diff --git a/typescript/src/generated/src/models/SendLocationRequestRequest.ts b/typescript/src/generated/src/models/SendLocationRequestRequest.ts new file mode 100644 index 0000000..46380f6 --- /dev/null +++ b/typescript/src/generated/src/models/SendLocationRequestRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendLocationRequestRequest + */ +export interface SendLocationRequestRequest { + /** + * + * @type {string} + * @memberof SendLocationRequestRequest + */ + phone?: string; + /** + * + * @type {string} + * @memberof SendLocationRequestRequest + */ + body?: string; +} + +/** + * Check if a given object implements the SendLocationRequestRequest interface. + */ +export function instanceOfSendLocationRequestRequest(value: object): value is SendLocationRequestRequest { + return true; +} + +export function SendLocationRequestRequestFromJSON(json: any): SendLocationRequestRequest { + return SendLocationRequestRequestFromJSONTyped(json, false); +} + +export function SendLocationRequestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendLocationRequestRequest { + if (json == null) { + return json; + } + return { + + 'phone': json['phone'] == null ? undefined : json['phone'], + 'body': json['body'] == null ? undefined : json['body'], + }; +} + +export function SendLocationRequestRequestToJSON(json: any): SendLocationRequestRequest { + return SendLocationRequestRequestToJSONTyped(json, false); +} + +export function SendLocationRequestRequestToJSONTyped(value?: SendLocationRequestRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phone': value['phone'], + 'body': value['body'], + }; +} + diff --git a/typescript/src/generated/src/models/SendMessageRequest.ts b/typescript/src/generated/src/models/SendMessageRequest.ts new file mode 100644 index 0000000..59b3806 --- /dev/null +++ b/typescript/src/generated/src/models/SendMessageRequest.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Request body for sending a text message + * @export + * @interface SendMessageRequest + */ +export interface SendMessageRequest { + /** + * Message text, UTF-8 or UTF-16 string with emoji + * @type {string} + * @memberof SendMessageRequest + */ + body: string; + /** + * Message ID to quote/reply to (Cloud API wamid) + * @type {string} + * @memberof SendMessageRequest + */ + quotedMsgId?: string; + /** + * Chat ID in format: phone@c.us (individual) or phone@g.us (group) + * @type {string} + * @memberof SendMessageRequest + */ + chatId?: string; + /** + * Phone number starting with country code (alternative to chatId) + * @type {number} + * @memberof SendMessageRequest + */ + phone?: number; +} + +/** + * Check if a given object implements the SendMessageRequest interface. + */ +export function instanceOfSendMessageRequest(value: object): value is SendMessageRequest { + if (!('body' in value) || value['body'] === undefined) return false; + return true; +} + +export function SendMessageRequestFromJSON(json: any): SendMessageRequest { + return SendMessageRequestFromJSONTyped(json, false); +} + +export function SendMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendMessageRequest { + if (json == null) { + return json; + } + return { + + 'body': json['body'], + 'quotedMsgId': json['quotedMsgId'] == null ? undefined : json['quotedMsgId'], + 'chatId': json['chatId'] == null ? undefined : json['chatId'], + 'phone': json['phone'] == null ? undefined : json['phone'], + }; +} + +export function SendMessageRequestToJSON(json: any): SendMessageRequest { + return SendMessageRequestToJSONTyped(json, false); +} + +export function SendMessageRequestToJSONTyped(value?: SendMessageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'body': value['body'], + 'quotedMsgId': value['quotedMsgId'], + 'chatId': value['chatId'], + 'phone': value['phone'], + }; +} + diff --git a/typescript/src/generated/src/models/SendReactionRequest.ts b/typescript/src/generated/src/models/SendReactionRequest.ts new file mode 100644 index 0000000..a0ae953 --- /dev/null +++ b/typescript/src/generated/src/models/SendReactionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendReactionRequest + */ +export interface SendReactionRequest { + /** + * + * @type {string} + * @memberof SendReactionRequest + */ + phone?: string; + /** + * + * @type {string} + * @memberof SendReactionRequest + */ + body?: string; + /** + * + * @type {string} + * @memberof SendReactionRequest + */ + quotedMsgId?: string; +} + +/** + * Check if a given object implements the SendReactionRequest interface. + */ +export function instanceOfSendReactionRequest(value: object): value is SendReactionRequest { + return true; +} + +export function SendReactionRequestFromJSON(json: any): SendReactionRequest { + return SendReactionRequestFromJSONTyped(json, false); +} + +export function SendReactionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendReactionRequest { + if (json == null) { + return json; + } + return { + + 'phone': json['phone'] == null ? undefined : json['phone'], + 'body': json['body'] == null ? undefined : json['body'], + 'quotedMsgId': json['quotedMsgId'] == null ? undefined : json['quotedMsgId'], + }; +} + +export function SendReactionRequestToJSON(json: any): SendReactionRequest { + return SendReactionRequestToJSONTyped(json, false); +} + +export function SendReactionRequestToJSONTyped(value?: SendReactionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phone': value['phone'], + 'body': value['body'], + 'quotedMsgId': value['quotedMsgId'], + }; +} + diff --git a/typescript/src/generated/src/models/SendTemplateRequest.ts b/typescript/src/generated/src/models/SendTemplateRequest.ts new file mode 100644 index 0000000..13a035f --- /dev/null +++ b/typescript/src/generated/src/models/SendTemplateRequest.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SendTemplateRequestLanguage } from './SendTemplateRequestLanguage'; +import { + SendTemplateRequestLanguageFromJSON, + SendTemplateRequestLanguageFromJSONTyped, + SendTemplateRequestLanguageToJSON, + SendTemplateRequestLanguageToJSONTyped, +} from './SendTemplateRequestLanguage'; + +/** + * + * @export + * @interface SendTemplateRequest + */ +export interface SendTemplateRequest { + /** + * + * @type {string} + * @memberof SendTemplateRequest + */ + template?: string; + /** + * + * @type {SendTemplateRequestLanguage} + * @memberof SendTemplateRequest + */ + language?: SendTemplateRequestLanguage; + /** + * + * @type {string} + * @memberof SendTemplateRequest + */ + namespace?: string; + /** + * + * @type {Array} + * @memberof SendTemplateRequest + */ + params?: Array; + /** + * + * @type {string} + * @memberof SendTemplateRequest + */ + phone?: string; +} + +/** + * Check if a given object implements the SendTemplateRequest interface. + */ +export function instanceOfSendTemplateRequest(value: object): value is SendTemplateRequest { + return true; +} + +export function SendTemplateRequestFromJSON(json: any): SendTemplateRequest { + return SendTemplateRequestFromJSONTyped(json, false); +} + +export function SendTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequest { + if (json == null) { + return json; + } + return { + + 'template': json['template'] == null ? undefined : json['template'], + 'language': json['language'] == null ? undefined : SendTemplateRequestLanguageFromJSON(json['language']), + 'namespace': json['namespace'] == null ? undefined : json['namespace'], + 'params': json['params'] == null ? undefined : json['params'], + 'phone': json['phone'] == null ? undefined : json['phone'], + }; +} + +export function SendTemplateRequestToJSON(json: any): SendTemplateRequest { + return SendTemplateRequestToJSONTyped(json, false); +} + +export function SendTemplateRequestToJSONTyped(value?: SendTemplateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'template': value['template'], + 'language': SendTemplateRequestLanguageToJSON(value['language']), + 'namespace': value['namespace'], + 'params': value['params'], + 'phone': value['phone'], + }; +} + diff --git a/typescript/src/generated/src/models/SendTemplateRequestLanguage.ts b/typescript/src/generated/src/models/SendTemplateRequestLanguage.ts new file mode 100644 index 0000000..c544d46 --- /dev/null +++ b/typescript/src/generated/src/models/SendTemplateRequestLanguage.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SendTemplateRequestLanguage + */ +export interface SendTemplateRequestLanguage { + /** + * + * @type {string} + * @memberof SendTemplateRequestLanguage + */ + policy?: string; + /** + * + * @type {string} + * @memberof SendTemplateRequestLanguage + */ + code?: string; +} + +/** + * Check if a given object implements the SendTemplateRequestLanguage interface. + */ +export function instanceOfSendTemplateRequestLanguage(value: object): value is SendTemplateRequestLanguage { + return true; +} + +export function SendTemplateRequestLanguageFromJSON(json: any): SendTemplateRequestLanguage { + return SendTemplateRequestLanguageFromJSONTyped(json, false); +} + +export function SendTemplateRequestLanguageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateRequestLanguage { + if (json == null) { + return json; + } + return { + + 'policy': json['policy'] == null ? undefined : json['policy'], + 'code': json['code'] == null ? undefined : json['code'], + }; +} + +export function SendTemplateRequestLanguageToJSON(json: any): SendTemplateRequestLanguage { + return SendTemplateRequestLanguageToJSONTyped(json, false); +} + +export function SendTemplateRequestLanguageToJSONTyped(value?: SendTemplateRequestLanguage | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'code': value['code'], + }; +} + diff --git a/typescript/src/generated/src/models/SuccessResponse.ts b/typescript/src/generated/src/models/SuccessResponse.ts new file mode 100644 index 0000000..2de6257 --- /dev/null +++ b/typescript/src/generated/src/models/SuccessResponse.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Generic success response + * @export + * @interface SuccessResponse + */ +export interface SuccessResponse { + [key: string]: any | any; + /** + * Operation result + * @type {string} + * @memberof SuccessResponse + */ + result?: string; +} + +/** + * Check if a given object implements the SuccessResponse interface. + */ +export function instanceOfSuccessResponse(value: object): value is SuccessResponse { + return true; +} + +export function SuccessResponseFromJSON(json: any): SuccessResponse { + return SuccessResponseFromJSONTyped(json, false); +} + +export function SuccessResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SuccessResponse { + if (json == null) { + return json; + } + return { + + ...json, + 'result': json['result'] == null ? undefined : json['result'], + }; +} + +export function SuccessResponseToJSON(json: any): SuccessResponse { + return SuccessResponseToJSONTyped(json, false); +} + +export function SuccessResponseToJSONTyped(value?: SuccessResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'result': value['result'], + }; +} + diff --git a/typescript/src/generated/src/models/index.ts b/typescript/src/generated/src/models/index.ts new file mode 100644 index 0000000..f829c43 --- /dev/null +++ b/typescript/src/generated/src/models/index.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './CreateGroups200Response'; +export * from './CreateReadMessage200Response'; +export * from './CreateReadMessage401Response'; +export * from './CreateReadMessageRequest'; +export * from './DeleteFlowsFlowId200Response'; +export * from './DeleteGroupsGroupId200Response'; +export * from './ErrorResponse'; +export * from './ListFlows200Response'; +export * from './ListMessages200Response'; +export * from './ListTemplates200Response'; +export * from './MessageSentResponse'; +export * from './PatchFlowsFlowIdAssets200Response'; +export * from './ProfileInfo'; +export * from './SendButtonRequest'; +export * from './SendButtonRequestSectionsInner'; +export * from './SendButtonRequestSectionsInnerReply'; +export * from './SendCarouselRequest1'; +export * from './SendContactRequest'; +export * from './SendContactRequestContactsInner'; +export * from './SendContactRequestContactsInnerName'; +export * from './SendContactRequestContactsInnerOrg'; +export * from './SendContactRequestContactsInnerPhonesInner'; +export * from './SendFileRequest'; +export * from './SendFlowRequest1'; +export * from './SendFlowRequest1Header'; +export * from './SendFlowRequestHeader'; +export * from './SendListRequest'; +export * from './SendListRequestSectionsInner'; +export * from './SendListRequestSectionsInnerRowsInner'; +export * from './SendLocationRequest1'; +export * from './SendLocationRequestRequest'; +export * from './SendMessageRequest'; +export * from './SendReactionRequest'; +export * from './SendTemplateRequest'; +export * from './SendTemplateRequestLanguage'; +export * from './SuccessResponse'; diff --git a/typescript-fetch/src/runtime.ts b/typescript/src/generated/src/runtime.ts similarity index 89% rename from typescript-fetch/src/runtime.ts rename to typescript/src/generated/src/runtime.ts index 5f48a00..d8f61aa 100644 --- a/typescript-fetch/src/runtime.ts +++ b/typescript/src/generated/src/runtime.ts @@ -1,19 +1,18 @@ /* tslint:disable */ /* eslint-disable */ /** - * one_msg_waba_sdk - * [1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly. The authorization token must be added to each request in the GET parameter \'token\' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body. All \'send\' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail + * 1MSG WhatsApp Business API (Public) + * Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ * - * The version of the OpenAPI document: 2.39.0 - * Contact: hello@1msg.io + * The version of the OpenAPI document: 1.0.0 + * Contact: support@1msg.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export const BASE_PATH = "https://api.1msg.io/YOUR_INSTANCE_NUMBER".replace(/\/+$/, ""); +export const BASE_PATH = "https://api.1msg.io".replace(/\/+$/, ""); export interface ConfigurationParameters { basePath?: string; // override base path @@ -22,7 +21,7 @@ export interface ConfigurationParameters { queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings username?: string; // parameter for basic security password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security headers?: HTTPHeaders; //header params we want to use on every request credentials?: RequestCredentials; //value for the credentials param we want to use on each request @@ -59,7 +58,7 @@ export class Configuration { return this.configuration.password; } - get apiKey(): ((name: string) => string) | undefined { + get apiKey(): ((name: string) => string | Promise) | undefined { const apiKey = this.configuration.apiKey; if (apiKey) { return typeof apiKey === 'function' ? apiKey : () => apiKey; @@ -91,7 +90,7 @@ export const DefaultConfig = new Configuration(); */ export class BaseAPI { - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private static readonly jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i; private middleware: Middleware[]; constructor(protected configuration = DefaultConfig) { @@ -261,6 +260,12 @@ export class ResponseError extends Error { override name: "ResponseError" = "ResponseError"; constructor(public response: Response, msg?: string) { super(msg); + + // restore prototype chain + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } } } @@ -268,6 +273,12 @@ export class FetchError extends Error { override name: "FetchError" = "FetchError"; constructor(public cause: Error, msg?: string) { super(msg); + + // restore prototype chain + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } } } @@ -275,6 +286,12 @@ export class RequiredError extends Error { override name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + + // restore prototype chain + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } } } @@ -310,11 +327,6 @@ export interface RequestOpts { body?: HTTPBody; } -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map(key => querystringSingleKey(key, params[key], prefix)) @@ -342,11 +354,17 @@ function querystringSingleKey(key: string, value: string | number | null | undef return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; } export function canConsumeForm(consumes: Consume[]): boolean { @@ -429,3 +447,7 @@ export class TextApiResponse { return await this.raw.text(); }; } + +export function objectToJSON(value: unknown): unknown { + return value; +} diff --git a/typescript/src/generated/tsconfig.esm.json b/typescript/src/generated/tsconfig.esm.json new file mode 100644 index 0000000..2c0331c --- /dev/null +++ b/typescript/src/generated/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/typescript-fetch/tsconfig.json b/typescript/src/generated/tsconfig.json similarity index 78% rename from typescript-fetch/tsconfig.json rename to typescript/src/generated/tsconfig.json index 4567ec1..250280d 100644 --- a/typescript-fetch/tsconfig.json +++ b/typescript/src/generated/tsconfig.json @@ -1,14 +1,10 @@ { "compilerOptions": { "declaration": true, - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", - "lib": [ - "es6", - "dom" - ], "typeRoots": [ "node_modules/@types" ] diff --git a/typescript/src/index.ts b/typescript/src/index.ts new file mode 100644 index 0000000..6c86a22 --- /dev/null +++ b/typescript/src/index.ts @@ -0,0 +1,24 @@ +export { SDK_VERSION } from './version'; +export { + ChatApiConfig, + type ChatApiConfigOptions, +} from './chat-api-config'; +export { + ChatApiClient, + createChatApiClient, + createClient, +} from './chat-api-client'; + +export * from './generated/src/runtime'; +export { + FlowsApi, + GroupsApi, + MessagingApi, + ProfileApi, + TemplatesApi, +} from './generated/src/apis'; +export * from './generated/src/models'; + +export type { SendMessageRequest } from './generated/src/models/SendMessageRequest'; +export type { MessageSentResponse } from './generated/src/models/MessageSentResponse'; +export type { ProfileInfo } from './generated/src/models/ProfileInfo'; diff --git a/typescript/src/version.ts b/typescript/src/version.ts new file mode 100644 index 0000000..417e662 --- /dev/null +++ b/typescript/src/version.ts @@ -0,0 +1 @@ +export const SDK_VERSION = '1.0.0'; diff --git a/typescript/tsconfig.build.json b/typescript/tsconfig.build.json new file mode 100644 index 0000000..8f4cbc4 --- /dev/null +++ b/typescript/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "src/**/__tests__/**"] +} diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json new file mode 100644 index 0000000..37281e7 --- /dev/null +++ b/typescript/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["ES2020", "DOM"], + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node", + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "src/**/__tests__/**"] +}